diff --git a/meta-digi-arm/conf/machine/ccardimx28js.conf b/meta-digi-arm/conf/machine/ccardimx28js.conf index f1766f202..a12c0b5c3 100644 --- a/meta-digi-arm/conf/machine/ccardimx28js.conf +++ b/meta-digi-arm/conf/machine/ccardimx28js.conf @@ -11,8 +11,13 @@ KERNEL_DEVICETREE = "imx28-${MACHINE}.dtb" # Serial console SERIAL_CONSOLES ?= "115200;${@base_conditional('IS_KERNEL_2X', '1' , 'ttyAM0', 'ttyAMA0', d)}" -# Bluetooth tty -BT_TTY ?= "${@base_conditional('IS_KERNEL_2X', '1' , 'ttySP0', 'ttyAPP0', d)}" +# Use standard serial port name and let device handlers (mdev, udev) +# create a symlink to the correct device. +SERIAL_CONSOLES = "115200;ttyS0" + +# Console and bluetooth tty's +BT_TTY ?= "${@base_conditional('IS_KERNEL_2X', '1' , 'ttySP0', 'ttyAPP0', d)}" +CON_TTY ?= "${@base_conditional('IS_KERNEL_2X', '1' , 'ttyAM0', 'ttyAMA0', d)}" # U-Boot script to be copied to the SD image BOOT_SCRIPTS = "boot-sd.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 5cd9d5491..ea48cb129 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 @@ -7,6 +7,15 @@ SRC_URI += "file://mount_bootparts.sh" do_install_append() { install -m 0755 ${WORKDIR}/mount_bootparts.sh ${D}${sysconfdir}/udev/scripts/ + # Console tty symlink + if [ -n "${CON_TTY}" ]; then + printf "%s\n%s\n" \ + "# Symlink to the console tty" \ + "KERNEL==\"${CON_TTY}\", MODE=\"0660\", GROUP=\"dialout\", SYMLINK+=\"ttyS0\"" \ + >> ${D}${sysconfdir}/udev/rules.d/localextra.rules + fi + + # Bluetooth tty symlink if [ -n "${BT_TTY}" ]; then printf "%s\n%s\n" \ "# Symlink to the bluetooth tty" \ @@ -15,5 +24,8 @@ do_install_append() { fi } +# CON_TTY and BT_TTY depend on linux version so make it a signature dependence +do_install[vardeps] += "PREFERRED_VERSION_linux-dey" + # BT_TTY is machine specific (defined in machine config file) PACKAGE_ARCH = "${MACHINE_ARCH}"