bootstage: Add SPL support
PATCH v2 1/1 bootstage: Add SPL support
Allow usage of the bootstage facilities in SPL.
---
V2: Fix multiple misuses of BOOTSTAGE vs SHOW_BOOT_PROGRESS
--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)
arch/x86/cpu/cpu.c +1 -1
@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)return 0 ; } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )void show_boot_progress (int val) {outb (val,POST_PORT );
board/siemens/iot2050/board.c +1 -1
@@ -250,7 +250,7 @@ void spl_board_init(void) { } -#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Indicate any error or (accidental?) entering of CLI via the red status LED. */
common/Kconfig.boot +9 -0
@@ -696,6 +696,15 @@ config SHOW_BOOT_PROGRESS -150 common/cmd_nand.c Incorrect FIT image format 151 common/cmd_nand.c FIT image format OK +config SPL_SHOW_BOOT_PROGRESS + bool "Show boot progress in a board-specific manner" + depends on SPL + help + Defining this option allows to add some board-specific code (calling + a user-provided function show_boot_progress(int) that enables you to + show the system's boot progress on some display (for example, some + LEDs) on your board. For details see SHOW_BOOT_PROGRESS. + endmenu menu "Boot media"
common/init/board_init.c +1 -1
@@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base)board_init_f_init_stack_protection (); } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */
common/spl/spl.c +1 -1
@@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size);/* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */
include/bootstage.h +1 -1
@@ -220,7 +220,7 @@ enum bootstage_id {*/ ulong timer_get_boot_us (void ); -#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (BOOTSTAGE ) +#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )#define show_boot_progress (val) do {} while (0)#else /**
Signature · 1 line
2.33.0
Quoted 7 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESS
Quoted 8 lines
--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)
Can you enable this for sandbox_spl so we get build coverage?
Quoted 17 lines · Simon Glass
Quoted 7 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESSQuoted 8 lines
--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Can you enable this for
sandbox_splso we get build coverage?
Isn't that the case already ? I recall sandbox was one of the machines which failed to build and where I found these board issues. If not, then please send a separate patch.
Hi Marek,
Quoted 19 lines · Marek Vasut
Quoted 17 lines · Simon Glass
Quoted 15 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESS--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)
Quoted 7 lines
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Can you enable this for
sandbox_splso we get build coverage?Isn't that the case already ? I recall sandbox was one of the machines which failed to build and where I found these board issues. If not, then please send a separate patch.
Apparently it is not enabled for sandbox_spl
Regards,
Simon
Hi Marek,
Quoted 19 lines · Marek Vasut
Quoted 17 lines · Simon Glass
Quoted 15 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESS--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)
Quoted 7 lines
Quoted 3 lines
Reviewed-by Simon Glass <[email protected]>Can you enable this for
sandbox_splso we get build coverage?Isn't that the case already ? I recall sandbox was one of the machines which failed to build and where I found these board issues. If not, then please send a separate patch.
Apparently it is not enabled for sandbox_spl
Regards,
Simon
Applied to u-boot-dm, thanks!
Quoted 46 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESS--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)arch/x86/cpu/cpu.c +1
-1@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)return 0 ; } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )void show_boot_progress (int val) {outb (val,POST_PORT );board/siemens/iot2050/board.c +1
-1@@ -250,7 +250,7 @@ void spl_board_init(void) { } -#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Indicate any error or (accidental?) entering of CLI via the red status LED. */ common/Kconfig.boot +0
-0
common/Kconfig.boot config SHOW_BOOT_PROGRESS · line 700
Quoted 5 lines
common/Kconfig.boot +2
-0@@ -696,6 +696,15 @@ config SHOW_BOOT_PROGRESS -150 common/cmd_nand.c Incorrect FIT image format 151 common/cmd_nand.c FIT image format OK +config SPL_SHOW_BOOT_PROGRESS + bool "Show boot progress in a board-specific manner"
"... in SPL", our you end up with an apparently duplicated line in kconfig.
Jan
Quoted 50 lines
common/Kconfig.boot +7
-0+ depends on SPL + help + Defining this option allows to add some board-specific code (calling + a user-provided function show_boot_progress(int) that enables you to + show the system's boot progress on some display (for example, some + LEDs) on your board. For details see SHOW_BOOT_PROGRESS. + endmenu menu "Boot media"common/init/board_init.c +1
-1@@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base)board_init_f_init_stack_protection (); } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */ common/spl/spl.c +1
-1@@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size);/* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */ include/bootstage.h +1
-1@@ -220,7 +220,7 @@ enum bootstage_id {*/ ulong timer_get_boot_us (void ); -#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (BOOTSTAGE ) +#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )#define show_boot_progress (val) do {} while (0)#else /**
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Marek Vasut
Allow usage of the bootstage facilities in SPL.
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>---
V2: Fix multiple misuses of BOOTSTAGE vsSHOW_BOOT_PROGRESS--- arch/x86/cpu/cpu.c | 2 +- board/siemens/iot2050/board.c | 2 +- common/Kconfig.boot | 9 +++++++++ common/init/board_init.c | 2 +- common/spl/spl.c | 2 +- include/bootstage.h | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-)arch/x86/cpu/cpu.c +1
-1@@ -178,7 +178,7 @@ int default_print_cpuinfo(void)return 0 ; } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )void show_boot_progress (int val) {outb (val,POST_PORT );board/siemens/iot2050/board.c +0
-0@@ -250,7 +250,7 @@ void spl_board_init(void) { }
Quoted 2 lines
board/siemens/iot2050/board.c void spl_board_init(void) · line 253
Quoted 2 lines
board/siemens/iot2050/board.c +1
-1-#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (LED ) &&CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )
And while this change is correct, it lacked a related update of our defconfig to keep this feature enabled.
Please CC board maintainers on changes to their code.
Quoted 62 lines
common/Kconfig.boot config SHOW_BOOT_PROGRESS · line 700
Quoted 13 lines
board/siemens/iot2050/board.c +0
-0/* * Indicate any error or (accidental?) entering of CLI via the red status LED. */ common/Kconfig.boot +2
-0@@ -696,6 +696,15 @@ config SHOW_BOOT_PROGRESS -150 common/cmd_nand.c Incorrect FIT image format 151 common/cmd_nand.c FIT image format OK +config SPL_SHOW_BOOT_PROGRESS + bool "Show boot progress in a board-specific manner""... in SPL", our you end up with an apparently duplicated line in kconfig.
Jan
Quoted 44 lines
common/Kconfig.boot +7
-0+ depends on SPL + help + Defining this option allows to add some board-specific code (calling + a user-provided function show_boot_progress(int) that enables you to + show the system's boot progress on some display (for example, some + LEDs) on your board. For details see SHOW_BOOT_PROGRESS. + endmenu menu "Boot media"common/init/board_init.c +1
-1@@ -166,7 +166,7 @@ void board_init_f_init_reserve(ulong base)board_init_f_init_stack_protection (); } -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */ common/spl/spl.c +1
-1@@ -61,7 +61,7 @@ binman_sym_declare(ulong, spl, size);/* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -#if CONFIG_IS_ENABLED (BOOTSTAGE ) +#if CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )/* * Board-specific Platform code can reimplement show_boot_progress () if needed */ include/bootstage.h +0
-0@@ -220,7 +220,7 @@ enum bootstage_id {*/ ulong timer_get_boot_us (void );
Quoted 7 lines
include/bootstage.h enum bootstage_id { · line 226
Quoted 6 lines
include/bootstage.h +1
-1-#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (BOOTSTAGE ) +#if defined(USE_HOSTCC ) || !CONFIG_IS_ENABLED (SHOW_BOOT_PROGRESS )#define show_boot_progress (val) do {} while (0)#else /**
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Quoted 1 line
Please CC board maintainers on changes to their code.
btw. I _think_ this one is because of a broken get_maintainer.pl. See [1].
-michael