1 |
I'm trying to document a Gentoo embedded build for a x86 target SBC (single |
2 |
board computer, Geode and Via C3). I'm using a development computer to build |
3 |
the actual system, it's an Athlon based Gentoo system. Once the embedded |
4 |
system is built I'll copy the embedded filing system to a harddrive on the |
5 |
target SBC. I'll prepare the partitions on the target harddrive using a |
6 |
Gentoo live CD. Once I've worked out all the bugs, I'll copy the harddrive |
7 |
filing system to flash (DiskOnChip or compact flash). |
8 |
|
9 |
The following are the steps I done so far. Please add, modify, and remove |
10 |
steps to this so I can get it "right" and also for anyone else. Also all |
11 |
comments about the commands to better explain what the command does. I'll |
12 |
post the "final" version to my website and the Gentoo Forums. This document |
13 |
is for x86 embedded SBC only (or cross development). |
14 |
|
15 |
FYI - I'm not a programmer, I'm a electronics engineering (hardware only very |
16 |
lite C and assembly). |
17 |
|
18 |
Also what do I do next? I need X and Blackbox or Windowmaker, how I do that |
19 |
and keep the build small? |
20 |
|
21 |
# Commands to setup a Gentoo ebmedded enviroment |
22 |
# you must be root |
23 |
# create the development project directory |
24 |
mkdir -p /opt/i586-gentoo-uclibc-linux/usr/portage |
25 |
# download the latest stage 1 or 2 |
26 |
wget |
27 |
http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2 |
28 |
# untar the stage to the project directory |
29 |
tar -xvjf stage1-x86-uclibc-2005.0.tar.bz2 -C /opt/i586-gentoo-uclibc-linux/ |
30 |
# mount the new proc filesystem |
31 |
mount --bind /proc /opt/i586-gentoo-uclibc-linux/proc/ |
32 |
mount --bind /usr/portage /opt/i586-gentoo-uclibc-linux/usr/portage |
33 |
# copy over DNS information to the chroot embedded build system |
34 |
cp /etc/resolv.conf /opt/i586-gentoo-uclibc-linux/etc/resolv.conf |
35 |
# chroot into the embedded build system |
36 |
chroot /opt/i586-gentoo-uclibc-linux /bin/bash --login |
37 |
# modify make.conf file to your liking |
38 |
nano -w /etc/make.conf |
39 |
# work around for bug 90306 |
40 |
mknod -m 0444 /dev/random c 1 8 |
41 |
mknod -m 0444 /dev/urandom c 1 9 |
42 |
# start the bootstrip script |
43 |
cd /usr/portage/scripts |
44 |
./bootstrap -p -v |
45 |
# emerge system |
46 |
emerge -e system |
47 |
# fixes for a ebuild bug |
48 |
emerge python |
49 |
# continue with the rest of the emerge system |
50 |
emerge -e system |
51 |
# modify /etc/make.conf to the target |
52 |
# this is for my target, Geode x86 processor |
53 |
CHOST="i586-gentoo-linux-uclibc" |
54 |
CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" |
55 |
CXXFLAGS="${CFLAGS}" |
56 |
FEATURES="buildpkg" |
57 |
# build busybox and uclibc, put into /dev/shm |
58 |
ROOT=/dev/shm emerge busybox uclibc |
59 |
|
60 |
|
61 |
** most of this was taken form Ned Ludd e-mails ** |
62 |
|
63 |
-- |
64 |
xcable |
65 |
heath holcomb |
66 |
heath@×××××.com |
67 |
-- |
68 |
gentoo-embedded@g.o mailing list |