From 2afd5e5575a42bee4483e093e9611fa3363c8adc Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 12 Jan 2024 10:10:58 -0600 Subject: image-tools: T5923: update system_console.py for new GRUB file structure Add util function to set serial console speed in accordance with revised GRUB file structure; in keeping with the intentions of the config_mode script, adjust the GRUB var 'console_speed' to only modify ttyS0. (cherry picked from commit 5ceaff2ef970cb9c567ac317bafbffca5b073f4a) --- data/templates/grub/grub_common.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/templates/grub/grub_common.j2') diff --git a/data/templates/grub/grub_common.j2 b/data/templates/grub/grub_common.j2 index 29c2ab879..5e9b95cc0 100644 --- a/data/templates/grub/grub_common.j2 +++ b/data/templates/grub/grub_common.j2 @@ -8,7 +8,11 @@ fi function setup_serial { # initialize the first serial port by default if [ "${console_type}" == "ttyS" ]; then - serial --unit=${console_num} --speed=${console_speed} + if [ "${console_num}" == "0" ]; then + serial --unit=0 --speed=${console_speed} + else + serial --unit=${console_num} --speed=115200 + fi else serial --unit=0 --speed=${console_speed} fi -- cgit v1.2.3