aboutsummaryrefslogtreecommitdiffstats
path: root/templates/boot
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2017-08-22 16:07:47 -0700
committerKevin Hilman <khilman@baylibre.com>2017-09-01 15:52:07 -0700
commit05146fa425d94a77ba35b43ac3b0a5c633163d4e (patch)
tree1d68bd51a1dfe8cc6c5e19fe517dbb19f3b67725 /templates/boot
parent263fa00cd42334c69897ebad72fcd9d6acd89aeb (diff)
initial snapshot: LAVA job creation based on templates
Change-Id: I5d545d3531f4c4190453724738076bd4eddfc4d6 Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Loys Ollivier <lollivier@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'templates/boot')
-rw-r--r--templates/boot/agl-prompt.jinja5
-rw-r--r--templates/boot/generic-base-boot.jinja29
-rw-r--r--templates/boot/generic-qemu-tmpfs.jinja226
-rw-r--r--templates/boot/generic-uboot-tftp.jinja251
4 files changed, 91 insertions, 0 deletions
diff --git a/templates/boot/agl-prompt.jinja b/templates/boot/agl-prompt.jinja
new file mode 100644
index 0000000..9d8cd50
--- /dev/null
+++ b/templates/boot/agl-prompt.jinja
@@ -0,0 +1,5 @@
+
+ prompts: ["root@{{ yocto_machine }}:~"]
+ auto_login:
+ login_prompt: "login:"
+ username: root
diff --git a/templates/boot/generic-base-boot.jinja2 b/templates/boot/generic-base-boot.jinja2
new file mode 100644
index 0000000..5011876
--- /dev/null
+++ b/templates/boot/generic-base-boot.jinja2
@@ -0,0 +1,9 @@
+{%- extends 'base/agl-simple.jinja2' %}
+{%- block boot %}
+{{ super() }}
+- boot:
+ timeout:
+ minutes: {{ boot_timeout }}
+ method: {{ boot_method|default("u-boot") }}
+{%- include 'boot/agl-prompt.jinja' %}
+{%- endblock %}
diff --git a/templates/boot/generic-qemu-tmpfs.jinja2 b/templates/boot/generic-qemu-tmpfs.jinja2
new file mode 100644
index 0000000..3908c80
--- /dev/null
+++ b/templates/boot/generic-qemu-tmpfs.jinja2
@@ -0,0 +1,26 @@
+{%- extends 'boot/generic-base-boot.jinja2' %}
+{%- set boot_method = "qemu" %}
+{%- block boot %}
+{{ super() }}
+ media: {{ media_type|default("tmpfs") }}
+{%- endblock %}
+{%- block main %}
+{{ super() }}
+context:
+ no_kvm: false
+ arch: {{ qemu_arch }}
+ extra_options: ["{{ qemu_args }}"]
+{% endblock %}
+{%- block deploy -%}
+{{ super() }}
+ images:
+ kernel:
+ image_arg: '-kernel {kernel} -append "{{ qemu_cmdline }}"'
+ url: {{ kernel_url }}
+{%- if initrd_url and rootfs_type == 'ramdisk' %}
+ ramdisk:
+ image_arg: '-drive format=raw,file={ramdisk}'
+ url: {{ initrd_url }}
+ compression: {{ initrd_compression }}
+{%- endif %}
+{%- endblock %}
diff --git a/templates/boot/generic-uboot-tftp.jinja2 b/templates/boot/generic-uboot-tftp.jinja2
new file mode 100644
index 0000000..cbdda7a
--- /dev/null
+++ b/templates/boot/generic-uboot-tftp.jinja2
@@ -0,0 +1,51 @@
+{%- extends 'boot/generic-base-boot.jinja2' %}
+{%- set boot_method = "u-boot" %}
+{%- block main %}
+{{ super() }}
+{%- if rootfs_type == 'nbd' %}
+protocols:
+ lava-xnbd:
+ port: auto
+{%- endif %}
+{% endblock %}
+{%- block boot %}
+{{ super() }}
+ type: {{ uboot_type|default("bootm") }}
+ 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 == 'nfs' %}
+ nfsrootfs:
+ url: {{ nfsrootfs_url }}
+ compression: {{ nfsroot_compression }}
+{%- elif rootfs_type == 'nbd' %}
+ initrd:
+ url: {{ nbdinitrd_url }}
+ allow_modify: false
+ nbdroot:
+ url: {{ nbdroot_url }}
+ compression: {{ nbdroot_compression }}
+{%- endif %}
+{%- if initrd_url and rootfs_type != 'nbd' %}
+ ramdisk:
+ url: {{ initrd_url }}
+ compression: {{ initrd_compression }}
+{%- endif %}
+{%- if modules_url %}
+ modules:
+ url: {{ modules_url }}
+ compression: {{ modules_compression }}
+{%- endif %}
+{%- if dtb_url %}
+ dtb:
+ url: {{ dtb_url }}
+{%- endif %}
+{%- endblock %}