Skip to content

Commit

Permalink
scarthgap: fix the consoles
Browse files Browse the repository at this point in the history
SERIAL_CONSOLES in scarthgap no longer allow passing any argument to
getty and only supports baudrate;tty. Just write the inittab config
lines directly to the inittab file instead. Lines are seperated by
a | character and trimmed.
  • Loading branch information
jhofstee committed Feb 13, 2025
1 parent 94364e3 commit 0b206d7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion meta-bsp/conf/machine/beaglebone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ KERNEL_PACKAGES = "kernel-image kernel-modules"
# Used by wic
IMAGE_BOOT_FILES ?= "${UBOOT_IMAGE} MLO uEnv.txt"

SERIAL_CONSOLES = "-l;/sbin/autologin;-n;115200;ttyO0"
INITTAB = "O0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttyO0 vt102"
USE_VT = "0"
2 changes: 1 addition & 1 deletion meta-bsp/conf/machine/canvu500.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ UBI_VOLNAME = "rootfs"
MKUBIFS_ARGS = "-m 4096 -e 253952 -c 1024"
UBINIZE_ARGS = "-m 4096 -p 256KiB"

SERIAL_CONSOLES = "-l;/sbin/autologin;-n;115200;ttymxc0"
INITTAB = "S0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttymxc0 vt102"
USE_VT = "0"
2 changes: 1 addition & 1 deletion meta-bsp/conf/machine/ccgx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IMAGE_FSTYPES += "tar.gz ext3 ubifs live-img.gz"
FSTAB = "ubi"

# parameters for sysvinit inittab, disabled on purpose, used for ve.direct
#SERIAL_CONSOLES = "-l /sbin/autologin -n 115200 ttyO0"
# INITTAB = "S0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttyO0 vt102"

# Enable use of virtual terminal for LCD on tty1 if USE_VT = "1"
USE_VT = "0"
5 changes: 4 additions & 1 deletion meta-bsp/conf/machine/raspberrypi2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ DEFAULTTUNE = "cortexa7hf-neon-vfpv4"
require conf/machine/include/arm/armv7a/tune-cortexa7.inc
require conf/machine/include/rpi-base.inc

SERIAL_CONSOLES = "-l;/sbin/autologin;-n;115200;ttyAMA0 -l;/sbin/autologin;-n;38400;tty1"
INITTAB = " \
AMA0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttyAMA0 vt102 | \
1:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 38400 tty1 vt102 \
"
USE_VT = "0"

UBOOT_MACHINE = "rpi_2_config"
Expand Down
5 changes: 4 additions & 1 deletion meta-bsp/conf/machine/raspberrypi4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ KERNEL_CONFIG = "bcm2711_defconfig"
RPI_KERNEL_DEVICETREE_DTB = "bcm2711-rpi-4-b.dtb"

UBOOT_MACHINE = "rpi_4_32b_config"
SERIAL_CONSOLES ?= "-l;/sbin/autologin;-n;115200;ttyS0 -l;/sbin/autologin;-n;38400;tty1"

INITTAB = " \
S0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttyS0 vt102 | \
1:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 38400 tty1 vt102 \
"
2 changes: 1 addition & 1 deletion meta-bsp/conf/machine/sunxi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ KERNEL_PACKAGES = "kernel-image kernel-modules"
SDIMAGE_BOOT_FILE = "u-boot-sunxi-with-spl.bin"
SDIMAGE_BOOT_FILE_OFFS = "8"

SERIAL_CONSOLES = "-l;/sbin/autologin;-n;115200;ttyS0"
INITTAB = "S0:12345:respawn:/sbin/getty -L -l /sbin/autologin -n 115200 ttyS0 vt102"
USE_VT = "0"

VENUS_GPU = "1"
9 changes: 8 additions & 1 deletion meta-venus/recipes-core/sysvinit/sysvinit-inittab_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ do_install:append () {
install -d ${D}/${base_sbindir}
install -m 0755 ${UNPACKDIR}/autologin ${D}/${base_sbindir}

sed -i -e 's:/bin/start_getty:/sbin/getty -L:' ${D}${sysconfdir}/inittab
ORIG_IFS="$IFS"
IFS='|'
inittab="${INITTAB}"
for line in $inittab; do
line="$(printf "%s" "$line" | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')"
printf "%s\n" "$line" >> ${D}${sysconfdir}/inittab
done
IFS="${ORIG_IFS}"
}

FILES:${PN} += "${base_sbindir}"

0 comments on commit 0b206d7

Please sign in to comment.