[U-Boot] [PATCH] powerpc, mpc5xxx: fix missing bootflag init
Heiko Schocher
hs at denx.de
Fri Nov 27 06:23:22 CET 2015
Hello Simon,
Am 26.11.2015 um 18:49 schrieb Simon Glass:
> On 25 November 2015 at 01:46, Heiko Schocher <hs at denx.de> wrote:
>> since:
>> commit: f05ad9ba "Add a way to skip relocation"
>>
>> tqm5200s board fails to boot. Reason is that
>> board_init_f has a function parameter bootflag,
>> which is not setup in
>> in arch/powerpc/cpu/mpc5xxx/start.S _start
>>
>> So board_init_f gets a undefined bootflag,
>> currently the gd pointer address. Unfortunately
>> this address sets the GD_FLG_SKIP_RELOC bit,
>> so u-boot code gets not relocated and u-boot
>> does not boot ...
>>
>> Init bootflag with 0, and tqm5200 boots fine again.
>>
>> Signed-off-by: Heiko Schocher <hs at denx.de>
>> ---
>> I added a nightly build to:
>> http://xeidos.ddns.net/buildbot/waterfall
>> http://xeidos.ddns.net/buildbot/builders/tqm5200s_ml_ub
>>
>> What does this nightly build:
>> - checkout current u-boot mainline code
>> - compile u-boot for tqm5200s board
>> - install u-boot image on the board with bdi
>> - run the image, and look if u-boot boots
>> ToDo:
>> - add more tbot [1] tests for this board
>>
>> Currently failing, as this patch is not in mainline,
>> but it should go to green, if this patch is applied,
>> cross your fingers ;-)
>>
>> [1] https://github.com/hsdenx/tbot
>>
>> arch/powerpc/cpu/mpc5xxx/start.S | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/powerpc/cpu/mpc5xxx/start.S b/arch/powerpc/cpu/mpc5xxx/start.S
>> index 94eb0d3..54793f0 100644
>> --- a/arch/powerpc/cpu/mpc5xxx/start.S
>> +++ b/arch/powerpc/cpu/mpc5xxx/start.S
>> @@ -91,6 +91,7 @@ _start:
>> li r5,GD_SIZE /* parameter 3: count */
>> bl memset
>>
>> + li r3, 0 /* parameter 1: bootflag */
>> bl board_init_f /* run 1st part of board init code (in Flash)*/
>> /* NOTREACHED - board_init_f() does not return */
>> #else
>> @@ -169,6 +170,7 @@ lowboot_reentry:
>> /* r3: IMMR */
>> bl cpu_init_f /* run low-level CPU init code (in Flash)*/
>>
>> + li r3, 0 /* parameter 1: bootflag */
>> bl board_init_f /* run 1st part of board init code (in Flash)*/
>>
>> /* NOTREACHED - board_init_f() does not return */
>> --
>> 2.1.0
>>
>
> Funny, these latent bugs!
That;s the salt in our programming life ;-)
BTW: I wonder if this bootflag is really used?
> Reviewed-by: Simon Glass <sjg at chromium.org>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list