Ollie Lho <[EMAIL PROTECTED]> writes:

> Frankly speaking, I really don't get it why you have to change the ELF
> boot interface. We (other people than you) are just getting used to
> use ELF boot. IMHO, the 1.6 interface is good for most application.

The criticism is deserved, it hurts to make the change.   The reason
is that as it stood I didn't have a real chance to get into the linux
kernel, or being able to maintain the interface long term.  The change
was small but it plays much better with others.  And I needed to do it
now before too many people were settled into the old interface, the
pain could only get stronger.   

Additionally I gave warning, and published what I was doing but didn't
get a hey stop right now!

The change 1.6 -> 1.9 was simply:
1.6 linuxbios passed the memory size to the loaded image.
1.9 linuxbios wrote the memory size to a table.  The loaded image
    finds the table and reads it.

Other parameters count but all we really had was memory size.  Because
no important parameters are passed the ELF booting interface is actually
much simpler now.  

I also promise not to break the ELF booting again.

> BTW, does mkelfImage works for any (statically linked) ELF file,
> not only Linux kernel ?? 

The name is bad.  Essentially the linux kernel is buggy, so I needed
mkelfImage.  For a normal ELF file mkelfImage shouldn't be needed.

> Is it correct that in order to be loaded
> by ELF boot, one has to
> 
>       1. Use the ube_start.S instead of the usual crt0.S used by gcc.
>       2. Use gcc's crt0.S and convert with mkelfImage.

Nope:  It is even simpler all you need to do is have a valid ELF file.
Know how to find the linuxBIOS table.
Know how to read the parameters you need out of the linuxbios table.

gcc's default crt0.S cannot be used because it makes operating system
calls.  And otherwise assumes you are running under an operating system.
 
> And what does the convert_params.c do for ELF that is not Linux
> kernel ??

O.k. mkelfImage is in essence my playground for prototyping changes to 
the linux kernel.  

As it stands right now with a small patch to the linker script to get
the physical addresses correct, and a small patch to another small
patch to head.S so the linux kernel does not use segments before it
loades them, and a final small patch to setup.c to find my table and
read out the memory size we could load vmlinux unpatched.

For etherboot my changes consist of removing calls to 16bit BIOS
interfaces, that linuxBIOS doesn't support.  And reading the memory
size from the linuxBIOS table.

With the changed interface we have a real chance of getting some level
of linuxBIOS support into the 2.4.x linux kernel.

Eric

Reply via email to