Upload an image file

Wolfgang Denk wd at denx.de
Fri Aug 4 04:37:42 EST 2000


In message <4.3.1.2.20000803192448.00adb470 at pop3> you wrote:
>
> I'm trying to install linux on ppc.
> I've compiled the kernel and trying to take the image (in
> arch/ppc/mbxboot/zImage) and transfer it to the "box", but if I'm using
> objcopy to transform it to srecords, the outcome is a file without the
> compressed linux image and when the gunzip start, it crash.

I think this is a FAQ, isn't it.

Anyway - the easiest way is to fool  all  tools  about  the  internal
structure  of  the image by removing all ELF headers; it also has the
beneficial side effect to save 64 kB of memory.

Try this:

    dd if=arch/ppc/mbxboot/zImage of=/tmp/image bs=64k skip=1
    powerpc-linux-objcopy -I binary -O srec /tmp/image /tmp/srec

Then download the S-record file "/tmp/srec".

You can go a step further and use specialized tools to  do  the  same
job:  the  attached  source  (provided by Ruedi Dummermuth at Abatron
with their BDI2000 BDM debugger) is such a tool - it  takes  care  to
also  exclude some other unnecessary data at the end of the image, so
it's especially useful when you need to minimize the memory footprint
of your image.

Maybe you should talk to your tool vendor  to  provide  similar  good
Linux support like Abatron.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Heavier than air flying machines are impossible.
                    -- Lord Kelvin, President, Royal Society, c. 1895

-------------- next part --------------
A non-text attachment was scrubbed...
Name: img2srec.c.gz
Type: application/x-gzip
Size: 2754 bytes
Desc: img2srec.c.gz
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20000803/f16b400a/attachment.bin>


More information about the Linuxppc-dev mailing list