meta-digi-arm: configure the console for ccardimx28js dynamically

Revert to the old way of setting the console for ccardimx28js. Configure
the console on the generic ttyS0 port name and let the device managers
create a symbolic link to the correct device at runtime.

Trying to set it statically at compile time lead to some side effects
with some packages not being recompiled after a change of the preferred
kernel version in the project's local.conf (e.g. udev-extraconf and
sysvinit-inittab).

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2015-01-13 17:17:49 +01:00
parent d8a24e0ce3
commit d206fc1d11
2 changed files with 19 additions and 2 deletions

View File

@ -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"

View File

@ -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}"