mirror of
https://git.proxmox.com/git/qemu
synced 2025-07-09 13:18:26 +00:00
arm_boot: Conditionalised DTB command line update
The DTB command line should only be overwritten if the user provides a command line with -append. Otherwise whatever command line was in the DTB should stay unchanged. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
69efc0265f
commit
5e87975c87
@ -242,11 +242,13 @@ static int load_dtb(target_phys_addr_t addr, const struct arm_boot_info *binfo)
|
|||||||
fprintf(stderr, "couldn't set /memory/reg\n");
|
fprintf(stderr, "couldn't set /memory/reg\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (binfo->kernel_cmdline && *binfo->kernel_cmdline) {
|
||||||
rc = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs",
|
rc = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs",
|
||||||
binfo->kernel_cmdline);
|
binfo->kernel_cmdline);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
fprintf(stderr, "couldn't set /chosen/bootargs\n");
|
fprintf(stderr, "couldn't set /chosen/bootargs\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (binfo->initrd_size) {
|
if (binfo->initrd_size) {
|
||||||
rc = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-start",
|
rc = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-start",
|
||||||
|
Loading…
Reference in New Issue
Block a user