From fd8e0a15f32252f38ba36645535b54c33b3bdb18 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Tue, 29 Nov 2016 10:18:46 -0600 Subject: Add udev Ethernet AC card interface naming rules --- .../udev/udev-182/mtcdt/accessory_ethernet.rules | 21 +++++++++++++++++++++ recipes-core/udev/udev_182.bbappend | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules (limited to 'recipes-core/udev') diff --git a/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules b/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules new file mode 100644 index 0000000..376486b --- /dev/null +++ b/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules @@ -0,0 +1,21 @@ +#To add new rule for new device you have to run (in case if you want to add eth1 interface) +#admin@mtcdt:~# udevadm info --attribute-walk --path=/sys/class/net/eth1 +# looking at device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/net/eth1': +# KERNEL=="eth1" +# SUBSYSTEM=="net" +# DRIVER=="" +# ATTR{mtu}=="1500" +# ATTR{type}=="1" +# ........... +# ........... + +# looking at parent device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0': +# KERNELS=="1-2.1.1:1.0" <------------------- extract this record to add to the rule +# SUBSYSTEMS=="usb" +# DRIVERS=="smsc75xx" +# ATTRS{bInterfaceClass}=="ff" +# ATTRS{bInterfaceSubClass}=="00" +# ........... + +KERNELS=="1-2.1.1:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth1" +KERNELS=="1-2.1.2:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth2" diff --git a/recipes-core/udev/udev_182.bbappend b/recipes-core/udev/udev_182.bbappend index 39a5ae1..f5548c1 100644 --- a/recipes-core/udev/udev_182.bbappend +++ b/recipes-core/udev/udev_182.bbappend @@ -4,10 +4,17 @@ PR .= ".mlinux1" # add custom rules for persistent modem device names SRC_URI += " file://cellular_radios.rules \ - file://${MACHINE}.rules \ + file://${MACHINE}.rules \ " +SRC_URI_append_mtcdt = " file://accessory_ethernet.rules \ + " + do_install_append() { install -m 644 ${WORKDIR}/cellular_radios.rules ${D}${sysconfdir}/udev/rules.d/ install -m 644 ${WORKDIR}/${MACHINE}.rules ${D}${sysconfdir}/udev/rules.d/ } + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/accessory_ethernet.rules ${D}${sysconfdir}/udev/rules.d/ +} -- cgit v1.2.3