diff options
author | Loys Ollivier <lollivier@baylibre.com> | 2017-10-06 11:10:54 +0200 |
---|---|---|
committer | Loys Ollivier <lollivier@baylibre.com> | 2017-10-09 10:18:49 +0200 |
commit | d6c367c2847f300aab7feb1ac52c24f83ce6e304 (patch) | |
tree | 8b9a169ef0458d80c049ba4eb0c0d91a3fbd47d7 /templates/base | |
parent | 5bef8f20fbac8224d391ee3bea296f6e3b38c58d (diff) |
New boot type definition
Depending on the boot type (ramdisk or nbd), specify a boot method.
This change helps defining the correct boot type automatically from
the boot protocol (ramdisk or nbd).
Tested with m3ulcb (nbd) and raspberrypi3 (ramdisk).
Change-Id: I84845c2fa94b32cd53c91a5330b25505e7b60930
Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
Diffstat (limited to 'templates/base')
-rw-r--r-- | templates/base/agl-base-defaults.jinja2 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/base/agl-base-defaults.jinja2 b/templates/base/agl-base-defaults.jinja2 index f426211..462fb86 100644 --- a/templates/base/agl-base-defaults.jinja2 +++ b/templates/base/agl-base-defaults.jinja2 @@ -19,6 +19,16 @@ {%- set vcs_branch = vcs_branch|default("agl-branch") %} {%- set vcs_url = vcs_url|default(baseurl()) %} +{# Kernel type definition #} +{%- if kernel_image|first|lower == "i" %} + {%- set kernel_type = "image" %} +{%- elif kernel_image|first|lower == "z" %} + {%- set kernel_type = "zimage" %} +{%- else %} + {%- set kernel_type = "uimage" %} +{%- endif %} + +{# Image names definitions #} {%- if rootfs_type == 'nbd' %} {%- set initrd = initrd|default("initramfs-netboot-image-" + yocto_machine +".ext4.gz") %} {%- set boot_commands = "nbd" %} |