All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Building the Bootloader
@ 1999-06-01 15:58 Christopher Beard
  1999-06-01 16:44 ` John David Anglin
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Beard @ 1999-06-01 15:58 UTC (permalink / raw)
  To: parisc-linux


> 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.)

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.

Before even trying to compile the kernel and getting it booting with the
current xcompiler/binutils, building a working IPL with the xcompiler
environment should be done.  This will tell us that yes in fact it is
doing the Right Thing and it will be far easier to debug. 

Chris

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Building the Bootloader
@ 1999-06-01 20:44 Jason Eckhardt
  1999-06-01 21:35 ` John David Anglin
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Eckhardt @ 1999-06-01 20:44 UTC (permalink / raw)
  To: dave, prumpf; +Cc: cjbeard, parisc-linux


> > > I think that I may have been able to successfully cross compile ipl to an
> > > elf binary with text starting at offset 0.  Note that this requires that
> > 
> > offset 0 sounds bad as we may not corrupt page 0 (the PDC puts some data we
> > need there).
>
> This is easily changed but seems consistent with the "-R 0" option to
> the hp linker used in Jason Eckhardt's Makefile.  It would appear that
> mkipl builds the actual image.  On the otherhand, no care was taken
> to compile using pic so there may be a relocation problem.
>

  Care was taken -- the ipl is position independent with the chosen 
  combination of flags and code design. The ipl makes no assumption about the
  location it will be loaded into by the ROM (see ipl_s.s). Text offset zero 
  is correct for linking in the scheme I have chosen. The bootloader determines
  where is was loaded at runtime and sets the dp and sp accordingly. All of
  this should be obvious from the code.

  The specific combination of flags allowed me to get something resembling
  a straight binary image (by ignoring the header) and position independence.
  For some reason I can't remember now, -fpic didn't get the job done
  (perhaps a compiler defect).

  In any case, I expect later that we will just link the ipl as a standard
  ELF and then extract the "actual" binary image from it (as chris mentioned
  earlier, and as mentioned in the HILO README). The point was to get a 
  simple bootloader going, which I did (there were no cross tools at that
  time, I therefore just used gcc on HPUX). Any number of tweaks can easily be
  made as needed.

  jason.

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

end of thread, other threads:[~1999-06-02 17:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-01 15:58 Building the Bootloader Christopher Beard
1999-06-01 16:44 ` John David Anglin
1999-06-01 17:18   ` Philipp Rumpf
1999-06-01 18:05     ` John David Anglin
1999-06-01 19:31       ` Philipp Rumpf
1999-06-01 20:03         ` John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
1999-06-01 20:44 Jason Eckhardt
1999-06-01 21:35 ` John David Anglin
1999-06-02 14:45   ` John David Anglin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.