boards.io

mustang-grub-efi

Inheritance

  1. mustang-grub-efi
  2. base

Key facts

Vendor
Ampere / AppliedMicro
Bootloader family
UEFI
Architecture
Arm 64-bit (AArch64) (guessed from the name)
Console device
ttyS0
Baud rate
115200
Connections
serial, ssh

Deploy methods

sata tftp ssh

Boot methods

ssh grub-efi uefi-menu

Boot commands

grub-efi
menu_options, ramdisk, installed, nfs, sata
uefi-menu
menu_options, pxe-grub

Overridable variables (4)

Variables set with a default value in this template. They can be overridden from the device dictionary or, for some of them, from the job context.

VariableDefault
boot_character_delay10
console_device'ttyS0'
baud_rate115200
grub_efi_method'pxe-grub'

Fixed settings (10)

VariableValue
base_ip_args'ip=:::::eth0:dhcp'
action_timeout_power_off20
base_menu_interrupt_promptmenu_interrupt_prompt | default(base_menu_interrupt_prompt)
base_menu_interrupt_stringmenu_interrupt_string | default(base_menu_interrupt_string)
base_item_markup_listitem_markup | default(base_item_markup_list)
base_item_classitem_class | default(base_item_class)
base_item_separatoritem_separator | default(base_item_separator)
base_label_classlabel_class | default(base_label_class)
base_menu_bootloader_promptbootloader_prompt | default(base_menu_bootloader_prompt)
base_menu_boot_messageboot_message | default(base_menu_boot_message)
{# device_type: mustang #}
{% extends 'base.jinja2' %}
{% set boot_character_delay = boot_character_delay | default(10) %}
{% set base_ip_args = 'ip=:::::eth0:dhcp' %}
{% set console_device = console_device | default('ttyS0') -%}
{% set baud_rate = baud_rate | default(115200) -%}
{% set action_timeout_power_off = 20 %}

{# method is 'pxe-grub' or 'grub' currently - see menu uefi-menu block #}
{% set grub_efi_method = grub_efi_method|default('pxe-grub') %}

{# allow job context override - use a different variable name, undefined if not in job context #}
{% set base_menu_interrupt_prompt = menu_interrupt_prompt | default(base_menu_interrupt_prompt) -%}
{% set base_menu_interrupt_string = menu_interrupt_string | default(base_menu_interrupt_string) -%}
{% set base_item_markup_list = item_markup | default(base_item_markup_list) -%}
{% set base_item_class = item_class | default(base_item_class) -%}
{% set base_item_separator = item_separator | default(base_item_separator) -%}
{% set base_label_class = label_class | default(base_label_class) -%}
{% set base_menu_bootloader_prompt = bootloader_prompt | default(base_menu_bootloader_prompt) -%}
{% set base_menu_boot_message = boot_message | default(base_menu_boot_message) -%}

{% block body %}

actions:
  deploy:
    connections:
      serial:
    methods:
      sata:
      tftp:
      ssh:
        options:
{{ ssh_options }}
        host: '{{ ssh_host|default('') }}'
        user: {{ ssh_user|default('root') }}
        port: {{ ssh_port|default(22) }}
        identity_file: {{ ssh_identity_file }}
  boot:
     connections:
       serial:
       ssh:
     methods:
      ssh:
      grub-efi:
        menu_options: {{ grub_efi_method }}
        parameters:
          bootloader_prompt: {{ grub_efi_bootloader_prompt|default('grub>') }}
        ramdisk:
          commands:
          - insmod gzio
{% if grub_efi_method == 'grub' %}
          - insmod efinet
          - net_bootp
{% endif %}
          - linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
            root=/dev/ram0 rw {{ base_ip_args }} {{ extra_kernel_args }}
          - initrd (tftp,{SERVER_IP})/{RAMDISK}
          - boot
        installed:
          commands:
          - insmod gzio
{% if grub_efi_method == 'grub' %}
          - insmod efinet
          - net_bootp
{% endif %}
          - linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
            root={{ root_uuid|default('/dev/sda2') }} rw {{ base_ip_args }} {{ extra_kernel_args }}
          - initrd (tftp,{SERVER_IP})/{RAMDISK}
          - boot
        nfs:
          commands:
          - insmod gzio
{% if grub_efi_method == 'grub' %}
          - insmod efinet
          - net_bootp
{% endif %}
          - 'linux (tftp,{SERVER_IP})/{KERNEL} console={{ console_device }},{{ baud_rate }}n8 debug
            root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_ip_args }} {{ extra_kernel_args }}'
          - initrd (tftp,{SERVER_IP})/{RAMDISK}
          - boot
        sata:
          commands:
          - insmod gzio
          - linux ({{ sata_interface|default('hd0') }},{{ boot_part|default('gpt1') }})/{KERNEL}
            console={{ console_device }},{{ baud_rate }}n8 debug
            root={{ root_uuid|default('/dev/sda2') }} rw {{ base_ip_args }} {{ extra_kernel_args }}
          - initrd ({{ sata_interface|default('hd0') }},{{ boot_part|default('gpt1') }}/{RAMDISK}
          - boot
      uefi-menu:
        menu_options: {{ grub_efi_method }}
        parameters:
          interrupt_prompt: {{ base_menu_interrupt_prompt }}
          interrupt_string: '{{ base_menu_interrupt_string }}'
          item_markup:
{{ base_item_markup_list }}
          item_class: '{{ base_item_class }}'
          separator: '{{ base_item_separator }}'
          bootloader_prompt: '{{ base_menu_bootloader_prompt }}'
{% if grub_efi_method == 'pxe-grub' %}
        pxe-grub:
        - select:
            items:
            - '{{ grub_efi_pxe_menu_item|default('LAVA PXE Grub') }}'
{% elif grub_efi_method == 'grub' %}
        grub:
        - select:
            items:
            - '{{ grub_efi_grub_menu_item|default('Local ERP Grub') }}'
{% endif %}
{% endblock body %}

Rendered with the default values (no device dictionary), using LAVA's own template environment.