From 7e64e9b6703e6dd363c063d545a5fe63bbc70011 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 1 Apr 2025 16:53:02 +0100 Subject: [fdt] Populate boot arguments in constructed device tree When creating a device tree to pass to a booted operating system, ensure that the "chosen" node exists, and populate the "bootargs" property with the image command line. Signed-off-by: Michael Brown --- src/interface/efi/efi_fdt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/interface/efi') diff --git a/src/interface/efi/efi_fdt.c b/src/interface/efi/efi_fdt.c index 4a10236a0..1e0d4b8b7 100644 --- a/src/interface/efi/efi_fdt.c +++ b/src/interface/efi/efi_fdt.c @@ -107,13 +107,14 @@ static struct fdt_header *efi_fdt_installed; /** * Install EFI Flattened Device Tree table * + * @v cmdline Command line, or NULL * @ret rc Return status code */ -int efi_fdt_install ( void ) { +int efi_fdt_install ( const char *cmdline ) { int rc; /* Create device tree */ - if ( ( rc = fdt_create ( &efi_fdt_installed ) ) != 0 ) { + if ( ( rc = fdt_create ( &efi_fdt_installed, cmdline ) ) != 0 ) { DBGC ( &efi_fdt, "EFI_FDT could not install: %s\n", strerror ( rc ) ); goto err_create; -- cgit v1.2.3-55-g7522