diff options
author | John Klug <john.klug@multitech.com> | 2020-11-11 18:48:27 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-11-11 18:48:27 -0600 |
commit | b00be59bbc49535097c450b6b8c5fc10c1efd6dd (patch) | |
tree | 25cf0e14f66c5fca1cfe41b31bf862d60a36cf12 /recipes-core/udev | |
parent | db088915be6dca3f09dedbcdaa7264d9271b1c74 (diff) | |
download | meta-mlinux-GitosisMultiarch.tar.gz meta-mlinux-GitosisMultiarch.tar.bz2 meta-mlinux-GitosisMultiarch.zip |
Merge multiarch project to: added missing index file 2020 June 11GitosisMultiarch
Diffstat (limited to 'recipes-core/udev')
-rw-r--r-- | recipes-core/udev/eudev/cellular_radios.rules | 4 | ||||
-rw-r--r-- | recipes-core/udev/eudev/mtcap/mtcap.rules | 8 | ||||
-rw-r--r-- | recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules | 21 | ||||
-rw-r--r-- | recipes-core/udev/eudev/mtcdt/mtcdt.rules | 14 | ||||
-rw-r--r-- | recipes-core/udev/eudev/mtr/mtr.rules | 13 | ||||
-rw-r--r-- | recipes-core/udev/eudev/mtrv1/mtrv1.rules | 13 | ||||
-rw-r--r-- | recipes-core/udev/eudev_%.bbappend | 21 | ||||
-rw-r--r-- | recipes-core/udev/udev-extraconf/mount.patch | 109 |
8 files changed, 84 insertions, 119 deletions
diff --git a/recipes-core/udev/eudev/cellular_radios.rules b/recipes-core/udev/eudev/cellular_radios.rules index 078f710..d7c0521 100644 --- a/recipes-core/udev/eudev/cellular_radios.rules +++ b/recipes-core/udev/eudev/cellular_radios.rules @@ -79,4 +79,8 @@ ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1101", ENV{ID_IFACE}=="02", SYMLINK+ ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0195", ENV{ID_IFACE}=="02", SYMLINK+="modem_at0" ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0195", ENV{ID_IFACE}=="03", SYMLINK+="modem_at1" +# Quectel EG-25 +ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{ID_IFACE}=="02", SYMLINK+="modem_at0" +ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ENV{ID_IFACE}=="03", SYMLINK+="modem_at1" + LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtcap/mtcap.rules b/recipes-core/udev/eudev/mtcap/mtcap.rules deleted file mode 100644 index a0dc9fb..0000000 --- a/recipes-core/udev/eudev/mtcap/mtcap.rules +++ /dev/null @@ -1,8 +0,0 @@ -ACTION=="remove", GOTO="mlinux_end" -SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" - -SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" -ENV{ID_IFACE}=="", GOTO="mlinux_end" - -LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules b/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules deleted file mode 100644 index 376486b..0000000 --- a/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules +++ /dev/null @@ -1,21 +0,0 @@ -#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/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules deleted file mode 100644 index 5d528e6..0000000 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ /dev/null @@ -1,14 +0,0 @@ -ACTION=="remove", GOTO="mlinux_end" -SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" - -SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" -ENV{ID_IFACE}=="", GOTO="mlinux_end" - -# Accessory Ports -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" - -LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtr/mtr.rules b/recipes-core/udev/eudev/mtr/mtr.rules deleted file mode 100644 index 239a846..0000000 --- a/recipes-core/udev/eudev/mtr/mtr.rules +++ /dev/null @@ -1,13 +0,0 @@ -ACTION=="remove", GOTO="mlinux_end" -SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" - -SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" -ENV{ID_IFACE}=="", GOTO="mlinux_end" - -# mtr revA: bluetooth on exar chip (ACM0, iface 0) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" -# mtr revA: external serial on exar chip (ACM1, iface 2) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" - -LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules deleted file mode 100644 index 239a846..0000000 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ /dev/null @@ -1,13 +0,0 @@ -ACTION=="remove", GOTO="mlinux_end" -SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" - -SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" -ENV{ID_IFACE}=="", GOTO="mlinux_end" - -# mtr revA: bluetooth on exar chip (ACM0, iface 0) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" -# mtr revA: external serial on exar chip (ACM1, iface 2) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" - -LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend index cde2f10..26bcceb 100644 --- a/recipes-core/udev/eudev_%.bbappend +++ b/recipes-core/udev/eudev_%.bbappend @@ -1,21 +1,14 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -PR .= ".mlinux4" +PR .= ".mlinux6" # add custom rules for persistent modem device names -SRC_URI += " file://cellular_radios.rules \ - file://${MACHINE}.rules \ - " -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_mtcdt = " file://accessory_ethernet.rules \ - " +SRC_URI += "file://cellular_radios.rules \ + file://${MACHINE}.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/ + 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/ -} + diff --git a/recipes-core/udev/udev-extraconf/mount.patch b/recipes-core/udev/udev-extraconf/mount.patch index 71ccc56..1b475f3 100644 --- a/recipes-core/udev/udev-extraconf/mount.patch +++ b/recipes-core/udev/udev-extraconf/mount.patch @@ -1,44 +1,81 @@ -diff -Naru old/mount.sh new/mount.sh ---- old/mount.sh 2018-05-15 09:07:02.814673114 -0500 -+++ new/mount.sh 2018-05-15 09:06:30.862674060 -0500 -@@ -4,7 +4,6 @@ - # - # Attempt to mount any added block devices and umount any removed devices +diff -Naru orig/mount.blacklist new/mount.blacklist +--- orig/mount.blacklist 2019-10-24 17:08:59.796796272 -0500 ++++ new/mount.blacklist 2019-10-24 17:16:31.768782892 -0500 +@@ -3,3 +3,16 @@ + /dev/mtdblock + /dev/md + /dev/dm-* ++# These should all be mounted in fstab or not at all. ++[PARTLABEL=uboot] ++[PARTLABEL=root] ++[PARTLABEL=root1] ++[PARTLABEL=root2] ++[PARTLABEL=uboot] ++[PARTLABEL=oem] ++[PARTLABEL=oem1] ++[PARTLABEL=oem2] ++[PARTLABEL=config] ++[PARTLABEL=config1] ++[PARTLABEL=config2] ++[PARTLABEL=user_data] +diff -Naru orig/mount.sh new/mount.sh +--- orig/mount.sh 2019-10-24 17:09:11.344795931 -0500 ++++ new/mount.sh 2019-10-24 18:11:38.612684994 -0500 +@@ -25,9 +25,32 @@ + fi -- - MOUNT="/bin/mount" PMOUNT="/usr/bin/pmount" - UMOUNT="/bin/umount" -@@ -21,6 +20,10 @@ - name="`basename "$DEVNAME"`" - - ! test -d "/run/media/$name" && mkdir -p "/run/media/$name" -+ if [ "$name" = mmcblk0p1 ] ; -+ then -+ ln -sf /run/media/$name /run/media/card -+ fi - # Silent util-linux's version of mounting auto - if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ; +- +-for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*` ++for line in `grep -h -v '^#$' /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/* 2>/dev/null` + do ++ if [[ $line =~ ^\[([^=]*)=([^\]]*)\] ]] ; then ++ fsspectype=${BASH_REMATCH[1]} ++ tmp="$(lsblk -o $fsspectype $DEVNAME | sed -e '1d')" ++ case $fsspectype in ++ PARTLABEL) ++ if [[ ${BASH_REMATCH[2]} == $tmp ]] ; then ++ logger "udev/mount.sh $DEVNAME is blacklisted, ignoring" ++ logger "$line" ++ exit 0 ++ fi ++ ;; ++ ++ PARTUUID) ++ if [[ ${BASH_REMATCH[2]^^} == $tmp ]] ; then ++ logger "udev/mount.sh $DEVNAME is blacklisted, ignoring" ++ logger "$line" ++ exit 0 ++ fi ++ ;; ++ *) ++ logger "[$fsspectype] is unsupported in blacklist -- ignoring blacklist item" ++ ;; ++ esac ++ fi + if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ]; then -@@ -31,7 +34,7 @@ - # grant it with w/r/x permissions. - case $ID_FS_TYPE in - vfat|fat) -- MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" -+ MOUNT="$MOUNT -o errors=continue -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`" - ;; - # TODO - *) -@@ -66,7 +69,11 @@ + logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring" +@@ -49,6 +72,10 @@ + + [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name" + ++ if [ "$name" = mmcblk0p1 ] ; then ++ ln -sf /run/media/$name /run/media/card ++ fi ++ + MOUNT="$MOUNT -o silent" + + # If filesystemtype is vfat, change the ownership group to 'disk', and +@@ -78,7 +105,11 @@ if [ -x "$PMOUNT" ]; then $PMOUNT $DEVNAME 2> /dev/null elif [ -x $MOUNT ]; then -- $MOUNT $DEVNAME 2> /dev/null -+ if [[ $ID_FS_TYPE =~ fat ]] ; then -+ $MOUNT -o umask=002,gid=disk $DEVNAME 2> /dev/null -+ else -+ $MOUNT $DEVNAME 2> /dev/null -+ fi ++ if [[ $ID_FS_TYPE =~ fat ]] ; then ++ $MOUNT -o umask=002,gid=disk $DEVNAME 2> /dev/null ++ else + $MOUNT $DEVNAME 2> /dev/null ++ fi fi - + # If the device isn't mounted at this point, it isn't |