summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLoys Ollivier <lollivier@baylibre.com>2017-10-05 18:41:07 +0200
committerLoys Ollivier <lollivier@baylibre.com>2017-10-06 11:56:09 +0200
commit0b427702e5f32f8573620a6770cb234bc31e2415 (patch)
tree3e485affca826d1449be4bfaa7d1a9a148c6e444 /templates
parentd32e1ebcafc22434624ec6ae68bd404bb088a513 (diff)
New arguments to specify build artifacts names
Added new command line arguments to specifiy build artifacts names: - "--rootfs-img": for the rootfs file name - "--kernel-img": for the kernel name - "--dtb-img": for the dtb file name - "--modules-img": for the modules file name Change-Id: I665dee2b326aeaaf35148345f0501e49950ba9aa Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/base/agl-base-defaults.jinja236
-rw-r--r--templates/boot/generic-uboot-tftp.jinja29
-rw-r--r--templates/machines/dra7xx-evm.jinja24
-rw-r--r--templates/machines/m3ulcb.jinja24
-rw-r--r--templates/machines/porter.jinja24
-rw-r--r--templates/machines/raspberrypi3.jinja211
6 files changed, 37 insertions, 31 deletions
diff --git a/templates/base/agl-base-defaults.jinja2 b/templates/base/agl-base-defaults.jinja2
index 7f75a76..f426211 100644
--- a/templates/base/agl-base-defaults.jinja2
+++ b/templates/base/agl-base-defaults.jinja2
@@ -18,27 +18,29 @@
{%- set rootfs_type = rootfs_type|default("ramdisk") %}
{%- set vcs_branch = vcs_branch|default("agl-branch") %}
{%- set vcs_url = vcs_url|default(baseurl()) %}
-{%- if dtb %}
-{%- set dtb_url = dtb_url|default(baseurl(dtb)) %}
-{%- endif %}
-{%- if modules %}
-{%- set modules_compression = modules_compression|default(modules|get_extension) %}
-{%- set modules_url = modules_url|default(baseurl(modules)) %}
-{%- endif %}
+
{%- if rootfs_type == 'nbd' %}
-{%- set boot_commands = "nbd" %}
-{%- set deploy_to = "nbd" %}
-{%- set nbdinitrd = nbdinitrd|default("initramfs-netboot-image-" + yocto_machine +".ext4.gz") %}
-{%- set nbdinitrd_url = nbdinitrd_url|default(baseurl(nbdinitrd)) %}
-{%- set nbdroot = rfs_image|default("core-image-minimal-" + yocto_machine + ".ext4.xz") %}
-{%- set nbdroot_compression = nbdroot_compression|default(nbdroot|get_extension) %}
-{%- set nbdroot_url = nbdroot_url|default(baseurl(nbdroot)) %}
+ {%- set initrd = initrd|default("initramfs-netboot-image-" + yocto_machine +".ext4.gz") %}
+ {%- set boot_commands = "nbd" %}
+ {%- set deploy_to = "nbd" %}
+ {%- set rootfs = rfs_image|default("core-image-minimal-" + yocto_machine + ".ext4.xz") %}
+ {%- set rootfs_compression = (rootfs|get_extension) %}
+ {%- set rootfs_url = rootfs_url|default(baseurl(rootfs)) %}
{%- elif rootfs_type == 'ramdisk' %}
-{%- set initrd = rfs_image|default("initramfs-boot-image-" + yocto_machine + ".gz") %}
-{%- set initrd_compression = initrd_compression|default(initrd|get_extension) %}
+ {%- set initrd = rfs_image|default("initramfs-boot-image-" + yocto_machine + ".gz") %}
{%- endif %}
-{%- if initrd %}
+
+{%- set initrd_compression = (initrd|get_extension) %}
{%- set initrd_url = initrd_url|default(baseurl(initrd)) %}
+
+{%- if modules %}
+ {%- set modules_compression = (modules|get_extension) %}
+ {%- set modules_url = modules_url|default(baseurl(modules)) %}
+{%- endif %}
+
+{%- if dtb %}
+ {%- set dtb_url = dtb_url|default(baseurl(dtb)) %}
{%- endif %}
+
{%- block job %}
{%- endblock %}
diff --git a/templates/boot/generic-uboot-tftp.jinja2 b/templates/boot/generic-uboot-tftp.jinja2
index a7fa6ce..0f0f9e2 100644
--- a/templates/boot/generic-uboot-tftp.jinja2
+++ b/templates/boot/generic-uboot-tftp.jinja2
@@ -24,13 +24,12 @@ protocols:
url: {{ kernel_url }}
{%- if rootfs_type == 'nbd' %}
initrd:
- url: {{ nbdinitrd_url }}
+ url: {{ initrd_url }}
allow_modify: false
nbdroot:
- url: {{ nbdroot_url }}
- compression: {{ nbdroot_compression }}
-{%- endif %}
-{%- if initrd_url and rootfs_type != 'nbd' %}
+ url: {{ rootfs_url }}
+ compression: {{ rootfs_compression }}
+{%- elif rootfs_type == 'ramdisk' %}
ramdisk:
url: {{ initrd_url }}
compression: {{ initrd_compression }}
diff --git a/templates/machines/dra7xx-evm.jinja2 b/templates/machines/dra7xx-evm.jinja2
index b4f4f34..ae3d97b 100644
--- a/templates/machines/dra7xx-evm.jinja2
+++ b/templates/machines/dra7xx-evm.jinja2
@@ -1,6 +1,6 @@
{%- extends 'boot/generic-uboot-tftp.jinja2' %}
{%- set device_type = "ti-vayu-uboot" %}
-{%- set dtb = "zImage-dra7-evm-lcd-lg.dtb" %}
-{%- set kernel_image = "zImage" %}
+{%- set dtb = dtb|default("zImage-dra7-evm-lcd-lg.dtb") %}
+{%- set kernel_image = kernel_image|default("zImage") %}
{%- set rootfs_type = rootfs_type|default("nbd") %}
{%- set uboot_type = "bootz" %}
diff --git a/templates/machines/m3ulcb.jinja2 b/templates/machines/m3ulcb.jinja2
index 568706e..16a3e76 100644
--- a/templates/machines/m3ulcb.jinja2
+++ b/templates/machines/m3ulcb.jinja2
@@ -3,7 +3,7 @@
{%- set device_mach = "renesas" %}
{%- set device_type = "r8a7796-m3ulcb" %}
{%- set dl_dir = "m3ulcb-nogfx" %}
-{%- set dtb = "Image-r8a7796-m3ulcb.dtb" %}
-{%- set kernel_image = "Image" %}
+{%- set dtb = dtb|default("Image-r8a7796-m3ulcb.dtb") %}
+{%- set kernel_image = kernel_image|default("Image") %}
{%- set rootfs_type = rootfs_type|default("nbd") %}
{%- set uboot_type = "booti" %}
diff --git a/templates/machines/porter.jinja2 b/templates/machines/porter.jinja2
index f5d3aeb..1ad6e7b 100644
--- a/templates/machines/porter.jinja2
+++ b/templates/machines/porter.jinja2
@@ -1,6 +1,6 @@
{%- extends 'boot/generic-uboot-tftp.jinja2' %}
{%- set device_type = "renesas-porter-uboot" %}
{%- set dl_dir = "porter-nogfx" %}
-{%- set dtb = "uImage-r8a7791-porter.dtb" %}
-{%- set nbdinitrd = "initramfs-netboot-image-" + yocto_machine +".ext4.gz.u-boot" %}
+{%- set dtb = dtb|default("uImage-r8a7791-porter.dtb") %}
+{%- set initrd = initrd|default("initramfs-netboot-image-" + yocto_machine +".ext4.gz.u-boot") %}
{%- set rootfs_type = rootfs_type|default("nbd") %}
diff --git a/templates/machines/raspberrypi3.jinja2 b/templates/machines/raspberrypi3.jinja2
index c4a7086..2d96110 100644
--- a/templates/machines/raspberrypi3.jinja2
+++ b/templates/machines/raspberrypi3.jinja2
@@ -1,7 +1,12 @@
{%- extends 'boot/generic-uboot-tftp.jinja2' %}
-{%- set device_type = "bcm2837-rpi-3-b" %}
-{%- set dtb = "uImage-bcm2710-rpi-3-b.dtb" %}
-{%- set nbdinitrd = "initramfs-netboot-image-" + yocto_machine +".ext4.gz.u-boot" %}
{%- set device_arch = "arm64" %}
{%- set device_mach = "broadcom" %}
+{%- set device_type = "bcm2837-rpi-3-b" %}
+{# Default boot method if not specified #}
{%- set rootfs_type = rootfs_type|default("nbd") %}
+{# Defaults image names dependng on boot method #}
+{%- if rootfs_type == 'nbd' %}
+ {%- set initrd = "initramfs-netboot-image-" + yocto_machine +".ext4.gz.u-boot" %}
+{%- elif rootfs_type == 'ramdisk' %}
+ {%- set dtb = dtb|default("uImage-bcm2710-rpi-3-b.dtb") %}
+{%- endif %} \ No newline at end of file