spl: Change debug to printf for "Unsupported boot-device"
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
---
v2:
- Added #if check so that the printf is only included when serial support is enabled.
- Compile tested on all ARM boards
common/spl/spl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
common/spl/spl.c +3 -1
@@ -216,7 +216,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)break ;#endif default : -debug ("SPL: Un-supported Boot Device\n" ); +#if defined(CONFIG_SPL_SERIAL_SUPPORT ) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) +printf ("SPL: Unsupported Boot Device %d\n" , boot_device); +#endif hang (); }
Signature · 1 line
2.1.3
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
Hello Stefan,
Am 11.11.2014 19:03, schrieb Stefan Roese:
Quoted 10 lines
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>
Quoted 8 lines
---
v2:
- Added #if check so that the printf is only included when serial support is enabled.
- Compile tested on all ARM boardscommon/spl/spl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Yes, I think this is a good idea, as I stepped also in the same problem. I tend to first activate debug when I have not working SPL code ... but this is not possible for example on running systems ... on the other side, this problem should raise only in the development state ...
The same for other places ... like UBI ... see my question [1]. It would be nice to have this ubi errormessages enabled, but this cost a lot of space ...
But for this patch, I think it is okay to enable it by default ... so:
bye,
Heiko
[1] [U-Boot] mtd, ubi: errormessage handling
https://patchwork.ozlabs.org/patch/405259/
Quoted 17 lines
common/spl/spl.c +3
-1@@ -216,7 +216,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)break ;#endif default : -debug ("SPL: Un-supported Boot Device\n" ); +#if defined(CONFIG_SPL_SERIAL_SUPPORT ) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) +printf ("SPL: Unsupported Boot Device %d\n" , boot_device); +#endif hang (); }
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
In reply to Stefan RoeseQuoted 11 lines · Stefan Roese
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>Acked-by Heiko Schocher <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141124/3ea3dbf1/attachment.pgp>
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
Hi guys,
2014-11-24 23:10 GMT+01:00 Tom Rini <[email protected]>:
Quoted 9 lines · Stefan Roese
Quoted 8 lines
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>Acked-by Heiko Schocher <[email protected]>Applied to u-boot/master, thanks!
This patch is causing problem on Microblaze because SPL exceed 4k limit. It is only one printf which is called in entire SPL that's why this should be solved a little bit differently.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
Hi Michal,
Quoted 14 lines · Michal Simek
On Tue, Nov 11, 2014 at 07:03:55PM +0100, Stefan Roese wrote:
> We had the problem on an AM33xx platform, that SPL detected an > unsupported boot-device. But since this message is a debug message > it took a bit of time to really know, where the hangup in SPL > resulted from. So let's change this debug message to a printf > and also print the detected boot-device that is not supported. > This makes debugging of such cases much easier.
>
> Signed-off-by: Stefan Roese <sr at denx.de <mailto:[email protected]>> > Cc: Wolfgang Denk <wd at denx.de <mailto:[email protected]>> > Cc: Tom Rini <trini at ti.com <mailto:[email protected]>>
> Acked-by: Heiko Schocher <hs at denx.de <mailto:[email protected]>>
Quoted 6 lines
Applied to u-boot/master, thanks!
This patch is causing problem on Microblaze because SPL exceed 4k limit. It is only one printf which is called in entire SPL that's why this should be solved a little bit differently.
Ups. Yes, sorry. This one line definitely shouldn't cause all the printf stuff to be included. I'll try to address this quickly...
Thanks,
Stefan
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
In reply to Michal SimekQuoted 18 lines · Michal Simek
Hi guys,
2014-11-24 23:10 GMT+01:00 Tom Rini <[email protected]>:
Quoted 14 lines · Stefan Roese
Quoted 12 lines
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>Acked-by Heiko Schocher <[email protected]>
Quoted 6 lines
Quoted 3 lines
Applied to u-boot/master, thanks!
This patch is causing problem on Microblaze because SPL exceed 4k limit. It is only one printf which is called in entire SPL that's why this should be solved a little bit differently.
OK, but for clarity you need and are using both CONFIG_SPL_SERIAL_SUPPORT and CONFIG_SPL_LIBCOMMON_SUPPORT because you're using puts but not printf, yes?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150127/6e5518f4/attachment.pgp>
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
Quoted 15 lines · Tom Rini
Quoted 15 lines
Quoted 15 lines
Quoted 11 lines
We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>Acked-by Heiko Schocher <[email protected]>Applied to u-boot/master, thanks!
Quoted 7 lines
Quoted 3 lines
This patch is causing problem on Microblaze because SPL exceed 4k limit. It is only one printf which is called in entire SPL that's why this should be solved a little bit differently.
OK, but for clarity you need and are using both
CONFIG_SPL_SERIAL_SUPPORTandCONFIG_SPL_LIBCOMMON_SUPPORTbecause you're using puts but not printf, yes?
Right. If this is the case (only puts usage on Microblaze), then its perhaps best that I change this line to puts as well. Okay?
Thanks,
Stefan
PATCH v2 1/1 spl: Change debug to printf for "Unsupported boot-device"
2015-01-27 15:38 GMT+01:00 Stefan Roese <[email protected]>:
Quoted 25 lines · Tom Rini
Quoted 24 lines
We had the problem on an AM33xx platform, that SPL detected an
Quoted 21 lines
Quoted 12 lines
Quoted 11 lines
unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier.
Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Tom Rini <[email protected]>Acked-by Heiko Schocher <[email protected]>Quoted 4 lines
Applied to u-boot/master, thanks!
This patch is causing problem on Microblaze because SPL exceed 4k
limit.
It is only one printf which is called in entire SPL that's why this should
be solved a little bit differently.
Quoted 9 lines
Quoted 4 lines
OK, but for clarity you need and are using both
CONFIG_SPL_SERIAL_SUPPORTandCONFIG_SPL_LIBCOMMON_SUPPORTbecause you're using puts but not printf, yes?Right. If this is the case (only puts usage on Microblaze), then its perhaps best that I change this line to puts as well. Okay?
Changing this to puts is definitely fine. Microblaze is using just puts.
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform