LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Upload an image file
@ 2000-08-03 17:37 yuval
  0 siblings, 0 replies; 2+ messages in thread
From: yuval @ 2000-08-03 17:37 UTC (permalink / raw)
  To: linuxppc-dev


Hello,
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.
if I manually set the image section to be "alloc,load" the section is loaded
to the srecord file but not in the right offset.
I did understood that the srecords convert the addressed from the address
(vma, lma) and not from the offset (the offset is what the make file assign
to the ZIMAGE_OFFSET). this is also the case when I'm using Ice probe to
transfer the image.

Any help would be greatly appreciated.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: Upload an image file
@ 2000-08-03 18:37 Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2000-08-03 18:37 UTC (permalink / raw)
  To: yuval; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

In message <4.3.1.2.20000803192448.00adb470@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@denx.de
Heavier than air flying machines are impossible.
                    -- Lord Kelvin, President, Royal Society, c. 1895


[-- Attachment #2: img2srec.c.gz --]
[-- Type: application/x-gzip , Size: 2754 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-03 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-03 17:37 Upload an image file yuval
  -- strict thread matches above, loose matches on Subject: below --
2000-08-03 18:37 Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox