* [PATCH v2] bootstage: Add SPL support
@ 2021-10-23 1:06 Marek Vasut
2021-10-24 19:54 ` Simon Glass
2021-11-03 11:59 ` Jan Kiszka
0 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2021-10-23 1:06 UTC (permalink / raw)
To: u-boot; +Cc: Marek Vasut, Simon Glass
Allow usage of the bootstage facilities in SPL.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 01dece5769c..86f53e78d24 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -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);
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
index b2110978ae0..16ae2ffc174 100644
--- a/board/siemens/iot2050/board.c
+++ b/board/siemens/iot2050/board.c
@@ -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.
*/
diff --git a/common/Kconfig.boot b/common/Kconfig.boot
index 9b84a8d005f..d0d0dbd09a3 100644
--- a/common/Kconfig.boot
+++ b/common/Kconfig.boot
@@ -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"
diff --git a/common/init/board_init.c b/common/init/board_init.c
index 0965b96fa3a..eab5ee13953 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -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
*/
diff --git a/common/spl/spl.c b/common/spl/spl.c
index be09c19351a..d95a29b3655 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -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
*/
diff --git a/include/bootstage.h b/include/bootstage.h
index f837a387c8c..8d1989ac0e5 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -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
/**
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-10-23 1:06 [PATCH v2] bootstage: Add SPL support Marek Vasut
@ 2021-10-24 19:54 ` Simon Glass
2021-10-24 20:44 ` Marek Vasut
2021-11-03 11:59 ` Jan Kiszka
1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2021-10-24 19:54 UTC (permalink / raw)
To: Marek Vasut; +Cc: U-Boot Mailing List
On Fri, 22 Oct 2021 at 19:06, Marek Vasut <marex@denx.de> wrote:
>
> Allow usage of the bootstage facilities in SPL.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> 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(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
Can you enable this for sandbox_spl so we get build coverage?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-10-24 19:54 ` Simon Glass
@ 2021-10-24 20:44 ` Marek Vasut
2021-10-25 15:18 ` Simon Glass
2021-10-31 12:56 ` Simon Glass
0 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2021-10-24 20:44 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List
On 10/24/21 9:54 PM, Simon Glass wrote:
> On Fri, 22 Oct 2021 at 19:06, Marek Vasut <marex@denx.de> wrote:
>>
>> Allow usage of the bootstage facilities in SPL.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>> 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(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Can you enable this for sandbox_spl so 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-10-24 20:44 ` Marek Vasut
@ 2021-10-25 15:18 ` Simon Glass
2021-10-31 12:56 ` Simon Glass
1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2021-10-25 15:18 UTC (permalink / raw)
To: Marek Vasut; +Cc: U-Boot Mailing List
Hi Marek,
On Sun, 24 Oct 2021 at 14:44, Marek Vasut <marex@denx.de> wrote:
>
> On 10/24/21 9:54 PM, Simon Glass wrote:
> > On Fri, 22 Oct 2021 at 19:06, Marek Vasut <marex@denx.de> wrote:
> >>
> >> Allow usage of the bootstage facilities in SPL.
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> Cc: Simon Glass <sjg@chromium.org>
> >> ---
> >> 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(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > Can you enable this for sandbox_spl so 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-10-24 20:44 ` Marek Vasut
2021-10-25 15:18 ` Simon Glass
@ 2021-10-31 12:56 ` Simon Glass
1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2021-10-31 12:56 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Marek Vasut
Hi Marek,
On Sun, 24 Oct 2021 at 14:44, Marek Vasut <marex@denx.de> wrote:
>
> On 10/24/21 9:54 PM, Simon Glass wrote:
> > On Fri, 22 Oct 2021 at 19:06, Marek Vasut <marex@denx.de> wrote:
> >>
> >> Allow usage of the bootstage facilities in SPL.
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> Cc: Simon Glass <sjg@chromium.org>
> >> ---
> >> 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(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > Can you enable this for sandbox_spl so 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!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-10-23 1:06 [PATCH v2] bootstage: Add SPL support Marek Vasut
2021-10-24 19:54 ` Simon Glass
@ 2021-11-03 11:59 ` Jan Kiszka
2021-11-03 12:38 ` Jan Kiszka
1 sibling, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2021-11-03 11:59 UTC (permalink / raw)
To: Marek Vasut, u-boot; +Cc: Simon Glass
On 23.10.21 03:06, Marek Vasut wrote:
> Allow usage of the bootstage facilities in SPL.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> 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(-)
>
> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
> index 01dece5769c..86f53e78d24 100644
> --- a/arch/x86/cpu/cpu.c
> +++ b/arch/x86/cpu/cpu.c
> @@ -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);
> diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
> index b2110978ae0..16ae2ffc174 100644
> --- a/board/siemens/iot2050/board.c
> +++ b/board/siemens/iot2050/board.c
> @@ -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.
> */
> diff --git a/common/Kconfig.boot b/common/Kconfig.boot
> index 9b84a8d005f..d0d0dbd09a3 100644
> --- a/common/Kconfig.boot
> +++ b/common/Kconfig.boot
> @@ -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
> + 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"
> diff --git a/common/init/board_init.c b/common/init/board_init.c
> index 0965b96fa3a..eab5ee13953 100644
> --- a/common/init/board_init.c
> +++ b/common/init/board_init.c
> @@ -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
> */
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index be09c19351a..d95a29b3655 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -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
> */
> diff --git a/include/bootstage.h b/include/bootstage.h
> index f837a387c8c..8d1989ac0e5 100644
> --- a/include/bootstage.h
> +++ b/include/bootstage.h
> @@ -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
> /**
>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-11-03 11:59 ` Jan Kiszka
@ 2021-11-03 12:38 ` Jan Kiszka
2021-11-03 13:32 ` Michael Walle
0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2021-11-03 12:38 UTC (permalink / raw)
To: Marek Vasut, u-boot; +Cc: Simon Glass
On 03.11.21 12:59, Jan Kiszka wrote:
> On 23.10.21 03:06, Marek Vasut wrote:
>> Allow usage of the bootstage facilities in SPL.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> ---
>> 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(-)
>>
>> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
>> index 01dece5769c..86f53e78d24 100644
>> --- a/arch/x86/cpu/cpu.c
>> +++ b/arch/x86/cpu/cpu.c
>> @@ -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);
>> diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
>> index b2110978ae0..16ae2ffc174 100644
>> --- a/board/siemens/iot2050/board.c
>> +++ b/board/siemens/iot2050/board.c
>> @@ -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)
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.
>> /*
>> * Indicate any error or (accidental?) entering of CLI via the red status LED.
>> */
>> diff --git a/common/Kconfig.boot b/common/Kconfig.boot
>> index 9b84a8d005f..d0d0dbd09a3 100644
>> --- a/common/Kconfig.boot
>> +++ b/common/Kconfig.boot
>> @@ -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
>
>> + 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"
>> diff --git a/common/init/board_init.c b/common/init/board_init.c
>> index 0965b96fa3a..eab5ee13953 100644
>> --- a/common/init/board_init.c
>> +++ b/common/init/board_init.c
>> @@ -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
>> */
>> diff --git a/common/spl/spl.c b/common/spl/spl.c
>> index be09c19351a..d95a29b3655 100644
>> --- a/common/spl/spl.c
>> +++ b/common/spl/spl.c
>> @@ -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
>> */
>> diff --git a/include/bootstage.h b/include/bootstage.h
>> index f837a387c8c..8d1989ac0e5 100644
>> --- a/include/bootstage.h
>> +++ b/include/bootstage.h
>> @@ -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
>> /**
>>
>
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] bootstage: Add SPL support
2021-11-03 12:38 ` Jan Kiszka
@ 2021-11-03 13:32 ` Michael Walle
0 siblings, 0 replies; 8+ messages in thread
From: Michael Walle @ 2021-11-03 13:32 UTC (permalink / raw)
To: jan.kiszka; +Cc: marex, sjg, u-boot, Michael Walle
> 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
[1] https://lore.kernel.org/u-boot/20211031223812.634361-1-michael@walle.cc/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-03 13:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-23 1:06 [PATCH v2] bootstage: Add SPL support Marek Vasut
2021-10-24 19:54 ` Simon Glass
2021-10-24 20:44 ` Marek Vasut
2021-10-25 15:18 ` Simon Glass
2021-10-31 12:56 ` Simon Glass
2021-11-03 11:59 ` Jan Kiszka
2021-11-03 12:38 ` Jan Kiszka
2021-11-03 13:32 ` Michael Walle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.