summaryrefslogtreecommitdiff
path: root/data/templates/grub/grub_vyos_version.j2
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-01-11 10:34:06 -0600
committerJohn Estabrook <jestabro@vyos.io>2024-01-11 13:52:21 -0600
commit70122bef58eaa0084695f89c410992f8d7c1f9f6 (patch)
tree98f72941995a2a378e4376b6380ece5dc7444e51 /data/templates/grub/grub_vyos_version.j2
parentebf8c8d750357122023a0c96b41072065f755c2e (diff)
downloadvyos-1x-70122bef58eaa0084695f89c410992f8d7c1f9f6.tar.gz
vyos-1x-70122bef58eaa0084695f89c410992f8d7c1f9f6.zip
image-tools: T5910: explicitly set transmission speed of serial console
GRUB defaults to 9600 in case of serial console; explicitly set to 115200.
Diffstat (limited to 'data/templates/grub/grub_vyos_version.j2')
-rw-r--r--data/templates/grub/grub_vyos_version.j211
1 files changed, 8 insertions, 3 deletions
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"