From: Brian Kuschak <bkuschak@yahoo.com>
To: Jim Chapman <jim.chapman@iname.com>, LiuTao <tliu@ict.ac.cn>
Cc: LinuxPPC Developers List <linuxppc-dev@lists.linuxppc.org>,
"linuxppc-embedded@lists.linuxppc.org"
<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: need suggestions
Date: Tue, 23 Nov 1999 13:57:33 -0800 (PST) [thread overview]
Message-ID: <19991123215733.22049.rocketmail@web306.mail.yahoo.com> (raw)
Jim,
Here's yet another way to do it. We used a section
called .gzimage, but you could just as easily add it
to .text instead. Instead of using the
link/objcopy/compile/link method in the Makefile, do
this instead:
zvmlinux: $(OBJECTS) ../coffboot/vmlinux.gz
$(OBJCOPY) $(OBJCOPY_ARGS) -R .gzimage gzimage.o
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment
--add-section=.gzimage=../coffboot/vmlinux.gz
--set-section-flags=.gzimage=alloc,load,readonly,data
gzimage.o
$(LD) $(ZLINKFLAGS) -o $@ $(OBJECTS)
powerpc-elf-strip --strip-all $@
Create a dummy file called gzimage.c, where the zImage
data will be copied into section .gzimage:
/*
* gzimage.c
*
* dummy file to allow a compressed zImage to be added
* into a linker section, accessible by the boot code.
*/
char dummydummy;
Then add the following to the vmlinux.lds script, and
reference these symbols in your loader as extern
char[]. Modify the loader to load zImage data from
these addresses instead. I think this method will
work for initrd as well.
/* For loader only: Put the zImage after everything
* else
*/
_gzstart = . ;
.gzimage : { *(.gzimage) }
_gzend = . ;
-Brian Kuschak
> ... had to find
> a way to put the
> image section inside the text segment so that the
> image data would be
> copied by the vxworks bootrom. There may be a clever
> way to do that
> using ld scripts...
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~1999-11-23 21:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-23 21:57 Brian Kuschak [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-14 18:23 Need suggestions Ihor Lys
1999-11-23 19:52 need suggestions Jim Chapman
1999-11-23 20:54 ` Frank McPherson
1999-11-24 8:25 ` LiuTao
1999-11-23 1:42 LiuTao
1999-11-23 3:46 ` Dan Malek
1999-11-23 3:46 ` LiuTao
1999-11-23 6:14 ` Dan Malek
1999-11-23 18:47 ` Geert Uytterhoeven
1999-11-24 8:34 ` LiuTao
1999-11-24 10:26 ` Magnus Damm
1999-11-24 8:56 ` Neil Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19991123215733.22049.rocketmail@web306.mail.yahoo.com \
--to=bkuschak@yahoo.com \
--cc=jim.chapman@iname.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=tliu@ict.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).