mirror of
https://github.com/ipxe/ipxe
synced 2026-01-28 20:12:28 +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:
@@ -11,7 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <ipxe/efi/efi.h>
|
||||
|
||||
extern int efi_fdt_install ( void );
|
||||
extern int efi_fdt_install ( const char *cmdline );
|
||||
extern int efi_fdt_uninstall ( void );
|
||||
|
||||
#endif /* _IPXE_EFI_FDT_H */
|
||||
|
||||
@@ -73,6 +73,9 @@ struct fdt_prop {
|
||||
/** Alignment of structure block */
|
||||
#define FDT_STRUCTURE_ALIGN ( sizeof ( fdt_token_t ) )
|
||||
|
||||
/** Maximum alignment of any block */
|
||||
#define FDT_MAX_ALIGN 8
|
||||
|
||||
/** A device tree */
|
||||
struct fdt {
|
||||
/** Tree data */
|
||||
@@ -96,6 +99,13 @@ struct fdt {
|
||||
size_t strings_len;
|
||||
/** Offset to memory reservation block */
|
||||
unsigned int reservations;
|
||||
/** Reallocate device tree
|
||||
*
|
||||
* @v fdt Device tree
|
||||
* @v len New length
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ( * realloc ) ( struct fdt *fdt, size_t len );
|
||||
};
|
||||
|
||||
extern struct image_tag fdt_image __image_tag;
|
||||
@@ -113,7 +123,7 @@ extern int fdt_mac ( struct fdt *fdt, unsigned int offset,
|
||||
struct net_device *netdev );
|
||||
extern int fdt_parse ( struct fdt *fdt, struct fdt_header *hdr,
|
||||
size_t max_len );
|
||||
extern int fdt_create ( struct fdt_header **hdr );
|
||||
extern int fdt_create ( struct fdt_header **hdr, const char *cmdline );
|
||||
extern void fdt_remove ( struct fdt_header *hdr );
|
||||
|
||||
#endif /* _IPXE_FDT_H */
|
||||
|
||||
Reference in New Issue
Block a user