Gentoo Archives: gentoo-embedded

From: Heath Holcomb <hholcomb@×××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo/Documentation
Date: Wed, 27 Apr 2005 13:38:51
Message-Id: 200504270838.42828.hholcomb@txdigital.com
In Reply to: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo/Documentation by Heath H Holcomb
1 Version 0.01
2 Added Yuri's comments.
3 Please add, delete, modify. Thanks!
4
5 #---------------------------------------------------------------------------------------
6 # Embedded Gentoo How-To for x86
7 #
8 # Commands to setup a Gentoo embedded environment, you must be root.
9 # These commands are to be run on your developement system,
10 # any x86 Gentoo Linux computer will do. The system should be fast,
11 # to speed developement.
12 #
13 # version 0.01
14 # 2005.27.04
15 #
16 # Heath Holcomb (heath at bulah.com)
17 # Ned Ludd (original commands posted)
18 # Yuri Vasilevshi (contributor)
19 #---------------------------------------------------------------------------------------
20
21 # create the development project directory
22 mkdir -p /opt/i586-gentoo-uclibc-linux/usr/portage
23
24 # download the latest stage 1 tarball
25 wget \
26 http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2
27
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
31 # mount the new proc filesystem
32 # don't understand this someone please add comments
33 mount --bind /proc /opt/i586-gentoo-uclibc-linux/proc/
34 mount --bind /usr/portage /opt/i586-gentoo-uclibc-linux/usr/portage
35
36 # copy over DNS information to the chroot embedded build system
37 cp /etc/resolv.conf /opt/i586-gentoo-uclibc-linux/etc/resolv.conf
38
39 # chroot into the embedded build system
40 chroot /opt/i586-gentoo-uclibc-linux /bin/bash --login
41 env-update
42 source /etc/profile
43
44 # modify make.conf file to your liking
45 nano -w /etc/make.conf
46 # this is for my target, Geode x86 processor
47 CHOST="i586-gentoo-linux-uclibc"
48 CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx"
49 CXXFLAGS="${CFLAGS}"
50 FEATURES="buildpkg"
51
52 # work around for bug 90306
53 mknod -m 0444 /dev/random c 1 8
54 mknod -m 0444 /dev/urandom c 1 9
55
56 # start the bootstrip script
57 cd /usr/portage/scripts
58 ./bootstrap.sh -p -v
59 ./bootstrap.sh
60
61 # emerge system
62 emerge -e system
63 # fixes a emerge ebuild bug, this should go away soon
64 emerge python
65 # continue with the rest of the emerge system
66 emerge -e system
67
68 # modify make.conf and set you USE flags for the target embedded build
69 # these use flags build a smaller system with no documentation, man or info
70 pages installed
71 # the make-symlinks option of for busybox to automatically create the symlinks
72 to it
73 nano -w /etc/make.conf
74 USE="make-symlinks nodoc noinfo noman"
75
76 # build busybox and uclibc, put into /dev/shm
77 # don't understand exactally how this works, someone please add comments
78 ROOT=/dev/shm emerge busybox uclibc
79
80 # emerge other software you need for you embedded target
81 ROOT=/dev/shm emerge xxxxxxxxx
82
83
84
85 --
86 Heath Holcomb
87 heath@×××××.com
88 www.bulah.com
89 --
90 gentoo-embedded@g.o mailing list