[U-Boot-Users] [PATCH] Fix initrd length miscalculation in bootm command

Kumar Gala galak at kernel.crashing.org
Tue Feb 6 18:07:24 CET 2007


On Feb 6, 2007, at 9:11 AM, Timur Tabi wrote:

> Wolfgang Denk wrote:
>> In message <11707043793601-git-send-email-timur at freescale.com> you  
>> wrote:
>>> The do_bootm_linux() function was using the same variable ('len')  
>>> to calculate
>>> the the dtu length and the initrd length, which meant that the  
>>> initrd length
>>> was incorrect.  This patch creates renames 'len' and 'data' to  
>>> 'initrd_len'
>>> and 'initrd_data', thereby preventing any future confusion.  It  
>>> also deletes
>>> 'len' and 'data' because the dtu calculations don't actually need  
>>> them.
>>
>> I can't parse this. 'len' was used twice, but actually it wasn't used
>> in the second case, but you renamed the only remaining use it had?
>
> Sorry, it looks like I have a few typos in my description.  Here's  
> a new one:
>
> "The do_bootm_linux() function was using the same variable ('len')  
> to calculate
> the dtu length and the initrd length.  This meant that the initrd  
> length was
> incorrect when it came time to book the kernel.  This resulted in  
> the inability

book -> boot

> to boot with an initrd on an OF-based kernel.  This patch renames  
> the local
> variables 'len' and 'data' to 'initrd_len' and 'initrd_data',  
> respectively, and
> it uses initrd_len and initrd_data only for initrd calculations.
>
> In addition, there were a few places where 'len' and 'data' where  
> being used as
> temporary variables.  The code was modified to eliminate the need  
> for temporary
> variables."
>
> Does this explain everything?  Do you want me to resubmit the patch  
> with the new
> changelog text?

Did you test this with a multi image as well? (kernel + initrd + dtb)

- k




More information about the U-Boot mailing list