From 0476469c1b5272b7a76b22082f0cd44eab24dc22 Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Mon, 8 Apr 2019 15:19:49 +0200 Subject: Permit to generate jobs for the upsquare This patch adds suppport for the upsquare. Upsquare use a GRUB boot method, so we needed to add a new generic-grub-tftp boot template. Since all x86_64 use the same yocto generated build name, we add a new upsquare machine, but tweaked a bit utils/agljobtemplate.py to keep intel-corei7-64 everywhere (except for the LAVA device-type). Bug-AGL: SPEC-2075 Change-Id: I15c850fada53efbcda4fd58527d7b7414865f89d Signed-off-by: Corentin LABBE --- templates/boot/generic-grub-tftp.jinja2 | 46 +++++++++++++++++++++++++++++++++ templates/machines/upsquare.jinja2 | 8 ++++++ 2 files changed, 54 insertions(+) create mode 100644 templates/boot/generic-grub-tftp.jinja2 create mode 100644 templates/machines/upsquare.jinja2 (limited to 'templates') diff --git a/templates/boot/generic-grub-tftp.jinja2 b/templates/boot/generic-grub-tftp.jinja2 new file mode 100644 index 0000000..0d42443 --- /dev/null +++ b/templates/boot/generic-grub-tftp.jinja2 @@ -0,0 +1,46 @@ +{%- extends 'boot/generic-base-boot.jinja2' %} +{%- set boot_method = "grub" %} +{%- block main %} +{{ super() }} +{%- if rootfs_type == 'nbd' %} +protocols: + lava-xnbd: + port: auto + +# context allows specific values to be overridden or included +context: + extra_kernel_args: initrd={{ initrd }} +{%- endif %} +{% endblock %} +{%- block boot %} +{{ super() }} + commands: {{ boot_commands|default("ramdisk") }} +{%- if rootfs_type == 'nbd' %} + transfer_overlay: + download_command: wget + unpack_command: tar -C / -xvpf +{%- endif %} +{%- endblock %} +{%- block deploy -%} +{{ super() }} + kernel: + url: {{ kernel_url }} +{%- if rootfs_type == 'ramdisk' %} + type: {{ kernel_type }} + ramdisk: + url: {{ initrd_url }} + compression: {{ initrd_compression }} +{%- elif rootfs_type == 'nbd' %} + initrd: + url: {{ initrd_url }} + allow_modify: false + nbdroot: + url: {{ rootfs_url }} + compression: {{ rootfs_compression }} +{%- endif %} +{%- if modules_url %} + modules: + url: {{ modules_url }} + compression: {{ modules_compression }} +{%- endif %} +{%- endblock %} diff --git a/templates/machines/upsquare.jinja2 b/templates/machines/upsquare.jinja2 new file mode 100644 index 0000000..46ced27 --- /dev/null +++ b/templates/machines/upsquare.jinja2 @@ -0,0 +1,8 @@ +{%- extends 'boot/generic-grub-tftp.jinja2' %} +{%- set device_arch = "x86" %} +{%- set device_mach = "intel" %} +{%- set device_type = "upsquare" %} +{%- set yocto_machine = "intel-corei7-64" %} +{%- set kernel_image = kernel_image|default("bzImage") %} +{%- set rootfs_type = rootfs_type|default("nbd") %} +{%- set rfs_image = rfs_image|default("agl-demo-platform-crosssdk-intel-corei7-64.ext4.xz") %} -- cgit 1.2.3-korg