bootstd: Replicate the dtb-filename quirks of distroboot
For EFI, the distro boot scripts search in three different directories for the .dtb file. The SOC-based filename fallback is supported only for 32-bit ARM. Adjust the code to mirror this behaviour. Also some boards can use a prior-stage FDT if one is not found in the normal way. Support this and show a message in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Mark Kettenis <kettenis@openbsd.org>
This commit is contained in:
@@ -36,6 +36,18 @@ enum bootflow_state_t {
|
||||
BOOTFLOWST_COUNT
|
||||
};
|
||||
|
||||
/**
|
||||
* enum bootflow_flags_t - flags for bootflows
|
||||
*
|
||||
* @BOOTFLOWF_USE_PRIOR_FDT: Indicates that an FDT was not found by the bootmeth
|
||||
* and it is using the prior-stage FDT, which is the U-Boot control FDT.
|
||||
* This is only possible with the EFI bootmeth (distro-efi) and only when
|
||||
* CONFIG_OF_HAS_PRIOR_STAGE is enabled
|
||||
*/
|
||||
enum bootflow_flags_t {
|
||||
BOOTFLOWF_USE_PRIOR_FDT = 1 << 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct bootflow - information about a bootflow
|
||||
*
|
||||
@@ -68,6 +80,7 @@ enum bootflow_state_t {
|
||||
* @fdt_fname: Filename of FDT file
|
||||
* @fdt_size: Size of FDT file
|
||||
* @fdt_addr: Address of loaded fdt
|
||||
* @flags: Flags for the bootflow (see enum bootflow_flags_t)
|
||||
*/
|
||||
struct bootflow {
|
||||
struct list_head bm_node;
|
||||
@@ -90,6 +103,7 @@ struct bootflow {
|
||||
char *fdt_fname;
|
||||
int fdt_size;
|
||||
ulong fdt_addr;
|
||||
int flags;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user