From 164cd1af2b796aa2bae0184691f6e4879c04838e Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Tue, 18 Nov 2014 19:37:05 +0100 Subject: [PATCH] static-devicenames-odu: add stable device names for the gsm-modems on the odu Fixes: SYS#732 [hfreyther: I removed the MACHINE_ESSENTIAL_EXTRA_RDEPENDS as applications that use the symlinks should rdepend on the package] [hfreyther: Changed mismatch of tabs/spaces] --- .../files/persistens-serial-odu.rules | 23 +++++++++++++++++++ .../static-devicenames-odu_1.bb | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules create mode 100644 recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb diff --git a/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules b/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules new file mode 100644 index 0000000..d942af9 --- /dev/null +++ b/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules @@ -0,0 +1,23 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="persistent_serial_odu_end" +SUBSYSTEM!="tty", GOTO="persistent_serial_odu_end" +KERNEL!="ttyACM[0-9]*", GOTO="persistent_serial_odu_end" + +KERNELS=="1-1.2:1.0", SYMLINK+="ttyModemScan0" +KERNELS=="1-1.2:1.2", SYMLINK+="ttyModemScan1" +KERNELS=="1-1.2:1.4", SYMLINK+="ttyModemScan2" +KERNELS=="1-1.2:1.6", SYMLINK+="ttyModemScan3" +KERNELS=="1-1.2:1.8", SYMLINK+="ttyModemScan4" +KERNELS=="1-1.2:1.10", SYMLINK+="ttyModemScan5" +KERNELS=="1-1.2:1.12", SYMLINK+="ttyModemScan6" + +KERNELS=="1-1.3:1.0", SYMLINK+="ttyModemUplink0" +KERNELS=="1-1.3:1.2", SYMLINK+="ttyModemUplink1" +KERNELS=="1-1.3:1.4", SYMLINK+="ttyModemUplink2" +KERNELS=="1-1.3:1.6", SYMLINK+="ttyModemUplink3" +KERNELS=="1-1.3:1.8", SYMLINK+="ttyModemUplink4" +KERNELS=="1-1.3:1.10", SYMLINK+="ttyModemUplink5" +KERNELS=="1-1.3:1.12", SYMLINK+="ttyModemUplink6" + +LABEL="persistent_serial_odu_end" diff --git a/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb b/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb new file mode 100644 index 0000000..a6d2359 --- /dev/null +++ b/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Udev helper script for static device names on the sysmocom odu" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://persistens-serial-odu.rules" + +PACKAGES = "${PN}" +FILES_${PN} = "${BASELIB}/udev/rules.d/*" +RDPEPENDS_${PN} = "udev" + +do_install() { + install -d ${D}/${BASELIB}/udev/rules.d + install -m 0644 ${WORKDIR}/persistens-serial-odu.rules ${D}/${BASELIB}/udev/rules.d/70-persistens-serial-odu.rules +}