Bringing up the openslug build on my Ubuntu 6.x systems.
As of openslug current on Feb 4, 2007.
I'm working on a robot Magellan
project and I've decided to try to use a NSLU2 running a customized
version of the openslug
root file system using the NSLU2-Linux
project. This page attempts to capture some of the learnings and
steps I had to take to get the thing to build.
To date I've thrashed around on no less that 4 different computers and
at least 3 different desktop distributions getting open embedded or
openslug to build. Each time I swore I'm going to keep notes as
it has taken me on the order of a few days bringing up the initial
build if I've walked away from the project for longer than a month or
two. This page is an effort to avoid having to spend
more than 4 hrs setting a system with a reasonable chance of finishing
the multi hour openslug build.
I have gotten openslug to build on the following systems +
distributions:
Pentium D desktop
|
64 bit Ubuntu 6.01 for x84_64
|
Open SuSE 10 and Ubuntu
|
Pentium III desktop
|
Linux From Scratch
|
|
T43 Pentium M Think pad laptop
|
Open Suse 10.1
|
Ubuntu 6.10
|
Toshiba PIII laptop
|
Ubuntu 6.01 (BTW having HW
issues with this guy)
|
|
I'm documenting the setup step for binging up the Ubuntu host
environments with this page. If anyone follows in my foot steps
and finds that I've missed a step, please send me a note so I can
update my documentation. <markgross@thegnar.org>
Initial setup:
Use apt-get to install the basic tool dependencies for OE building.
- apt-get install build-essential
- apt-get install libz-dev diffstat texi2html cvs subversion
texinfo gawk git
- apt-get install libboost-date-time-dev libboost-filesystem-dev
libboost-regex-dev libboost-serialization-dev libboost-test-dev
libboost-dev g+
Next setup the tools and download directories for a successful
build and future NSLUG and OE building adventures :)
- Get, build, and install monotone version 0.28 from source
code. This is not the latest version but its the version used by
the NSLUG project, that happens to be computable with the latest open
embedded still.
- If you go with the latest version of monotone, then you will
have to suffer through a monotone database re-build to convert the 0.28
version to the the latest. This is a painful and LONG process
(think 4hrs on a fast system) Overnight isn't out of the question
for the migration processing.
- Set up an oe_downloads directory to cache all the source tar
balls and patches used by the open embedded build. I use
$HOME/oe_downloads and then set up a symbolic link to this from within
the NSLUG or Open embedded build trees set up later.
- Go to the Intel Website for the IXP425 BSD files.
- you will have to register yourself and wait for the automated
email to send you the access passwd to get to the download pages.
- Get a few of the versions to the following files (you can build
the latest 2.3 version and the archived 2.1 version if you feel the
need to baseline your work)
- you want the NPE Access Library and the NPE micro code
libraries (
).
- Rename any BSD* files to IPL*
- generate the md5 files used by the OE build see the OpenSlug master
make file page for more details
md5sum -b
IPL_ixp400AccessLibrary-2_1.zip | awk '{print
$1}' > IPL_ixp400AccessLibrary-2_1.zip.md5
md5sum -b IPL_ixp400AccessLibrary-2_3.zip | awk '{print
$1}' > IPL_ixp400AccessLibrary-2_3.zip.md5
md5sum -b IPL_ixp400NpeLibrary-2_1.zip
| awk '{print $1}' > IPL_ixp400NpeLibrary-2_1.zip.md5
md5sum -b IPL_ixp400NpeLibrary-2_3.zip
| awk '{print $1}' > IPL_ixp400NpeLibrary-2_3.zip.md5
- place these files in you downloads directory.
Now get the openslug
master make
file and put it to use ;)
- mkdir nslug; cd nslug; ln -s $HOME/oe_downloads downloads
- wget --cache=off http://www.nslu2-linux.org/Makefile
- make openslug
- if you have a fully populated downloads directory and a T43 or
3Ghz Pentum D with 2Gig of ram then check on it in about 2hrs.
- If you are pulling down the source files then expect to run
overnight and come back tomorrow.
- BTW don't bother unless you have broad band internet access
- My downloads directory currently has 0.8 Gig worth of data in
it. (it has extra stuff form multiple OE build attempts, so yours
should initially be smaller)
- If it worked then you need to use the upslug2 to
program the image to your slug (after you get it into FW update mode.
- I use the following command on my linux host to program
my bits to the slug:
- upslug2 -d eth1 -i openslug-nslu2-4.2-beta-nslu2.bin
- Get the slug into FW update mode by pressing the reset button
just at the right time as the slug is booting up.
- technically you need to have the reset button down at some
point within the 2 second window the red boot boot loader is waiting
for
a console interrupt. It takes me a few tries to get it right.
- If you have a serial console you can get it into update mode
with the "upgrade" command issued after canceling out of the 2 second
wait.
Now if it didn't work, any of the following things could have happened
to you:
- The tips of the project you ended up with is busted.
- In this case you can use the version control system to get back
to a known good version
- I'm using
- OE Build Configuration:
BB_VERSION = "1.6.3"
OE_REVISION =
"1fc9a8356e9a0aa9e644e3ce7f8752e0748a6c1b"
TARGET_ARCH = "armeb"
TARGET_OS = "linux"
MACHINE = "nslu2"
DISTRO = "openslug"
DISTRO_VERSION = "4.2-beta"
TARGET_FPU = "soft"
- run "make update to get the tip of the day from the NSLU2
archives.
- TODO: re-figure out how to pull a specific OE_Version...
- Your hardware may be flaky. Like my 8 year old PIII
laptop. You may get build tools exiting with
segmentation faults after running for a few hours. You should
suspect that your hardware is flaky.
- The source code archives are not available, sometimes
temporarily, sometimes persistently.
- If the broken archive availability is persistent for more that
a week, you probably need to try refreshing your build scripts to the
current tips.
Very high level over view of the OpenSlug / open embedded build
structure
There are two parts to the build. Bit bake and Monotone.
Bit bake is a python based build system that reads these files called
*.bb files. These files from withing bit bake will build all the
code and will result in a distribution image to load on your NSLU2 (or
other
chosen Open Embedded target). Bit bake is maintained in a
subversion
system independent of the rest of the open embedded components, which
are maintained under a monotone archive. The *bb files are
maintained in a a monotone repository system. You only need to
deal with monotone when you update your bit bake recipes files.
Rant disclaimer: I will probably be eating my works in a few years if I
get deeper into OE development but for now monotone is just an entity
to tolerate and avoid as much as possible...
Monotone is a distributed version control system (where I have yet to
figure out how to get labeled versions checked out) that has a lot of
the flavor of git or Mecrueal, only unlike those, it will not work
across a proxied firewall. I don't like monotone as its a hassle
to build, hassle to use, and its database format is clearly evolving
(btw the database is a 100MB file) and very mysterious. Basically
the less I need to know about monotone the better I feel. This is
one reason the NSLUG master make file is so nice. It encapsulates
most of all the monotone knowledge you'll ever need.
This being said folks on the Oe and NSlug mailing lists defend
it. The good news is you don't need to worry about knowing
anything about monotone unless you need to update your *.bb files that
bit bake will use to build your target image.