Open Firmware: Difference between revisions

From OpenBIOS
Jump to navigation Jump to search
m (New patch for config.fth with "create pc-linux" enabled)
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


In 2006 the company of Open Firmware inventor Mitch Bradley, [http://firmworks.com/ Firmworks, Inc], released their Open Firmware implementation under a BSD license. This code shares some code with SUN's OpenBOOT implementation. It supports the x86 architecture and runs, amongst others, as a LinuxBIOS payload. It is the firmware implementation on the OLPC.
In 2006 the company of Open Firmware inventor Mitch Bradley, [http://firmworks.com/ Firmworks, Inc], released their Open Firmware implementation (OFW) under a BSD license. This code shares some code with SUN's OpenBOOT implementation. The open source OFW supports x86, PowerPC, and ARM architectures.  Other architectures, including SPARC and MIPS, may be added as time and interest dictate.


== Download ==
The x86 version is used on the OLPC "XO" computer.  The x86 version can be configured for numerous other environments, including
* Direct QEMU ROM (replacing the "bios.bin" that is supplied with QEMU
* Coreboot payload
* Loadable on directly on top of a conventional PC BIOS (booted from floppy or hard disk like an OS).  In this configuration it can run on an arbitrary PC, or on an emulator like QEMU, VirtualBox, or VMWare.


The code can be browsed online with the [http://openbios.org/viewvc/?root=OpenFirmware ViewVC facility].  
OFW can boot Linux directly from a disk file (FAT, ext2, ISO9660, or jffs2 filesystems) without the need for an intermediate bootloader like LILO or GRUB.  The Linux image can be in either ELF format (as created by the first phase of the Linux kernel compilation process) or in the "bzImage" format that "wraps" the ELF image. When booting an ELF image, OFW can read the ELF symbol table so OFW's assembly language debugger can resolve kernel symbols.


The repository is available through Subversion:
OFW can also boot other ELF standalone images, providing to them rudimentary "libc" capability.  That facility has been used for booting, for example, Minix, ReactOS, Plan9, Inferno and SqueakNOS.  The OLPC system ROM includes several such "standalone client programs", including MicroEMACS, memtest86, and NANDblaster (a facility for fast OS updates over multicast wireless).


You can check it out as follows:
On the OLPC system, OFW emulates enough legacy BIOS "real mode INTs" to boot Windows XP.  On another system, OFW supports booting Windows CE.
  $ svn co svn://openbios.org/openfirmware/


if you want a specific revision:
== Download ==
  $ svn co svn://openbios.org/openfirmware -r 35


If your company installed a firewall that blocks the svn port (3690) you can also check out using the webdav frontend:
You can [https://github.com/openbios/openfirmware browse the source code online].


$ svn co <nowiki>https://www.openbios.org/openfirmware-svn/ openfirmware</nowiki>
The repository is available through git:


You can check it out as follows:
  $ git checkout https://github.com/openbios/openfirmware.git


== LinuxBIOS ==
==Building Different Versions==
 
You should change openfirmware/cpu/x86/pc/biosload/config.fth:
 
Index: config.fth
===================================================================
--- config.fth  (revision 599)
+++ config.fth  (working copy)
@@ -2,14 +2,14 @@
purpose: Establish configuration definitions
create pc              \ Demo version for generic PC
-\ create pc-linux      \ Demo version for generic PC and Linux
+create pc-linux        \ Demo version for generic PC and Linux
\ create pc-serial    \ Demo version for generic PC
\ --- The environment that "boots" OFW ---
\ - Image Format - Example Media - previous stage bootloader
\ - (Syslinux) COM32 format - USB Key w/ FAT FS - Syslinux
-create syslinux-loaded
+\ create syslinux-loaded
\ - Linux kernel format - USB Key w/ FAT FS - LinuxBIOS w/ stripped Linux payload
\ create bzimage-loaded
@@ -19,10 +19,10 @@
\ create etherboot-variant  \ Enable additional tweaks for Etherboot
\ - ELF format (no pheader) - ROM - LinuxBIOS direct
-\ create linuxbios-loaded
+create linuxbios-loaded
\ Load and run in qemu
-\ create qemu-loaded
+create qemu-loaded
[ifdef] pc-serial
create serial-console
@@ -47,7 +47,7 @@
\ the point where Linux starts using the MMU.  It isn't strictly
\ necessary to use virtual mode if you just want to boot Linux
\ and then have OFW disappear.
-create virtual-mode
+\ create virtual-mode
create pc
create linux-support
[then]
 
 
== Building ==
 
Software Requirements:
    qemu-0.9.0 + ROMSIZE-patch
    Open Firmware rev. >= 500
    LinuxBIOS >= v2
 
=== Patch and build qemu ===
Get the patch from http://www.freimann.org/qemu_biossize.patch and apply it against qemu-0.9.0.
 
        tar xvfz qemu-0.9.0.tar.gz
        cd qemu-0.9.0
        wget http://www.freimann.org/qemu_biossize.patch
        patch -p1 < qemu_biossize.patch
 
Make sure that you have gcc-3.x installed, then
 
        ./config && make && make install
 
 
=== Build Open Firmware ===
Get Open Firmware from Subversion
        svn co svn://openbios.org/openfirmware
 
Change to the build directory of the biosload build.
        cd cpu/x86/pc/biosload/
 
To change the config file of Open Firmware you can either use the above patch, or you can edit config.fth with your favorite editor (vi!!1!). Uncomment the lines
        create linuxbios-loaded
        create qemu-loaded


Comment out the line with
* Direct QEMU ROM: see [[Building OFW for QEMU]]
        create syslinux-loaded
* Coreboot:  see [[OFW as a Coreboot Payload]]
* OLPC: see [[Building OFW for OLPC]]
* BIOS-loaded: see [[Building OFW to Load from BIOS]]
* ARM: see [[Building OFW for ARM]]


Now change to the build directory and type "make"
== Mailing List ==
        cd build
        make


After make is finished there should be a file "ofwlb.elf" in the same directory. Copy this to your LinuxBIOSv[x] directory.
There's an Open Firmware mailing list at:


=== Build LinuxBIOS ===
* http://www.openfirmware.info/mailman/listinfo/openfirmware.
Follow the instructions in the LinuxBIOS documentation. Make sure that you use the ofwlb.elf file as your payload.
It is also very imortant that the ROMSIZE for LinuxBIOS and qemu correspond with each other.


The mailing list archive is also available:


=== Run it ===
* http://www.openfirmware.info/pipermail/openfirmware/
    qemu  -L LinuxBIOSv3/build -hda path/to/disk.img -serial `tty` -nographic               
__NOEDITSECTION__

Latest revision as of 15:53, 9 December 2018

Introduction

In 2006 the company of Open Firmware inventor Mitch Bradley, Firmworks, Inc, released their Open Firmware implementation (OFW) under a BSD license. This code shares some code with SUN's OpenBOOT implementation. The open source OFW supports x86, PowerPC, and ARM architectures. Other architectures, including SPARC and MIPS, may be added as time and interest dictate.

The x86 version is used on the OLPC "XO" computer. The x86 version can be configured for numerous other environments, including

  • Direct QEMU ROM (replacing the "bios.bin" that is supplied with QEMU
  • Coreboot payload
  • Loadable on directly on top of a conventional PC BIOS (booted from floppy or hard disk like an OS). In this configuration it can run on an arbitrary PC, or on an emulator like QEMU, VirtualBox, or VMWare.

OFW can boot Linux directly from a disk file (FAT, ext2, ISO9660, or jffs2 filesystems) without the need for an intermediate bootloader like LILO or GRUB. The Linux image can be in either ELF format (as created by the first phase of the Linux kernel compilation process) or in the "bzImage" format that "wraps" the ELF image. When booting an ELF image, OFW can read the ELF symbol table so OFW's assembly language debugger can resolve kernel symbols.

OFW can also boot other ELF standalone images, providing to them rudimentary "libc" capability. That facility has been used for booting, for example, Minix, ReactOS, Plan9, Inferno and SqueakNOS. The OLPC system ROM includes several such "standalone client programs", including MicroEMACS, memtest86, and NANDblaster (a facility for fast OS updates over multicast wireless).

On the OLPC system, OFW emulates enough legacy BIOS "real mode INTs" to boot Windows XP. On another system, OFW supports booting Windows CE.

Download

You can browse the source code online.

The repository is available through git:

You can check it out as follows:

 $ git checkout https://github.com/openbios/openfirmware.git

Building Different Versions

Mailing List

There's an Open Firmware mailing list at:

The mailing list archive is also available: