Difference between revisions of "FreeBSD"

From coreboot
Jump to: navigation, search
(Building LinuxBIOS)
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This article describes how to build LinuxBIOS v2 on FreeBSD and boot FreeBSD using LinuxBIOS and ADLO inside Qemu.
+
FreeBSD should work out of the box with SeaBIOS. In case of problems, please tell us through the [[Mailinglist]]
 
+
Alternatively you can boot FreeBSD using [[GRUB2]] as payload.
= Requirements =
 
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:
 
 
 
* <tt>devel/gmake</tt>
 
* <tt>devel/dev86</tt>. See details below.
 
 
 
To build LinuxBIOS on FreeBSD, you need
 
 
 
* <tt>devel/gmake</tt>
 
* <tt>lang/python</tt>. 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
 
 
 
* <tt>emulators/qemu</tt> with modifications. Please refer to the [[QEMU_Build_Tutorial#Building_Qemu_on_FreeBSD | QEMU Build Tutorial]] for details.
 
 
 
= Obtaining LinuxBIOS =
 
 
 
See [[Download_LinuxBIOS | 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 <tt>make</tt> utility is GNU make. This isn't true on FreeBSD (or the other BSDs for that matter), where GNU make is installed as <tt>gmake</tt>.
 
 
 
A patch which addresses this can be found [http://linuxbios.org/images/b/b6/LinuxBIOS_ADLO_FreeBSD.tgz 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 http://linuxbios.org/images/b/b6/LinuxBIOS_ADLO_FreeBSD.tgz
 
$ tar xzf LinuxBIOS_ADLO_FreeBSD.tgz
 
$ patch -p0 < LinuxBIOS_ADLO_FreeBSD.diff
 
 
 
= Building ADLO =
 
 
 
In order to boot FreeBSD using LinuxBIOS, ADLO is used as a payload. Therefore, it must be build before the LinuxBIOS image can be built. Building ADLO on FreeBSD requires that the 8086 development environment is installed. See the [[Booting_FreeBSD_using_LinuxBIOS#Building_the_8086_development_environment | following section]] for details.
 
 
 
ADLO is part of the LinuxBIOS v2 source tree and can be build by issuing the following commands from the top-level directory of your LinuxBIOS v2 source tree:
 
 
 
$ cd util/ADLO
 
$ gmake
 
 
 
You will now find the ADLO payload at <tt>util/ADLO/payload</tt>.
 
 
 
== Building the 8086 development environment ==
 
ADLO requires the <tt>devel/dev86</tt> port. This is a new port not yet included in the FreeBSD Ports tree, see Problem Report [http://www.freebsd.org/cgi/query-pr.cgi?pr=117480 ports/117480]. To build the port, download and extract the shell archive attached to the problem report.
 
 
 
$ ftp -o devel_dev.shar http://www.freebsd.org/cgi/query-pr.cgi?prp=117480-1-shar
 
$ sh devel_dev.shar
 
$ cd dev86
 
$ su
 
# make install
 
 
 
This has to be done only once, before building ADLO. You don't have to reinstall the port if you rebuild ADLO.
 
 
 
= Building LinuxBIOS =
 
 
 
The [[QEMU_Build_Tutorial | QEMU build tutorial]] covers all steps required to build LinuxBIOS for QEMU. As a quick reference, do:
 
 
 
$ cd targets
 
$ ./buildtarget emulation/qemu-i386
 
$ cd emulation/qemu-i386/qemu-i386
 
$ gmake
 
 
 
Make sure you use the <tt>gmake</tt> utility on FreeBSD!
 
 
 
= Booting FreeBSD inside QEMU =
 

Latest revision as of 16:27, 19 January 2014

FreeBSD should work out of the box with SeaBIOS. In case of problems, please tell us through the Mailinglist Alternatively you can boot FreeBSD using GRUB2 as payload.