diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 8 | ||||
-rw-r--r-- | common/board_r.c | 5 | ||||
-rw-r--r-- | common/image-fdt.c | 21 |
3 files changed, 30 insertions, 4 deletions
diff --git a/common/Kconfig b/common/Kconfig index 8f9d2959ba..0a14bdedaa 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -656,6 +656,14 @@ config BOUNCE_BUFFER A second possible use of bounce buffers is their ability to provide aligned buffers for DMA operations. +config BOARD_TYPES + bool "Call get_board_type() to get and display the board type" + help + If this option is enabled, checkboard() will call get_board_type() + to get a string containing the board type and this will be + displayed immediately after the model is shown on the console + early in boot. + menu "Start-up hooks" config ARCH_EARLY_INIT_R diff --git a/common/board_r.c b/common/board_r.c index 5f3d27aa9f..472987d5d5 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -633,10 +633,7 @@ static int run_main_loop(void) } /* - * Over time we hope to remove these functions with code fragments and - * stub functions, and instead call the relevant function directly. - * - * We also hope to remove most of the driver-related init and do it if/when + * We hope to remove most of the driver-related init and do it if/when * the driver is later used. * * TODO: perhaps reset the watchdog in the initcall function after each call? diff --git a/common/image-fdt.c b/common/image-fdt.c index 5988808f18..94089b2215 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -268,6 +268,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, ulong load, load_end; ulong image_start, image_data, image_end; #endif + ulong img_addr; ulong fdt_addr; char *fdt_blob = NULL; void *buf; @@ -283,6 +284,9 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, *of_flat_tree = NULL; *of_size = 0; + img_addr = simple_strtoul(argv[0], NULL, 16); + buf = map_sysmem(img_addr, 0); + if (argc > 2) select = argv[2]; if (select || genimg_has_config(images)) { @@ -453,6 +457,23 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, debug("## No Flattened Device Tree\n"); goto no_fdt; } +#ifdef CONFIG_ANDROID_BOOT_IMAGE + } else if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) { + struct andr_img_hdr *hdr = buf; + ulong fdt_data, fdt_len; + + if (android_image_get_second(hdr, &fdt_data, &fdt_len) != 0) + goto no_fdt; + + fdt_blob = (char *)fdt_data; + if (fdt_check_header(fdt_blob) != 0) + goto no_fdt; + + if (fdt_totalsize(fdt_blob) != fdt_len) + goto error; + + debug("## Using FDT found in Android image second area\n"); +#endif } else { debug("## No Flattened Device Tree\n"); goto no_fdt; |