Skip to contentSkip to conversation

minnowboard-max: Enable serial and HDMI consoles

PATCH New Ezequiel Garcia 2 participants 3 messages Jun 21, 2016 – Jun 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minnowboard-max: Enable serial and HDMI consoles

Following what's done in Raspberry Pi's defconfigs, let's unify the consoles in Minnowboard Max defconfigs, providing consoles on HDMI and serial port.

---
 board/minnowboard/post-build.sh             | 5 +++++
 board/minnowboard/readme.txt                | 3 +++
 configs/minnowboard_max-graphical_defconfig | 1 -
 configs/minnowboard_max_defconfig           | 1 -
 4 files changed, 8 insertions(+), 2 deletions(-)
board/minnowboard/post-build.sh +5 -0
index f3a11e99f0f5..f03a607b9b4d 100755
@@ -3,3 +3,8 @@
 # $2    board name
 
 cp -v board/minnowboard/grub-${2}.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
+
+# Add a console on tty1
+grep -qE '^tty0::' ${TARGET_DIR}/etc/inittab || \
+sed -i '/GENERIC_SERIAL/a\
+tty0::respawn:/sbin/getty -L  tty0 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
board/minnowboard/readme.txt +3 -0
index 8cf35b79c562..f76cd77c3403 100644
@@ -23,6 +23,9 @@ How to get started with the MinnowBoard (MAX)
 
   $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync
 
+  The system starts two consoles: one on the serial port
+  and one on HDMI.
+
 3. Enjoy
 
 Additional information about this board can be found at
configs/minnowboard_max-graphical_defconfig +0 -1
index a5f60a7e3c68..d84544be86c5 100644
@@ -9,7 +9,6 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y
 
 # System configuration
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
-BR2_TARGET_GENERIC_GETTY_PORT="tty0"
 BR2_ROOTFS_OVERLAY="board/minnowboard/fs-overlay-graphical"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard/post-image.sh"
configs/minnowboard_max_defconfig +0 -1
index 1bb22f9ec132..0adb382f0c4b 100644
@@ -3,7 +3,6 @@ BR2_x86_64=y
 BR2_x86_atom=y
 
 # Misc
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_SYSTEM_DHCP="eth0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard/post-image.sh"
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 minnowboard-max: Enable serial and HDMI consoles

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ezequiel" == Ezequiel Garcia <[email protected]> writes:

Following what's done in Raspberry Pi's defconfigs, let's unify the consoles in Minnowboard Max defconfigs, providing consoles on HDMI and serial port.

---
 board/minnowboard/post-build.sh             | 5 +++++
 board/minnowboard/readme.txt                | 3 +++
 configs/minnowboard_max-graphical_defconfig | 1 -
 configs/minnowboard_max_defconfig           | 1 -
 4 files changed, 8 insertions(+), 2 deletions(-)
board/minnowboard/post-build.sh +0 -0
index f3a11e99f0f5..f03a607b9b4d 100755

board/minnowboard/post-build.sh line 10

Quoted 8 lines
board/minnowboard/post-build.sh +5 -0
@@ -3,3 +3,8 @@
 # $2    board name
 
 cp -v board/minnowboard/grub-${2}.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
+
+# Add a console on tty1
+grep -qE '^tty0::' ${TARGET_DIR}/etc/inittab || \
+sed -i '/GENERIC_SERIAL/a\
+tty0::respawn:/sbin/getty -L  tty0 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab

The comment says tty1 but you are using tty0. tty0 is afaik the currently active console, and tty1 the one on alt-f1. Rpi uses tty1, so I changed it here as well for consistency.

Committed with that fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 minnowboard-max: Enable serial and HDMI consoles

Quoted 21 lines · Peter Korsgaard
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ezequiel" == Ezequiel Garcia <[email protected]> writes:

Following what's done in Raspberry Pi's defconfigs, let's unify the consoles in Minnowboard Max defconfigs, providing consoles on HDMI and serial port.

---
 board/minnowboard/post-build.sh             | 5 +++++
 board/minnowboard/readme.txt                | 3 +++
 configs/minnowboard_max-graphical_defconfig | 1 -
 configs/minnowboard_max_defconfig           | 1 -
 4 files changed, 8 insertions(+), 2 deletions(-)
board/minnowboard/post-build.sh +0 -0
index f3a11e99f0f5..f03a607b9b4d 100755
@@ -3,3 +3,8 @@
 # $2    board name
Quoted 11 lines

board/minnowboard/post-build.sh line 10

Quoted 6 lines
board/minnowboard/post-build.sh +5 -0
 cp -v board/minnowboard/grub-${2}.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
+
+# Add a console on tty1
+grep -qE '^tty0::' ${TARGET_DIR}/etc/inittab || \
+sed -i '/GENERIC_SERIAL/a\
+tty0::respawn:/sbin/getty -L  tty0 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab

The comment says tty1 but you are using tty0. tty0 is afaik the currently active console, and tty1 the one on alt-f1. Rpi uses tty1, so I changed it here as well for consistency.

I like to be able to log right into the active console. On the other side, consistency is good.

Quoted 2 lines

Committed with that fixed, thanks.

Cool, thanks for the fixes.

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar