Commit cf68e037 authored by Guillaume Tucker's avatar Guillaume Tucker

device-types: define block commands in base-grub.jinja2

In order to be able to use base-grub.jinja2 with devices that require
different GRUB commands, define the ramdisk and nfs boot commands as
part of Jinja2 blocks.  This allows device types that extend base-grub
to define their own.

Change-Id: I6318e989913ddca312557d2d007a2f21c9fc7cb3
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <guillaume.tucker@collabora.com>
parent 245ced53
......@@ -65,25 +65,29 @@ actions:
bootloader_prompt: {{ bootloader_prompt|default('grub>') }}
ramdisk:
commands:
{% block ramdisk_commands %}
{{ net_commands }}
- clear
- insmod linux
- clear
- insmod tftp
- clear
- 'linux (tftp,{SERVER_IP})/{KERNEL} {{ console_args }} {{ base_ip_args }} {{ base_kernel_args }}'
- 'linux (tftp,{SERVER_IP})/{KERNEL} {{ console_args }} {{ base_ip_args }} {{ base_kernel_args }}'
- clear
- initrd (tftp,{SERVER_IP})/{RAMDISK}
{{ dtb_commands }}
- clear
- boot
{% endblock ramdisk_commands %}
nfs:
commands:
{% block nfs_commands %}
{{ net_commands }}
- 'linux (tftp,{SERVER_IP})/{KERNEL} {{ console_args }} root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_ip_args }} {{ base_kernel_args }}'
- initrd (tftp,{SERVER_IP})/{RAMDISK}
{{ dtb_commands }}
- boot
{% endblock nfs_commands %}
debian-installer:
expect_shell: False
commands:
......@@ -109,4 +113,4 @@ actions:
- chainloader {{ grub_installed_device }}/efi/debian/grubaa64.efi
- sleep 10
- boot
{% endblock %}
{% endblock body %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment