board/raspberrypi/post-build.sh: let HDMI console depends on generic getty option
PATCH 1/1 board/raspberrypi/post-build.sh: let HDMI console depends on generic getty option
From: Christophe Blaess <[email protected]>
When the BR2_TARGET_GENERIC_GETTY option is disabled, the inittab line running getty on serial console is commented out. But the line running the HDMI console on Raspberry Pi is still enabled. With this patch the HDMI getty line is removed.
--- board/raspberrypi/post-build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
board/raspberrypi/post-build.sh +6 -2
@@ -5,7 +5,11 @@ set -e # Add a console on tty1 if [ -e ${TARGET_DIR}/etc/inittab ]; then - grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ - sed -i '/GENERIC_SERIAL/a\ + # Remove tty1 line from previous build. + sed -i '/^tty1::/d' ${TARGET_DIR}/etc/inittab + if grep -q '^BR2_TARGET_GENERIC_GETTY=y$' ${BR2_CONFIG}; then + # Add tty1 line after serial console. + sed -i '/GENERIC_SERIAL/a\ tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab + fi fi
Signature · 1 line
2.17.1
PATCH 1/1 board/raspberrypi/post-build.sh: let HDMI console depends on generic getty option
Quoted 8 lines · On Mon, 28 Oct 2019 10:01:50 +0100 Christophe Blaess <[email protected]> wrote:
From: Christophe Blaess <[email protected]>
When the
BR2_TARGET_GENERIC_GETTYoption is disabled, the inittab line running getty on serial console is commented out. But the line running the HDMI console on Raspberry Pi is still enabled. With this patch the HDMI getty line is removed.Signed-off-by Christophe Blaess <[email protected]>
I understand your idea, but I think it is misleading. Indeed, when you configure a getty with BR2_TARGET_GENERIC_GETTY, you configure on which tty device this getty will run, using sub-options. So when you disable this BR2_TARGET_GENERIC_GETTY option, you expect only that one getty to be disabled.
I don't think this should affect other gettys potentially enabled by the post-build script.
It is pretty uncommon in our defconfigs to have two gettys running. We did this for RaspberryPi because a number of newcomers build our defconfig, and test it on hardware without a serial port.
If you don't like to have this getty, just tweak the post-build, or add your own, etc. A defconfig provided by upstream Buildroot is anyway just a starting point to do your own thing.
Due to this, I'm going to mark this patch as Rejected in our patch tracking system. Of course, if others disagree or there are some stronger arguments, I'd definitely be willing to revisit this decision.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com