diff options
author | Kevin Hilman <khilman@baylibre.com> | 2019-06-26 16:46:32 -0700 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2019-07-26 08:04:26 +0100 |
commit | c0b379fea8525378c79d0f2765a25881d5d0d19e (patch) | |
tree | 7fe4f47c3df2ae2f9fec420d538c06d237824184 /templates | |
parent | e9045157e23c0595f6d99a82a765bd0d664ed77a (diff) |
templates/boot: add console_msg_format to kernel cmdline
syslog-style printk message from the kernel are available when booting
with "console_msg_format=syslog" on the kernel command-line. This
makes it much easier for log parsers to get the log-level information
from the kernel boot logs.
Automatically add this command-line argument to all u-boot and qemu
jobs.
NOTE: requires jinja2 "do" extension, which is now added when creating
jinja2 environment
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'templates')
4 files changed, 7 insertions, 2 deletions
diff --git a/templates/base/kernel-ci-base.jinja2 b/templates/base/kernel-ci-base.jinja2 index bf17442..aaf1602 100644 --- a/templates/base/kernel-ci-base.jinja2 +++ b/templates/base/kernel-ci-base.jinja2 @@ -1,3 +1,5 @@ +{% set extra_kernel_args = "console_msg_format=syslog" %} + {%- block metadata %} metadata: image.type: 'kernel-ci' diff --git a/templates/boot/generic-qemu-boot-template.jinja2 b/templates/boot/generic-qemu-boot-template.jinja2 index 617b9e9..910a000 100644 --- a/templates/boot/generic-qemu-boot-template.jinja2 +++ b/templates/boot/generic-qemu-boot-template.jinja2 @@ -34,7 +34,7 @@ actions: images: kernel: {%- block image_arg %} - image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose"' + image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose {{ extra_kernel_args }}"' {%- endblock %} url: {{ kernel_url }} ramdisk: diff --git a/templates/boot/generic-uboot-tftp-ramdisk-boot-template.jinja2 b/templates/boot/generic-uboot-tftp-ramdisk-boot-template.jinja2 index 935c249..ffd15a7 100644 --- a/templates/boot/generic-uboot-tftp-ramdisk-boot-template.jinja2 +++ b/templates/boot/generic-uboot-tftp-ramdisk-boot-template.jinja2 @@ -3,6 +3,9 @@ {{ super() }} {% endblock %} {% block main %} +{%- if extra_kernel_args %} +{% do context.update({"extra_kernel_args": extra_kernel_args}) %} +{% endif %} {{ super() }} {% endblock %} {% block actions %} diff --git a/templates/v4l2-compliance/generic-qemu-v4l2-compliance-template.jinja2 b/templates/v4l2-compliance/generic-qemu-v4l2-compliance-template.jinja2 index 42f4260..3e5f676 100644 --- a/templates/v4l2-compliance/generic-qemu-v4l2-compliance-template.jinja2 +++ b/templates/v4l2-compliance/generic-qemu-v4l2-compliance-template.jinja2 @@ -7,5 +7,5 @@ {% endblock %} {%- block image_arg %} - image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose vivid.no_error_inj=1"' + image_arg: '-kernel {kernel} -append "console={{ console_dev }},115200 root=/dev/ram0 debug verbose vivid.no_error_inj=1 {{ extra_kernel_args }}"' {%- endblock %} |