summaryrefslogtreecommitdiffstats
path: root/src/interface/efi
diff options
context:
space:
mode:
authorMichael Brown2025-04-01 17:53:02 +0200
committerMichael Brown2025-04-01 17:55:28 +0200
commit7e64e9b6703e6dd363c063d545a5fe63bbc70011 (patch)
tree4b07ed4f9b9bfb3c18a86495bbcfbafb1ddf93bd /src/interface/efi
parent[fdt] Identify free space (if any) at end of parsed tree (diff)
downloadipxe-7e64e9b6703e6dd363c063d545a5fe63bbc70011.tar.gz
ipxe-7e64e9b6703e6dd363c063d545a5fe63bbc70011.tar.xz
ipxe-7e64e9b6703e6dd363c063d545a5fe63bbc70011.zip
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi')
-rw-r--r--src/interface/efi/efi_fdt.c5
1 files changed, 3 insertions, 2 deletions
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;