From c959a88393bb28c36fbb8a75f7e11299b0fd5d98 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 15 Jan 2020 18:05:48 +0100 Subject: [PATCH] udev-extraconf: create /dev/ttyXBee symlink to XBee uart https://jira.digi.com/browse/DEL-6903 Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccimx6qpsbc.conf | 3 +++ meta-digi-arm/conf/machine/ccimx6sbc.conf | 3 +++ meta-digi-arm/conf/machine/ccimx6ulsbc.conf | 3 +++ meta-digi-arm/conf/machine/ccimx8mn-dvk.conf | 1 + meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf | 1 + .../recipes-core/udev/udev-extraconf_1.1.bbappend | 8 ++++++++ 6 files changed, 19 insertions(+) diff --git a/meta-digi-arm/conf/machine/ccimx6qpsbc.conf b/meta-digi-arm/conf/machine/ccimx6qpsbc.conf index e49bc3ff9..c033e6f50 100644 --- a/meta-digi-arm/conf/machine/ccimx6qpsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6qpsbc.conf @@ -44,6 +44,9 @@ BT_DEVICE_NAME ?= "cc6qp" # Bluetooth tty BT_TTY ?= "ttymxc1" +# XBee +XBEE_TTY ?= "ttymxc4" + # U-Boot script to be copied to the boot image BOOT_SCRIPTS = "boot.scr:boot.scr" diff --git a/meta-digi-arm/conf/machine/ccimx6sbc.conf b/meta-digi-arm/conf/machine/ccimx6sbc.conf index 66237eac9..ea98b6b24 100644 --- a/meta-digi-arm/conf/machine/ccimx6sbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6sbc.conf @@ -46,6 +46,9 @@ BT_DEVICE_NAME ?= "cc6" # Bluetooth tty BT_TTY ?= "ttymxc1" +# XBee +XBEE_TTY ?= "ttymxc4" + # U-Boot script to be copied to the boot image BOOT_SCRIPTS = "boot.scr:boot.scr" diff --git a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf index 9df9a23d7..f633e8cd8 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf @@ -35,6 +35,9 @@ SERIAL_CONSOLES ?= "115200;ttymxc4" # Bluetooth tty BT_TTY ?= "ttymxc0" +# XBee +XBEE_TTY ?= "ttymxc1" + # U-Boot script to be copied to the boot image BOOT_SCRIPTS = "boot.scr:boot.scr" diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index 7850be6ba..2b2706544 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -27,6 +27,7 @@ BT_TTY ?= "ttymxc1" # XBee2 XBEE_RESET_N_GPIO ?= "8" XBEE_SLEEP_RQ_GPIO ?= "7" +XBEE_TTY ?= "ttymxc3" # U-Boot script to be copied to the boot image BOOT_SCRIPTS = "boot.scr:boot.scr" diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf index 875384504..76b687507 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -28,6 +28,7 @@ BT_TTY ?= "ttyLP1" # XBee XBEE_RESET_N_GPIO ?= "220" XBEE_SLEEP_RQ_GPIO ?= "216" +XBEE_TTY ?= "ttyMCA0" # U-Boot script to be copied to the boot image BOOT_SCRIPTS = "boot.scr:boot.scr" diff --git a/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend b/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend index 2657a90d9..caa40f64f 100644 --- a/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend +++ b/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend @@ -22,6 +22,14 @@ do_install_append() { >> ${D}${sysconfdir}/udev/rules.d/localextra.rules fi + # XBee TTY symlink + if [ -n "${XBEE_TTY}" ]; then + printf "%s\n%s\n" \ + "# Symlink to the XBee tty" \ + "KERNEL==\"${XBEE_TTY}\", MODE=\"0660\", GROUP=\"tty\", SYMLINK+=\"ttyXBee\"" \ + >> ${D}${sysconfdir}/udev/rules.d/localextra.rules + fi + install -d ${D}${sysconfdir}/modprobe.d install -m 0644 ${WORKDIR}/blacklist.conf ${D}${sysconfdir}/modprobe.d }