public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] x86 ELF bootable kernels/Linux booting Linux/LinuxBIOS
@ 2002-01-30 19:54 Eric W. Biederman
  2002-01-30 21:19 ` Andrew Morton
  2002-01-30 21:32 ` H. Peter Anvin
  0 siblings, 2 replies; 52+ messages in thread
From: Eric W. Biederman @ 2002-01-30 19:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: H. Peter Anvin, Werner Almesberger, Erik A. Hendriks


I have been working on this quietly and now my pieces generally work,
and I am down to dotting the i's, and crossing the t's.  As my start
of pushing for inclusion I want to get some feedback (in case I have
missed something), and to give some feedback so people understand what
I am doing.


First the connections.
- I have a patch I am maintaining (kexec) for booting linux and other
  OS's from linux.  This patch is not x86 specific (it does take
  architecture specific code). It takes as input an ELF file.

- I am working on a native LinuxBIOS port of Linux, and LinuxBIOS
  takes as an input a ELF formated kernel.

- I need regularly network boot with etherboot, and an ELF formated
  kernel can be used natively.  bzImage needs help.

- It is a pain not when switching platforms alpha/ia32/xxx to have to
  completely change your toolchain for booting the linux kernel.

- I have a patch that makes the x86 linux kernel natively ELF
  bootable.


What a bootable ELF formatted kernel is.
- A list of segments that say load this chunk of file at this physical
  address. 

- An 32bit entry point. (64bit on 64bit platforms).

- Code at that entry point to query from the firmware/BIOS the
  information the kernel needs.


My next step is to integrate all of my pieces and do some cleanup but
I have functioning code for everything.

An x86 ELF bootable kernel:
ftp://download.lnxi.com/pub/src/linux-kernel-patches/linux-2.4.17.elf_bootable.diff

A patch to boot an arbitrary static ELF executeable.
ftp://download.lnxi.com/pub/src/linux-kernel-patches/linux-2.4.17.eb-kexec-apic-lb-mtd2.diff

A kernel fix to do proper SMP shutdown so that you can kexec on a SMP kernel
ftp://download.lnxi.com/pub/src/linux-kernel-patches/linux-2.4.17.eb-apic-lb-mtd2.diff

A kernel patch that implements minimal some LinuxBIOS support.
ftp://download.lnxi.com/pub/src/linux-kernel-patches/linux-2.4.18-pre7.linuxbios.diff

A standalone executable to adapt an existing x86 bzImage to be an ELF
bootable kernel.
ftp://download.lnxi.com/pub/src/mkelfImage/mkelfImage-1.12.tar.gz

A first draft of a specification that goes into detail about how an
ELF image is interpreted, and extensions that can be added so the
bootloader name, the bootloader version, and similar interesting but
functionally unnecessary information can be passed to the loaded 
image, and so the bootloader can find out similar kinds of information
about the ELF executable it is loading.
ftp://download.lnxi.com/pub/src/linuxbios/specifications/draft1_elf_boot_proposal.txt


For what it is worth I have gotten fairly positive feedback from both
the Etherboot and the LinuxBIOS communities so far.   And etherboot
and memtest86 have both been modified already to be ELF bootable.  And
there is current work that gets a long ways with Plan9.

My kexec work is direct competition to two kernel monte, bootimage,
lobos.  I have been using it in production for about a year, and I
haven't encountered real problems.  The biggest issue I have had is
with the kernel not properly shutting down devices.  

In the short term shutting down devices is trivially handled by
umounting filesystems, downing ethernet devices, and calling the
reboot notifier chain.  Long term I need to call the module_exit
routines but they need a little sorting out before I can use them
during reboot.  In particular calling any module_exit routing that clears
pm_power_off is a no-no.

Also while it should work in most cases any loaded ELF image that
starts using BIOS/firmware services to drive the hardware is on it's
own.  Putting all devices back in a state that they match the
firmwares cached state is a poorly defined problem.  However normal
firmware calls that ask if for the memory size or IRQ routing
information should work correctly.

More on etherboot can be found at:
http://www.etherboot.org

More on LinuxBIOS can be found at:
http://www.linuxbios.org

Eric

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

end of thread, other threads:[~2002-02-05  7:49 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-30 19:54 [RFC] x86 ELF bootable kernels/Linux booting Linux/LinuxBIOS Eric W. Biederman
2002-01-30 21:19 ` Andrew Morton
2002-01-30 23:52   ` Keith Owens
2002-01-31  2:42   ` Eric W. Biederman
2002-01-31  2:48     ` H. Peter Anvin
2002-01-31  4:27       ` Eric W. Biederman
2002-01-31  4:41         ` H. Peter Anvin
2002-01-31  5:15           ` Eric W. Biederman
2002-01-31  5:59             ` H. Peter Anvin
     [not found]               ` <m1n0yvaucy.fsf@frodo.biederman.org>
2002-01-31 17:57                 ` H. Peter Anvin
2002-01-31 22:34                   ` Eric W. Biederman
2002-01-31 22:52                     ` H. Peter Anvin
2002-02-01  7:52                       ` Eric W. Biederman
2002-01-31 17:35           ` Erik A. Hendriks
2002-01-31 23:36             ` Eric W. Biederman
2002-02-01  0:03               ` H. Peter Anvin
2002-02-01  9:03                 ` Eric W. Biederman
2002-02-01  9:25                   ` H. Peter Anvin
2002-02-01 15:42                     ` Eric W. Biederman
2002-02-01 18:26                       ` H. Peter Anvin
2002-02-02 16:17                         ` Eric W. Biederman
2002-02-02 21:06                           ` H. Peter Anvin
2002-02-02 23:02                             ` Eric W. Biederman
2002-02-03  1:56                               ` H. Peter Anvin
2002-02-03 18:43                                 ` Eric W. Biederman
2002-02-03 19:39                                   ` H. Peter Anvin
2002-02-03 22:18                                     ` Rob Landley
2002-02-03 22:24                                       ` H. Peter Anvin
2002-02-03 22:59                                         ` Rob Landley
2002-02-03 23:01                                           ` H. Peter Anvin
2002-02-03 23:47                                             ` Rob Landley
2002-02-04  1:34                                               ` H. Peter Anvin
2002-02-04  9:53                                             ` Marco Colombo
2002-02-04 16:19                                               ` H. Peter Anvin
2002-02-04 19:55                                     ` Eric W. Biederman
2002-02-04 20:51                                       ` Alan Cox
2002-02-04 20:40                                         ` H. Peter Anvin
2002-02-03 19:48                                   ` H. Peter Anvin
2002-02-04 20:16                                     ` Eric W. Biederman
2002-02-04  4:29                                   ` Keith Owens
2002-02-04 20:01                                     ` Eric W. Biederman
2002-02-04 12:49                         ` Werner Almesberger
2002-02-04 16:26                           ` H. Peter Anvin
2002-02-04 19:45                           ` Eric W. Biederman
2002-02-04 21:02                             ` Werner Almesberger
2002-02-04 21:08                               ` H. Peter Anvin
2002-02-05  7:45                                 ` Eric W. Biederman
2002-02-01  0:46               ` Keith Owens
2002-01-31  3:03     ` Keith Owens
2002-02-01  7:22       ` Greg KH
2002-01-30 21:32 ` H. Peter Anvin
2002-01-31  2:31   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox