diff --git a/meta-digi-arm/conf/machine/ccardimx28js.conf b/meta-digi-arm/conf/machine/ccardimx28js.conf index e4adec5bc..36d262562 100644 --- a/meta-digi-arm/conf/machine/ccardimx28js.conf +++ b/meta-digi-arm/conf/machine/ccardimx28js.conf @@ -10,7 +10,7 @@ KERNEL_DEVICETREE = "imx28-${MACHINE}.dtb" # Use standard serial port name and let device handlers (mdev, udev) # create a symlink to the correct device. -SERIAL_CONSOLE = "115200 ttyS0" +SERIAL_CONSOLES = "115200;ttyS0" # Use our wmiconfig instead of the one in meta-oe PREFERRED_VERSION_wmiconfig ?= "3.4p4" diff --git a/meta-digi-arm/conf/machine/ccimx51js.conf b/meta-digi-arm/conf/machine/ccimx51js.conf index 8dced291a..a750ea455 100644 --- a/meta-digi-arm/conf/machine/ccimx51js.conf +++ b/meta-digi-arm/conf/machine/ccimx51js.conf @@ -4,7 +4,7 @@ include conf/machine/include/ccimx51.inc -SERIAL_CONSOLE = "38400 ttymxc1" +SERIAL_CONSOLES = "38400;ttymxc1" ################################################# ## Flash parameters for JFFS2 and UBIFS images ## diff --git a/meta-digi-arm/conf/machine/ccimx53js.conf b/meta-digi-arm/conf/machine/ccimx53js.conf index 0ae3dba90..11f2ceee8 100644 --- a/meta-digi-arm/conf/machine/ccimx53js.conf +++ b/meta-digi-arm/conf/machine/ccimx53js.conf @@ -5,7 +5,7 @@ # Contains the ConnectCore for MX53 module. include conf/machine/include/ccimx53.inc -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" ################################################# ## Flash parameters for JFFS2 and UBIFS images ## diff --git a/meta-digi-dey/classes/dey-image.bbclass b/meta-digi-dey/classes/dey-image.bbclass index fd7cd1ed1..527db9855 100644 --- a/meta-digi-dey/classes/dey-image.bbclass +++ b/meta-digi-dey/classes/dey-image.bbclass @@ -68,12 +68,25 @@ dey_rootfs_tuning() { exec /bin/login -f root _EOF_ chmod u+x ${IMAGE_ROOTFS}/sbin/rootlogin - sed -i -e ' - /^S.*getty/{ - i\## WARNING: passwordless 'root' autologin enabled - a\~~::sysinit:/usr/sbin/telnetd -l /sbin/rootlogin - s,getty,getty -n -l /sbin/rootlogin,g - }' ${IMAGE_ROOTFS}/etc/inittab + + # The 'echo' trick is needed because the SERIAL_CONSOLES variable + # is expanded by bitbake and contains a semicolon ';' + for i in $(echo "${SERIAL_CONSOLES}"); do + label="$(echo $i | sed -e 's,.*tty\(.*\),\1,g')" + sed -i -e " + /^$label:.*getty/{ + i\## WARNING: passwordless 'root' autologin enabled + s,getty,getty -n -l /sbin/rootlogin,g + }" ${IMAGE_ROOTFS}/etc/inittab + done + + # Install a telnetd daemon if there isn't one + if ! grep -qs telnetd ${IMAGE_ROOTFS}/etc/inittab; then + cat >>${IMAGE_ROOTFS}/etc/inittab <<-_EOF_ + ## WARNING: passwordless 'root' telnet daemon + ~~::sysinit:/usr/sbin/telnetd -l /sbin/rootlogin + _EOF_ + fi rm -f ${IMAGE_ROOTFS}/etc/securetty fi fi