From coreboot
Revision as of 12:12, 25 October 2007 by Phs (talk | contribs) (Obtaining and applying the required patches)
Jump to: navigation, search

This article describes how to build LinuxBIOS v2 on FreeBSD and boot FreeBSD using LinuxBIOS and ADLO inside Qemu.


All steps outlined in this article have been performed using FreeBSD 7.0-BETA1. Other versions of FreeBSD might work, too, but have not been tested. The patches mentioned in this article have been created against LinuxBIOSv2, Revision 2897.

In order to build ADLO on FreeBSD, you need the following ports installed:

  • devel/gmake
  • devel/dev86. See details below.

To build LinuxBIOS on FreeBSD, you need

  • devel/gmake
  • lang/python. At the time of writing this article, that port installs Python 2.4. Possibly other version of Python also work but haven't been tried.

To boot FreeBSD in QEMU you need

Obtaining LinuxBIOS

See this page on how to download LinuxBIOS. I recomment you checkout the latest Version of LinuxBIOS v2 using Subversion.

Applying the required patches

The LinuxBIOS build process assumes that the make utility is GNU make. This isn't true on FreeBSD (or the other BSDs for that matter), where GNU make is installed as gmake.

A patch which addresses this can be found here. To download and apply this patch, run the following commands from the top-level directory of your LinuxBIOS source tree (e.g. /home/phs/LinuxBIOSv2):

$ ftp
$ tar xzf LinuxBIOS_ADLO_FreeBSD.tgz
$ patch -p0 < LinuxBIOS_ADLO_FreeBSD.diff

Building ADLO

Building the 8086 development environment

ADLO requires the devel/dev86 port. This is a new port not yet included in the FreeBSD Ports tree, see Problem Report ports/117480. To build the port, download and extract the shell archive attached to the problem report.

$ ftp -o devel_dev.shar
$ sh devel_dev.shar
$ cd dev86
$ su
# make install

Building LinuxBIOS

Booting FreeBSD inside QEMU