[PATCH 01/11] [POWERPC] bootwrapper: Allow specifying of image physical offset

Kumar Gala galak at kernel.crashing.org
Thu Apr 10 20:53:48 EST 2008


On Apr 9, 2008, at 9:25 PM, Paul Mackerras wrote:
> Kumar Gala writes:
>
>> So now we can look at the vmlinux and determine the physical offset.
>> The question is how best to do that.  Here are the options I see:
>> * readelf, grep and parse output
>> * objdump grep and parse output
>> * simple C program that read's the elf and reports back
>
> Either readelf or objdump for now, and if that proves to be fragile we
> can look at a C program.  You could do:
>
> readelf -l $vmlinux | grep -m 1 LOAD | awk '{print $4}'
>
> or
>
> objdump -p $vmlinux | grep -m 1 LOAD | awk '{print $7}'
>
> There's not a lot of difference.  Since the wrapper already uses
> objdump, I think we should use objdump rather than making the wrapper
> depend on an additional program (readelf).
>
>> The other questions is if we'd ever have a vmlinux with more than one
>> PT_LOAD PHDR.  If so which one do we use (the one with the lowest
>> physical address)?
>
> I think we would take the first one.

Ok.  I've reworked this patch and sent in the new patch series.

- k



More information about the Linuxppc-dev mailing list