diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-01-12 15:48:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 15:48:11 +0000 |
commit | 4df792f23ea229eb43dbbdb29088354519ef9596 (patch) | |
tree | 5ef774412ab5eab8c9f152a703c1d476423d5c78 /data | |
parent | bc3cf0a0a18ad70448322f90bdb6bf8292b59ccf (diff) | |
parent | 70122bef58eaa0084695f89c410992f8d7c1f9f6 (diff) | |
download | vyos-1x-4df792f23ea229eb43dbbdb29088354519ef9596.tar.gz vyos-1x-4df792f23ea229eb43dbbdb29088354519ef9596.zip |
Merge pull request #2806 from jestabro/serial-console
image-tools: T5910: explicitly set transmission speed of serial console
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/grub/grub_common.j2 | 4 | ||||
-rw-r--r-- | data/templates/grub/grub_vyos_version.j2 | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/data/templates/grub/grub_common.j2 b/data/templates/grub/grub_common.j2 index 278ffbf2c..29c2ab879 100644 --- a/data/templates/grub/grub_common.j2 +++ b/data/templates/grub/grub_common.j2 @@ -8,9 +8,9 @@ fi function setup_serial { # initialize the first serial port by default if [ "${console_type}" == "ttyS" ]; then - serial --unit=${console_num} + serial --unit=${console_num} --speed=${console_speed} else - serial --unit=0 + serial --unit=0 --speed=${console_speed} fi terminal_output --append serial console terminal_input --append serial console diff --git a/data/templates/grub/grub_vyos_version.j2 b/data/templates/grub/grub_vyos_version.j2 index 97fbe8473..62688e68b 100644 --- a/data/templates/grub/grub_vyos_version.j2 +++ b/data/templates/grub/grub_vyos_version.j2 @@ -6,16 +6,21 @@ {% endif %} menuentry "{{ version_name }}" --id {{ version_uuid }} { set boot_opts="{{ boot_opts_rendered }}" + if [ "${console_type}" == "ttyS" ]; then + set console_opts="console=${console_type}${console_num},${console_speed}" + else + set console_opts="console=${console_type}${console_num}" + fi # load rootfs to RAM if [ "${boot_toram}" == "yes" ]; then set boot_opts="${boot_opts} toram" fi if [ "${bootmode}" == "pw_reset" ]; then - set boot_opts="${boot_opts} console=${console_type}${console_num} init=/usr/libexec/vyos/system/standalone_root_pw_reset" + set boot_opts="${boot_opts} ${console_opts} init=/usr/libexec/vyos/system/standalone_root_pw_reset" elif [ "${bootmode}" == "recovery" ]; then - set boot_opts="${boot_opts} console=${console_type}${console_num} init=/usr/bin/busybox init" + set boot_opts="${boot_opts} ${console_opts} init=/usr/bin/busybox init" else - set boot_opts="${boot_opts} console=${console_type}${console_num}" + set boot_opts="${boot_opts} ${console_opts}" fi linux "/boot/{{ version_name }}/vmlinuz" ${boot_opts} initrd "/boot/{{ version_name }}/initrd.img" |