diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-02-24 21:05:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-24 21:05:47 +0100 |
| commit | 1ebebdfadc9d9f5793f9f99bcadc72ac58bf70e9 (patch) | |
| tree | b423ffee7aeb797cbdadddf98c24850d32f07cb7 /data/templates | |
| parent | 557e1730b03638d3ee5e7a270d1958c436c8d917 (diff) | |
| parent | 33669098f2a63b4cd7d40aadb53d62a3d61c2e21 (diff) | |
| download | vyos-1x-1ebebdfadc9d9f5793f9f99bcadc72ac58bf70e9.tar.gz vyos-1x-1ebebdfadc9d9f5793f9f99bcadc72ac58bf70e9.zip | |
Merge pull request #4915 from sever-sever/T8120
T8120: Add support AMA console for ARM devices
Diffstat (limited to 'data/templates')
| -rw-r--r-- | data/templates/grub/grub_common.j2 | 2 | ||||
| -rw-r--r-- | data/templates/grub/grub_compat.j2 | 4 | ||||
| -rw-r--r-- | data/templates/grub/grub_options.j2 | 7 | ||||
| -rw-r--r-- | data/templates/grub/grub_vyos_version.j2 | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/data/templates/grub/grub_common.j2 b/data/templates/grub/grub_common.j2 index 5e9b95cc0..86fdbdf60 100644 --- a/data/templates/grub/grub_common.j2 +++ b/data/templates/grub/grub_common.j2 @@ -7,7 +7,7 @@ fi # create and activate serial console function setup_serial { # initialize the first serial port by default - if [ "${console_type}" == "ttyS" ]; then + if [ "${console_type}" = "ttyS" -o "${console_type}" = "ttyAMA" ]; then if [ "${console_num}" == "0" ]; then serial --unit=0 --speed=${console_speed} else diff --git a/data/templates/grub/grub_compat.j2 b/data/templates/grub/grub_compat.j2 index 8fb4f71dc..7f930a11f 100644 --- a/data/templates/grub/grub_compat.j2 +++ b/data/templates/grub/grub_compat.j2 @@ -12,7 +12,7 @@ {% macro console_name(type) -%} {% if type == 'tty' -%} KVM -{%- elif type == 'ttyS' -%} +{%- elif type == 'ttyS' or type == 'ttyAMA' -%} Serial {%- else -%} Unknown @@ -23,6 +23,8 @@ console=ttyS0,{{ console_speed }} console=tty0 {%- elif type == 'ttyS' -%} console=tty0 console=ttyS0,{{ console_speed }} +{%- elif type == 'ttyAMA' -%} + console=tty0 console=ttyAMA0,{{ console_speed }} {%- else -%} console=tty0 console=ttyS0,{{ console_speed }} {%- endif %} diff --git a/data/templates/grub/grub_options.j2 b/data/templates/grub/grub_options.j2 index a00bf4e37..0f2f15caf 100644 --- a/data/templates/grub/grub_options.j2 +++ b/data/templates/grub/grub_options.j2 @@ -28,7 +28,12 @@ submenu "Boot options" { configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg } menuentry "ttyS (serial)" { - set console_type="ttyS" + if [ "${grub_cpu}" = "arm64" ]; then + set serial_console="ttyAMA" + else + set serial_console="ttyS" + fi + set console_type="$serial_console" export console_type setup_serial configfile ${prefix}/grub.cfg.d/*vyos-menu*.cfg diff --git a/data/templates/grub/grub_vyos_version.j2 b/data/templates/grub/grub_vyos_version.j2 index de85f1419..c546670c2 100644 --- a/data/templates/grub/grub_vyos_version.j2 +++ b/data/templates/grub/grub_vyos_version.j2 @@ -11,7 +11,7 @@ {% endif %} menuentry "{{ version_name }}" --id {{ version_uuid }} { set boot_opts="{{ boot_opts_rendered }}" - if [ "${console_type}" == "ttyS" ]; then + if [ "${console_type}" == "ttyS" -o "${console_type}" == "ttyAMA" ]; then set console_opts="console=${console_type}${console_num},${console_speed}" else set console_opts="console=${console_type}${console_num}" |
