
This change adds a call to the get_board_type_fdt() function before setting the "fdtfile" environment variable.
For CONFIG_BOARD_TYPES below function is called: - const char *get_board_type_fdt(void) - should return a pointer to the board type string.
This is useful in case of run many boards with just one config.
Signed-off-by: Przemyslaw Marczak p.marczak@samsung.com Cc: Piotr Wilczek p.wilczek@samsung.com Cc: Minkyu Kang mk7.kang@samsung.com
--- Changes v2: - set_board_info: move the bdtype pointer to avoid unused pointer compilation warning --- board/samsung/common/misc.c | 9 +++++++-- include/samsung/misc.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 9a5d2ac..67e79f2 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -57,8 +57,13 @@ void set_board_info(void) setenv("board_rev", info); #endif #ifdef CONFIG_OF_LIBFDT - snprintf(info, ARRAY_SIZE(info), "%s%x-%s.dtb", - CONFIG_SYS_SOC, s5p_cpu_id, CONFIG_SYS_BOARD); + const char *bdtype = ""; + +#ifdef CONFIG_BOARD_TYPES + bdtype = get_board_type_fdt(); +#endif + snprintf(info, ARRAY_SIZE(info), "%s%x-%s%s.dtb", + CONFIG_SYS_SOC, s5p_cpu_id, CONFIG_SYS_BOARD, bdtype); setenv("fdtfile", info); #endif } diff --git a/include/samsung/misc.h b/include/samsung/misc.h index 3d1d076..914137e 100644 --- a/include/samsung/misc.h +++ b/include/samsung/misc.h @@ -36,5 +36,8 @@ void draw_logo(void); #ifdef CONFIG_DFU_ALT_BOOTLOADER void set_dfu_alt_boot(int bootmode); #endif +#ifdef CONFIG_BOARD_TYPES +const char *get_board_type_fdt(void); +#endif
#endif /* __SAMSUNG_MISC_COMMON_H__ */