[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Second round of powerpc subarch investigation : boot-loaders.



On Tue, Oct 21, 2003 at 07:36:57AM +0200, Sven Luther wrote:
> On Mon, Oct 20, 2003 at 12:45:47PM -0700, Tom Rini wrote:
> > On Mon, Oct 20, 2003 at 09:31:46PM +0200, Sven Luther wrote:
> > > On Mon, Oct 20, 2003 at 11:10:21AM -0700, Tom Rini wrote:
> > > > On Sun, Oct 19, 2003 at 11:29:38AM +0200, Sven Luther wrote:
[snip]
> > > > >   2) We develop a separate tool (like sparc's piggyback i was told)
> > > > >   which is able to add a initrd onto an existing kernel.
> > > > 
> > > > As the images used, prior to additional tools being run on them (such as
> > > > mkprep) use an ldscript to determine locations, this might be possible.
> > > 
> > > Mmm, i think it may be possible to create such a tool, altough i have
> > > the feeling that it must be built from the kernel sources maybe (since
> > > there is no need to duplicate the code for it already found in the
> > > kernel) and that it needs to be done differently for prep, chrp and
> > > pmac. Don't know if chrp-rs6k is different from chrp though.
> > 
> > It shouldn't need to be done differently on pmac, prep and chrp (and
> > chrp-rs6k is not different here, the difference is in mangling the final
> > image, more or less).  They all make use of the same variables, which
> > are in the linker script.
> 
> Which in turn is in the kernel source.

True, but they could be easily split out (or put in a package made by
the kernel..)

> > So if you can keep some intermediate images
> > around, things should be OK.  i.e. ship the 'zImage's in their last
> > state before they stop being true ELF files, and you can then modify
> 
> Is this the vmlinux found at the toplevel directory, and used directly
> by yaboot ?

No.  Each of arch/ppc/boot/{prep,chrp,pmac,simple} produce an ELF file
that has a kernel and optional ramdisk embedded inside of a wrapper to
relocate things and unpack them.  A very simple bootloader, if you will.

-- 
Tom Rini
http://gate.crashing.org/~trini/



Reply to: