[Qi] bad magic when booting from NAND

Michael Trimarchi trimarchi at gandalf.sssup.it
Wed Apr 8 11:48:56 CEST 2009


Hi,

Dmitry Kurochkin wrote:
> On Wed, Apr 8, 2009 at 1:12 PM, Michael Trimarchi
> <trimarchi at gandalf.sssup.it> wrote:
>   
>> Hi,
>>
>> Dmitry Kurochkin wrote:
>>     
>>> On Wed, Apr 8, 2009 at 12:18 PM, Michael Trimarchi
>>> <trimarchi at gandalf.sssup.it> wrote:
>>>
>>>       
>>>> Hi,
>>>>
>>>> Michael Trimarchi wrote:
>>>>
>>>>         
>>>>> Dmitry Kurochkin wrote:
>>>>>
>>>>>           
>>>>>> I did some more tests.
>>>>>>
>>>>>> When I do build unmodified qi, flash the image, it runs fine.
>>>>>>
>>>>>> But if I insert a single puts() line in src/cpu/s3c2442/start_qi.c :
>>>>>> start_qi, just after qi info is printed and before
>>>>>> bootloader_second_phase is called, it hangs and prints Ts.
>>>>>>
>>>>>>
>>>>>>             
>>>>> Two things. You are not in stepping stone size or just you don't have
>>>>> register
>>>>> what function must use puts. set_putc_func.
>>>>> Michael
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> Can you post your diff?
>>>>
>>>>         
>>> This is the only difference except for config.mk:
>>>
>>> diff --git a/src/cpu/s3c2442/start_qi.c b/src/cpu/s3c2442/start_qi.c
>>> index d7136fd..4dc4804 100644
>>> --- a/src/cpu/s3c2442/start_qi.c
>>> +++ b/src/cpu/s3c2442/start_qi.c
>>> @@ -113,6 +113,7 @@ void start_qi(void)
>>>        puts(", ");
>>>        puts((this_board->get_board_variant)()->name);
>>>        puts("\n");
>>> +       puts("HAHAHA\n");
>>>
>>>
>>>       
>> .text __steppingstone_always : AT (0x0)
>>       {
>>         src/cpu/s3c2442/start.o               (.text .rodata* .data .bss)
>>         src/cpu/s3c2442/lowlevel_init.o       (.text .rodata* .data .bss)
>>         src/cpu/s3c2442/start_qi.o            (.text .rodata* .data .bss)
>>         src/cpu/s3c2442/nand_read.o           (.text .rodata* .data .bss)
>>         src/cpu/s3c2442/serial-s3c24xx.o      (.text .rodata* .data .bss)
>>         src/memory-test.o                     (.text .rodata* .data .bss)
>>         src/utils.o                           (.text .rodata* .data .bss)
>>         src/ctype.o                           (.text .rodata* .data .bss)
>>         *                                     (.steppingstone)
>>       }
>> here is the stepping stone,do you have change any of these file? and add
>> code,
>> You have only 4kb :)
>>     
>
> I have modified start_qi.c only. Object files are clearly larger than
> 4kb. I do not understand this low level stuff well...
>   
The take only few section, I don't think it's larger. BTW you can remove 
for example
the memory-test object and having more space to add puts, or remove some 
puts and
see what happen.
> My goal is to add debug prints to nand reading code. What is the right
> way to do this without breaking the 4kb limit?
>
> Regards,
>   Dmitry
>
>   
>> Michael
>>     
>>>        /*
>>>         * jump to bootloader_second_phase() running from DRAM copy
>>>
>>> Regards,
>>>  Dmitry
>>>
>>>
>>>       
>>>> Michael
>>>>
>>>>
>>>>         
>>>       
>>     
>
>   




More information about the openmoko-kernel mailing list