aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLiu Wenlong <liuwl.fnst@cn.fujitsu.com>2018-11-21 15:17:57 +0800
committerLiu Wenlong <liuwl.fnst@cn.fujitsu.com>2018-11-21 15:24:20 +0800
commitcc6cbf14507044fb5bf693c1c45818ba204884a5 (patch)
tree17ca27b581c14fa791d43ee28baeb46388e5114b /templates
parent72b2d1e7987be917b8e15194f55d7d408810e284 (diff)
templates: add job generation support for iPXE based boardsguppy_6.99.1guppy/6.99.16.99.1
Since iPXE based boards can use NBD boot[1], now in releng-scripts, we also add support to generate LAVA jobs for iPXE based boards. With this support, Intel-UP2, one of the community reference boards, can do validation tests with the generated jobs easily. [1] https://git.lavasoftware.org/lava/lava/merge_requests/64/diffs Change-Id: I9adce67d7e9207181675e82bf22a653c73682eb8 Signed-off-by: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/boot/generic-ipxe-tftp.jinja246
-rw-r--r--templates/machines/intel-corei7-64.jinja27
2 files changed, 53 insertions, 0 deletions
diff --git a/templates/boot/generic-ipxe-tftp.jinja2 b/templates/boot/generic-ipxe-tftp.jinja2
new file mode 100644
index 0000000..25aa9f1
--- /dev/null
+++ b/templates/boot/generic-ipxe-tftp.jinja2
@@ -0,0 +1,46 @@
+{%- extends 'boot/generic-base-boot.jinja2' %}
+{%- set boot_method = "ipxe" %}
+{%- 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/intel-corei7-64.jinja2 b/templates/machines/intel-corei7-64.jinja2
new file mode 100644
index 0000000..2cbc072
--- /dev/null
+++ b/templates/machines/intel-corei7-64.jinja2
@@ -0,0 +1,7 @@
+{%- extends 'boot/generic-ipxe-tftp.jinja2' %}
+{%- set device_arch = "x86" %}
+{%- set device_mach = "intel" %}
+{%- set device_type = "x86" %}
+{%- 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") %}