Re: [meta-ti][master][PATCH v3] meta-ti-bsp: Add udev rules for MCAN to meta-ti

Ryan Eatmon <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arago
Message-ID <[email protected]>
wrong mailing list.  Please send this to the meta-ti mailing list.


On 1/30/2026 5:06 AM, Anurag Dutta wrote:
> Add MCAN udev rules to meta-ti so that MCAN tests run
> successfully.
> 
> Signed-off-by: Anurag Dutta <[email protected]>
> ---
> Tested on j721s2 (poky) : https://gist.github.com/anuragdutta731/67c24da1616e74efa2b117a3bd88ada6
> 
> Link to v1 : https://lore.kernel.org/all/[email protected]/
> changelog v2:
> 1. moved all the rules from meta-arago-distro to meta-arago-test
> 2. removed udev* from meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-base.bb
> 
> Link to v2: https://lore.kernel.org/all/[email protected]/
> changelog v3:
> 1.Added the udev rules to meta-ti
> 
>   meta-ti-bsp/conf/machine/include/k3.inc       |  2 +-
>   .../udev/udev-ticonf/37-can-am62.rules        |  4 ++++
>   .../udev/udev-ticonf/37-can-dra7.rules        |  2 ++
>   .../udev/udev-ticonf/37-can-j7.rules          | 20 +++++++++++++++++
>   .../udev/udev-ticonf/37-can-ti33x.rules       |  2 ++
>   .../recipes-core/udev/udev-ticonf_1.bb        | 22 +++++++++++++++++++
>   6 files changed, 51 insertions(+), 1 deletion(-)
>   create mode 100644 meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-am62.rules
>   create mode 100644 meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-dra7.rules
>   create mode 100644 meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-j7.rules
>   create mode 100644 meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-ti33x.rules
>   create mode 100644 meta-ti-bsp/recipes-core/udev/udev-ticonf_1.bb
> 
> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
> index 698b46d7..68129df9 100644
> --- a/meta-ti-bsp/conf/machine/include/k3.inc
> +++ b/meta-ti-bsp/conf/machine/include/k3.inc
> @@ -39,7 +39,7 @@ UBI_VOLNAME = "rootfs"
>   
>   # List common SoC features, may need to add touchscreen for specific machines
>   MACHINE_FEATURES = "apm usbgadget usbhost vfat ext2 alsa pci optee-ftpm"
> -MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw"
> +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "ti-pka-fw udev-ticonf"
>   
>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>   
> diff --git a/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-am62.rules b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-am62.rules
> new file mode 100644
> index 00000000..59dc8075
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-am62.rules
> @@ -0,0 +1,4 @@
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="4e08000.can", NAME="mcu_mcan0"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="4e18000.can", NAME="mcu_mcan1"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="20701000.can", NAME="main_mcan0"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="20711000.can", NAME="main_mcan1"
> diff --git a/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-dra7.rules b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-dra7.rules
> new file mode 100644
> index 00000000..3b14150d
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-dra7.rules
> @@ -0,0 +1,2 @@
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="4ae3c000.can", NAME="main_dcan1"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="48480000.can", NAME="main_dcan2"
> diff --git a/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-j7.rules b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-j7.rules
> new file mode 100644
> index 00000000..f2804ecd
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-j7.rules
> @@ -0,0 +1,20 @@
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="40528000.can", NAME="mcu_mcan0"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="40568000.can", NAME="mcu_mcan1"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2701000.can", NAME="main_mcan0"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2711000.can", NAME="main_mcan1"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2721000.can", NAME="main_mcan2"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2731000.can", NAME="main_mcan3"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2741000.can", NAME="main_mcan4"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2751000.can", NAME="main_mcan5"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2761000.can", NAME="main_mcan6"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2771000.can", NAME="main_mcan7"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2781000.can", NAME="main_mcan8"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2791000.can", NAME="main_mcan9"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="27a1000.can", NAME="main_mcan10"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="27b1000.can", NAME="main_mcan11"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="27c1000.can", NAME="main_mcan12"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="27d1000.can", NAME="main_mcan13"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2681000.can", NAME="main_mcan14"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="2691000.can", NAME="main_mcan15"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="26a1000.can", NAME="main_mcan16"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="26b1000.can", NAME="main_mcan17"
> diff --git a/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-ti33x.rules b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-ti33x.rules
> new file mode 100644
> index 00000000..62d650fe
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-core/udev/udev-ticonf/37-can-ti33x.rules
> @@ -0,0 +1,2 @@
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="481cc000.can", NAME="main_dcan0"
> +SUBSYSTEM=="net", ACTION=="add", KERNELS=="481d0000.can", NAME="main_dcan1"
> diff --git a/meta-ti-bsp/recipes-core/udev/udev-ticonf_1.bb b/meta-ti-bsp/recipes-core/udev/udev-ticonf_1.bb
> new file mode 100644
> index 00000000..1ef487c2
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-core/udev/udev-ticonf_1.bb
> @@ -0,0 +1,22 @@
> +SUMMARY = "Udev rules for assorted TI SoCs"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +inherit bin_package
> +
> +SRC_URI = " \
> +    file://37-can-j7.rules \
> +    file://37-can-am62.rules \
> +    file://37-can-dra7.rules \
> +    file://37-can-ti33x.rules \
> +"
> +
> +S = "${WORKDIR}"
> +
> +do_install() {
> +    install -d ${D}${libdir}/udev/rules.d
> +    install -m 0644 ${WORKDIR}/37-can-j7.rules ${D}${libdir}/udev/rules.d/
> +    install -m 0644 ${WORKDIR}/37-can-am62.rules ${D}${libdir}/udev/rules.d/
> +    install -m 0644 ${WORKDIR}/37-can-dra7.rules ${D}${libdir}/udev/rules.d/
> +    install -m 0644 ${WORKDIR}/37-can-ti33x.rules ${D}${libdir}/udev/rules.d/
> +}

-- 
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.