mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 02:52:36 +03:00
[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>
This commit is contained in:
@@ -126,9 +126,10 @@ static wchar_t * efi_image_cmdline ( struct image *image ) {
|
||||
/**
|
||||
* Install EFI Flattened Device Tree table (when no FDT support is present)
|
||||
*
|
||||
* @v cmdline Command line, or NULL
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
__weak int efi_fdt_install ( void ) {
|
||||
__weak int efi_fdt_install ( const char *cmdline __unused ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -209,7 +210,7 @@ static int efi_image_exec ( struct image *image ) {
|
||||
}
|
||||
|
||||
/* Install Flattened Device Tree table */
|
||||
if ( ( rc = efi_fdt_install() ) != 0 ) {
|
||||
if ( ( rc = efi_fdt_install ( image->cmdline ) ) != 0 ) {
|
||||
DBGC ( image, "EFIIMAGE %s could not install FDT: %s\n",
|
||||
image->name, strerror ( rc ) );
|
||||
goto err_fdt_install;
|
||||
|
||||
Reference in New Issue
Block a user