@@ -61,6 +61,7 @@ TI_TEST_BASE = "\
v4l-utils \
xdp-tools-arago \
yavta \
+ udev-aragoconf \
"
TI_TEST_BASE:append:ti-soc = " \
new file mode 100644
@@ -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"
new file mode 100644
@@ -0,0 +1,2 @@
+SUBSYSTEM=="net", ACTION=="add", KERNELS=="4ae3c000.can", NAME="main_dcan1"
+SUBSYSTEM=="net", ACTION=="add", KERNELS=="48480000.can", NAME="main_dcan2"
new file mode 100644
@@ -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"
new file mode 100644
@@ -0,0 +1,2 @@
+SUBSYSTEM=="net", ACTION=="add", KERNELS=="481cc000.can", NAME="main_dcan0"
+SUBSYSTEM=="net", ACTION=="add", KERNELS=="481d0000.can", NAME="main_dcan1"
new file mode 100644
@@ -0,0 +1,24 @@
+# There are a number of modifiers that are allowed to be used in some
+# of the different fields. They provide the following subsitutions:
+#
+# %n the "kernel number" of the device.
+# For example, 'sda3' has a "kernel number" of '3'
+# %e the smallest number for that name which does not matches an existing node
+# %k the kernel name for the device
+# %M the kernel major number for the device
+# %m the kernel minor number for the device
+# %b the bus id for the device
+# %c the string returned by the PROGRAM
+# %s{filename} the content of a sysfs attribute
+# %% the '%' char itself
+#
+
+# Try and modprobe for drivers for new hardware
+ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
+
+# Create a symlink to any touchscreen input device
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0"
+
+# Auto-mount any SD cards
+ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh"
+ACTION=="remove", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh"
new file mode 100644
@@ -0,0 +1,26 @@
+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://50-arago.rules \
+ 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}/50-arago.rules ${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/
+}
+
+RDEPENDS:${PN} = "udev udev-extraconf"
Copy udev rules from meta-arago-distro to meta-arago-test so that MCAN tests run successfully with other distros such as "poky" as well. Signed-off-by: Anurag Dutta <a-dutta@ti.com> --- .../recipes-core/packagegroups/ti-test.bb | 1 + .../udev/udev-aragoconf/37-can-am62.rules | 4 +++ .../udev/udev-aragoconf/37-can-dra7.rules | 2 ++ .../udev/udev-aragoconf/37-can-j7.rules | 20 ++++++++++++++ .../udev/udev-aragoconf/37-can-ti33x.rules | 2 ++ .../udev/udev-aragoconf/50-arago.rules | 24 +++++++++++++++++ .../recipes-core/udev/udev-aragoconf_1.bb | 26 +++++++++++++++++++ 7 files changed, 79 insertions(+) create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf/37-can-am62.rules create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf/37-can-dra7.rules create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf/37-can-j7.rules create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf/37-can-ti33x.rules create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf/50-arago.rules create mode 100644 meta-arago-test/recipes-core/udev/udev-aragoconf_1.bb