diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh new file mode 100755 index 0000000000..7eae14a885 --- /dev/null +++ b/board/raspberrypi/post-build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ +sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig index 506330cd07..7fc39c234c 100644 --- a/configs/raspberrypi2_defconfig +++ b/configs/raspberrypi2_defconfig @@ -5,7 +5,6 @@ BR2_ARM_FPU_NEON_VFPV4=y BR2_TOOLCHAIN_BUILDROOT_CXX=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" BR2_SYSTEM_DHCP="eth0" # Linux headers same as kernel, a 4.1 series @@ -33,4 +32,5 @@ BR2_PACKAGE_HOST_MTOOLS=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi2/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi2/post-image.sh" diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 1795b2c03d..8d13381105 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -2,7 +2,6 @@ BR2_arm=y BR2_arm1176jzf_s=y BR2_ARM_EABIHF=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" BR2_SYSTEM_DHCP="eth0" # Linux headers same as kernel, a 4.1 series @@ -32,4 +31,5 @@ BR2_PACKAGE_HOST_MTOOLS=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh" diff --git a/package/rpi-firmware/cmdline.txt b/package/rpi-firmware/cmdline.txt index 38aa378262..155a54693b 100644 --- a/package/rpi-firmware/cmdline.txt +++ b/package/rpi-firmware/cmdline.txt @@ -1 +1 @@ -root=/dev/mmcblk0p2 rootwait +root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200