Building the Bootloader

John David Anglin dave@hiauly1.hia.nrc.ca
Tue, 1 Jun 1999 12:44:46 -0400 (EDT)


> > Hm.  Okay then.  So what we need to do is fix the cross compiling of
> > mkipl.  I'll have a look at this.
>           
> There is some confusion here. The IPL does not have to be SOM, in fact, it
> wouldn't work correctly if it was. It's a raw binary format created using
> HP's linker by passing parameters to give it a zero offset, etc. (And
> which Jason Eckardt suggests could also be extracted from a valid ELF
> format binary given the right script.)

If the IPL could be extracted from an ELF binary, then it could be produced
on any system which supports cross compiling to HP/UX ELF format.

There also seems to be some confusion about the kernel and its format.
In order to debug it, it needs to be either an ELF or SOM binary with
symbol tables, .stabs info, etc.  Although I haven't looked at the
IPL, I would guess that it is designed to load an ELF binary.  There
are also file system issues.

> The confusion exists as currently, it can only be produced under HP/UX as
> there are still some issues with the xcompiler/binutils under x86 for the
> PA-RISC target. 
> 
> I haven't looked at this very closely, but when I attempted to generate a
> raw binary of the bootloader code with the xcompiler/binutils it either
> segfaulted or generated a 4 GB sparse file. There was a double free within
> binutils which was fixed, and some minor version mismatches, but still, it
> does not generate a working binary.

Obviously, the bootloader will be a pain to debug.  I think that I have
a working cross compiler running under hpux to produce ELF object files
and binaries.  I had a problem with ld which went away when I rebuilt
binutils with no optimization (-O0).

-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)