[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 04:58:08PM -0700, Tom Rini wrote:
> 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..)

Yep, which is what i did. I thought it was not working, but it turns out
i must have used a broken initrd. Also something i noticed is that when
you build a first time, and then try rebuilding, you need to remove the
chrp/image.o by hand or you loose one step of the build.
> 
> > > 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.

Yep, but kernel-package installs the toplevel vmlinux for pmac arches,
and doesn't care about the pmac image one.

Also, do you know what ther miboot.image is for ? There is also a
miboot.image.initrd i think or something such. The current miboot users
simply seem to hand compress the toplevel vmlinux kernel and that is it.

Friendly,

Sven Luther



Reply to: