diff options
author | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-09-17 16:19:20 +0200 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-12-14 15:46:11 +0000 |
commit | 3619a835b0ffe09783926eb52f3015254ee6fbd9 (patch) | |
tree | da10ad11fe92e3ad669303f8d3d102c9f5ea1e7e /templates | |
parent | 5687d6969b2566841893a13b5d2f37fe0ad7ce84 (diff) |
v4l2: add variant to run v4l2 on QEMU
Add a v4l2 template variant to run it on QEMU. This can be done with
the "vivid" virtual video driver enabled in the kernel build.
* add generic-qemu-v4l2-template.jinja2 to enable v4l2 on qemu
* add image_arg block in generic-qemu-boot-template.jinja2 to make it
possible to override the QEMU command line in test plans
* add the vivid.no_error_inj=1 to the QEMU kernel command line when
running the v4l2 test plan. This is required with the vivid driver,
otherwise v4l2-compliance aborts with this message:
The vivid driver has error injection enabled which will cause
the compliance test to fail. Load the vivid module with the
no_error_inj=1 module option to disable error injection.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/boot/generic-qemu-boot-template.jinja2 | 2 | ||||
-rw-r--r-- | templates/v4l2/generic-qemu-v4l2-template.jinja2 | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/templates/boot/generic-qemu-boot-template.jinja2 b/templates/boot/generic-qemu-boot-template.jinja2 index cc025be..617b9e9 100644 --- a/templates/boot/generic-qemu-boot-template.jinja2 +++ b/templates/boot/generic-qemu-boot-template.jinja2 @@ -33,7 +33,9 @@ actions: os: oe images: kernel: +{%- block image_arg %} image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose"' +{%- endblock %} url: {{ kernel_url }} ramdisk: image_arg: '-initrd {ramdisk}' diff --git a/templates/v4l2/generic-qemu-v4l2-template.jinja2 b/templates/v4l2/generic-qemu-v4l2-template.jinja2 new file mode 100644 index 0000000..84fb839 --- /dev/null +++ b/templates/v4l2/generic-qemu-v4l2-template.jinja2 @@ -0,0 +1,11 @@ +{% extends 'boot/generic-qemu-boot-template.jinja2' %} +{% block actions %} +{{ super () }} + +{% include 'v4l2/v4l2.jinja2' %} + +{% endblock %} + +{%- block image_arg %} + image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose vivid.no_error_inj=1"' +{%- endblock %} |