From 47dd6b4d7daba06a04bb612d0c19e350e6287fac Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 22 Feb 2023 12:17:04 -0700 Subject: 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 Suggested-by: Mark Kettenis --- include/bootflow.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/bootflow.h') diff --git a/include/bootflow.h b/include/bootflow.h index e5fdf5f29d1..f20f575030f 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -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; }; /** -- cgit v1.2.3