diff options
author | Andre Przywara <andre.przywara@arm.com> | 2019-01-25 15:43:08 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-02-01 10:35:45 +0000 |
commit | 5e4b563d75b9b46fc70cf42f59230c2a79fbcc55 (patch) | |
tree | fd728b4a5ebbead52fdf4527c6b72d7c5de734d5 | |
parent | eb41dfc9d8e5a27e09bfbec9c01aab7f33033f3f (diff) | |
download | kvmtool-5e4b563d75b9b46fc70cf42f59230c2a79fbcc55.tar.gz |
arm: Allow command line for firmware
When loading a firmware instead of a kernel, we can still pass on any
*user-provided* command line, as /chosen/bootargs is a generic device tree
feature. We just need to make sure to not pass our mangled-for-Linux
version.
This allows to run "firmware" images which make use of a command line,
still are not Linux kernels, like kvm-unit-tests.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arm/fdt.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -132,14 +132,11 @@ static int setup_fdt(struct kvm *kvm) _FDT(fdt_begin_node(fdt, "chosen")); _FDT(fdt_property_cell(fdt, "linux,pci-probe-only", 1)); + /* Pass on our amended command line to a Linux kernel only. */ if (kvm->cfg.firmware_filename) { - /* - * When using a firmware, command line is not passed through DT, - * or the firmware can add it itself - */ if (kvm->cfg.kernel_cmdline) - pr_warning("Ignoring custom bootargs: %s\n", - kvm->cfg.kernel_cmdline); + _FDT(fdt_property_string(fdt, "bootargs", + kvm->cfg.kernel_cmdline)); } else _FDT(fdt_property_string(fdt, "bootargs", kvm->cfg.real_cmdline)); |