Gentoo Archives: gentoo-embedded

From: Kammi Cazze <kammicazze@×××××××.com>
To: gentoo-embedded@l.g.o
Subject: RE: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo version 0.03 (unfinished)
Date: Fri, 29 Apr 2005 16:39:53
Message-Id: BAY23-F566DE09D7036DB511F892CB240@phx.gbl
In Reply to: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo version 0.03 (unfinished) by Heath H Holcomb
1 Hi,
2
3 first of all i like your id of putting such a howto up. I hope you will get
4 much help from the devs. I think the problem is that this project is in full
5 development and ways of accompishing things here vary very quickly and are
6 always made better and easier to do.
7
8 Here is some stuff you could put into it, because it won't change alot in
9 the feature ;)
10
11 - You could mention something about how to set the timezone on the uclibc
12 box. There is a full expl. on this site:
13 http://leaf.sourceforge.net/doc/guide/buci-tz.html
14
15 >ROOT=/Embedded RootFS emerge busybox uclibc
16
17 You could also put baselayout-lite in it. I don't know what the status is by
18 now (ask iggy)!
19
20 As on such a system devfs or udef is mostly unwanted, you will have to
21 create your /dev nodes manualy, because baselayout-lite only makes the most
22 neaded once, like /dev/hd* and /dev/sd*
23
24
25 Pierre Cassimans
26
27 >From: Heath H Holcomb <heath@×××××.com>
28 >Reply-To: gentoo-embedded@l.g.o
29 >To: gentoo-embedded@l.g.o
30 >Subject: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo version 0.03
31 >(unfinished)
32 >Date: Fri, 29 Apr 2005 08:49:21 -0500
33 >
34 >Version 0.03
35 >Please add, delete, modify. Thanks!
36 >
37 >
38 >#---------------------------------------------------------------------------------------
39 ># Embedded Gentoo How-To for x86
40 >#
41 ># Commands to setup a Gentoo embedded environment, you must be root.
42 ># These commands are to be run on your developement system,
43 ># any x86 Gentoo Linux computer will do. The system should be fast,
44 ># to speed developement. The target can be any x86 based SBC. I'm
45 ># using a Geode based SBC. Latter I'll use a Via based SBC.
46 >#
47 ># version 0.03
48 ># 2005.29.04
49 >#
50 ># Heath Holcomb (heath at bulah.com)
51 ># Ned Ludd (original commands posted)
52 ># Yuri Vasilevshi (contributor)
53 ># Mike George (contributor)
54 >#
55 ># Development RootFS = what you use to build the Embedded RootFS
56 ># Embedded RootFS = rootfs you deploy to the target system
57 ># SBC = single board computer (here it's an x86 based)
58 >#
59 ># References
60 ># http://www.gentoo.org/doc/en/handbook/index.xml
61 ># http://www.epiawiki.org
62 ># http://epia.kalf.org
63 ># Gentoo embedded mailing list (gentoo-embedded@l.g.o)
64 >#
65 >#
66 >#---------------------------------------------------------------------------------------
67 >
68 ># create the Development RootFS
69 ># I use i586 becasue of target is a Geode processor
70 >mkdir -p /opt/i586-gentoo-uclibc-linux/usr/portage
71 >
72 ># download the latest stage 1 tarball
73 >wget \
74 >http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2
75 >
76 ># untar the stage to the Development RootFS
77 >tar -xvjf stage1-x86-uclibc-2005.0.tar.bz2 -C
78 >/opt/i586-gentoo-uclibc-linux/
79 >
80 ># mount the Development RootFS proc and portage directories
81 ># don't understand this someone please add comments
82 >mount --bind /proc /opt/i586-gentoo-uclibc-linux/proc/
83 >mount --bind /usr/portage /opt/i586-gentoo-uclibc-linux/usr/portage
84 >
85 ># copy over DNS information to the Development RootFS
86 >cp /etc/resolv.conf /opt/i586-gentoo-uclibc-linux/etc/resolv.conf
87 >
88 ># chroot into the Development RootFS, create new environment, load
89 >variables
90 >into memory
91 >chroot /opt/i586-gentoo-uclibc-linux /bin/bash --login
92 >env-update
93 >source /etc/profile
94 >
95 ># modify make.conf file to your liking
96 >nano -w /etc/make.conf
97 ># this is for my target, Geode x86 processor
98 >CHOST="i586-gentoo-linux-uclibc"
99 >CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx"
100 >CXXFLAGS="${CFLAGS}"
101 >FEATURES="buildpkg"
102 >
103 ># work around for bug 90306
104 >mknod -m 0444 /dev/random c 1 8
105 >mknod -m 0444 /dev/urandom c 1 9
106 >
107 ># start the bootstrip script
108 >cd /usr/portage/scripts
109 >./bootstrap.sh -p -v
110 >./bootstrap.sh
111 >
112 ># emerge system
113 >emerge -e system
114 ># fixes a emerge ebuild bug, this should go away soon
115 >emerge python
116 ># continue with the rest of the emerge system
117 >emerge -e system
118 >
119 ># modify make.conf and set you USE flags for the target embedded build
120 ># these use flags build a smaller system with no documentation, man or info
121 >pages installed
122 ># the make-symlinks option of for busybox to automatically create the
123 >symlinks
124 >to it
125 >nano -w /etc/make.conf
126 >USE="make-symlinks nodoc noinfo noman"
127 >
128 ># build busybox and uclibc, put into the Embedded RootFS (/Embedded RootFS)
129 ># don't understand exactally how this works, someone please add comments
130 >mkdir /Embedded RootFS
131 >ROOT=/Embedded RootFS emerge busybox uclibc
132 >
133 ># emerge other software you need for you embedded target
134 >ROOT=/Embedded RootFS emerge xxxxxxxxx
135 >
136 ># install a kernel into Embedded RootFS
137 >ROOT=/Embedded RootFS emerge vanilla-sources
138 >cd /Embedded RootFS/usr/src
139 >ln -s linux-
140 >
141 >......... more stuff here ...........
142 >......... install xorg-x11, less than 10MB hopefully
143 >......... install light window manager (blackbox, windowmaker, ???)
144 >......... install very light X11 toolkit (?????)
145 >......... purge to the Embedded RootFS of unwanted files and libaries
146 >......... edit all config files
147 >......... set up the test harddrive on the target SBC
148 >......... install grub or lilo on the test harddrive on the target SBC
149 >......... transfer Embedded RootFS to the test harddrive on the target SBC
150 >......... debug system, and rebuild
151 >......... deploy Embedded RootFS from the test harddrive to flash
152 >......... (DiskOnChip, Compact Flash)
153 >......... tweak, rebuild, redeploy
154 >
155 >--
156 >Heath Holcomb
157 >heath@×××××.com
158 >www.bulah.com
159 >--
160 >gentoo-embedded@g.o mailing list
161 >
162
163 _________________________________________________________________
164
165
166 --
167 gentoo-embedded@g.o mailing list

Replies

Subject Author
RE: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo michael@×××××××××××××.com