aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/bootflow.c1
-rw-r--r--cmd/bootflow.c6
-rw-r--r--include/bootflow.h6
-rw-r--r--test/boot/bootflow.c1
4 files changed, 14 insertions, 0 deletions
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 0345755f58..52cc2f9d54 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -355,6 +355,7 @@ void bootflow_free(struct bootflow *bflow)
free(bflow->fname);
free(bflow->buf);
free(bflow->os_name);
+ free(bflow->fdt_fname);
}
void bootflow_remove(struct bootflow *bflow)
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index 2b6ed26fdc..56dd35b69c 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -344,6 +344,12 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Logo size: %x (%d bytes)\n", bflow->logo_size,
bflow->logo_size);
}
+ printf("FDT: %s\n", bflow->fdt_fname);
+ if (bflow->fdt_fname) {
+ printf("FDT size: %x (%d bytes)\n", bflow->fdt_size,
+ bflow->fdt_size);
+ printf("FDT addr: %lx\n", bflow->fdt_addr);
+ }
printf("Error: %d\n", bflow->err);
if (dump && bflow->buf) {
/* Set some sort of maximum on the size */
diff --git a/include/bootflow.h b/include/bootflow.h
index 8ff9e332b1..bf71b09eda 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -60,6 +60,9 @@ enum bootflow_state_t {
* @err: Error number received (0 if OK)
* @os_name: Name of the OS / distro being booted, or NULL if not known
* (allocated)
+ * @fdt_fname: Filename of FDT file
+ * @fdt_size: Size of FDT file
+ * @fdt_addr: Address of loaded fdt
*/
struct bootflow {
struct list_head bm_node;
@@ -79,6 +82,9 @@ struct bootflow {
int size;
int err;
char *os_name;
+ char *fdt_fname;
+ int fdt_size;
+ ulong fdt_addr;
};
/**
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index f852b6e9b6..b71ec52eb7 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -199,6 +199,7 @@ static int bootflow_cmd_info(struct unit_test_state *uts)
ut_assert_nextline("Size: 253 (595 bytes)");
ut_assert_nextline("OS: Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl)");
ut_assert_nextline("Logo: (none)");
+ ut_assert_nextline("FDT: <NULL>");
ut_assert_nextline("Error: 0");
ut_assert_console_end();