- Prerequisites:
- Install
linux_base
The first step is to install the Linux compatibility layer from ports
/usr/ports/emulators/linux_base/
or packages
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages/emulators/
Please make sure to install version 7.1_5 (linux_base-7.1_5.tbz
) or later;
in particular, version 6.1.5 which can also be found in the ports tree
does not work properly!
The compatibility layer is activated by
# kldload linux
- Install
bash
Since ELDK and Linux build scripts are organised around bash
while FreeBSD does
not have it in base, this shell needs to be installed either from ports
/usr/ports/shells/bash2/
or packages collection
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages/shells/
The installation puts the bash
binary in /usr/local/bin
. It is a good
idea to create a symlink in /bin
so that hash bang from scripts (#!/bin/bash
)
works without modifications:
# cd /bin
# ln -s /usr/local/bin/bash
- Prepare ELDK
This step is only needed for ELDK release 3.1 and older versions.
Copy the install files from the CDROM or ISO image to a writable location.
Brand the ELDK installer as Linux ELF file:
# cd <elkd_install_dir>
# brandelf -t Linux ./install
- Install ELDK normally as described in 3.5.3. Initial Installation
- Set envrionment variables and PATH as needed for ELDK (in bash); for example:
bash$ export CROSS_COMPILE=ppc_8xx-
bash$ export PATH=${PATH}:/opt/eldk/bin:/opt/eldk/usr/bin
- Hints for building U-Boot:
FreeBSD normally uses BSD-style 'make'
in base,
but in order to compile U-Boot 'gmake'
(GNU make) has to be used;
this is installed as part of the 'linux_base'
package (see above).
U-Boot should build according to standard ELDK instructions, for example:
bash$ cd /opt/eldk/ppc_8xx/usr/src/u-boot-1.1.2
bash$ gmake TQM823L_config
bash$ gmake all
- Hints for building Linux:
There are three issues with the Makefile
in the Linux kernel source tree: