From c33540030b899cde825fd3f9c3e7917609157f93 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 4 Oct 2013 13:57:32 +0200 Subject: [PATCH] meta-digi-dey: ccardimx28: use standard serial port for console In ccardimx28 depending on the kernel version the console is on 'ttyAM0' or 'ttyAMA0'. Use the standard serial port name ttyS0 for login (through inittab) and let the device handlers create the symlink to the correct device. This allows to boot the same rootfs regardless of the kernel version. Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccardimx28js.conf | 6 ++++-- .../recipes-core/busybox/busybox-1.20.2/mdev.conf | 10 ++++------ .../recipes-core/udev/udev-extraconf/10-imx.rules | 4 ++++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccardimx28js.conf b/meta-digi-arm/conf/machine/ccardimx28js.conf index a30fe79b3..ecd66c99b 100644 --- a/meta-digi-arm/conf/machine/ccardimx28js.conf +++ b/meta-digi-arm/conf/machine/ccardimx28js.conf @@ -5,8 +5,10 @@ include conf/machine/include/ccardimx28.inc DTSNAME = "imx28-${MACHINE}" -SERIAL_CONSOLE_DEVICE = "${@base_conditional('IS_KERNEL_2X', '1' , 'ttyAM0', 'ttyAMA0', d)}" -SERIAL_CONSOLE = "115200 ${SERIAL_CONSOLE_DEVICE}" + +# Use standard serial port name and let device handlers (mdev, udev) +# create a symlink to the correct device. +SERIAL_CONSOLE = "115200 ttyS0" # Use our wmiconfig instead of the one in meta-oe PREFERRED_VERSION_wmiconfig ?= "3.4p4" diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev.conf b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev.conf index 59f4395b4..1e947b79c 100644 --- a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev.conf +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/mdev.conf @@ -6,12 +6,10 @@ mmcblk[0-9]+p[0-9]+ 0:0 0660 */lib/mdev/mmc ttyNS([0-9]) 0:0 0660 >ttyS%1 ttySAC([0-9]) 0:0 0660 >ttyS%1 ttymxc([0-9]) 0:0 0660 >ttyS%1 -ttyAM0 0:0 0660 >ttyS0 -ttyAMA0 0:0 0660 >ttyS0 -ttySP0 0:0 0660 >ttyBt -ttySP([1-9]) 0:0 0660 >ttyS%1 -ttyAPP0 0:0 0660 >ttyBt -ttyAPP([1-9]) 0:0 0660 >ttyS%1 +ttyAMA?0 0:0 0660 @ln -s ${MDEV} ttyS0 +tty(SP|APP)0 0:0 0660 @ln -s ${MDEV} ttyBt +ttyAPP([1-9]) 0:0 0660 @ln -s ${MDEV} ${MDEV/APP/S} +ttySP([1-9]) 0:0 0660 @ln -s ${MDEV} ${MDEV/SP/S} # old Samsung serial port name (for backwards compatibility) s3c2410_serial([0-9]) 0:0 0660 >ttyS%1 diff --git a/meta-digi-dey/recipes-core/udev/udev-extraconf/10-imx.rules b/meta-digi-dey/recipes-core/udev/udev-extraconf/10-imx.rules index a1938b4ff..4d382a794 100644 --- a/meta-digi-dey/recipes-core/udev/udev-extraconf/10-imx.rules +++ b/meta-digi-dey/recipes-core/udev/udev-extraconf/10-imx.rules @@ -22,5 +22,9 @@ KERNEL=="fb2", MODE="0666" KERNEL=="mxc_vpu", MODE="0666" SUBSYSTEM=="video", MODE="0666" KERNEL=="gsl_kmod", MODE="0666" + +# MXS serial port rules +KERNEL=="ttyAM0", MODE="0660", SYMLINK+="ttyS0" +KERNEL=="ttyAMA0", MODE="0660", SYMLINK+="ttyS0" KERNEL=="ttySP0", MODE="0660", SYMLINK+="ttyBt" KERNEL=="ttyAPP0", MODE="0660", SYMLINK+="ttyBt"