Gentoo Archives: gentoo-embedded

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

Replies

Subject Author
Re: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo Heath H Holcomb <heath@×××××.com>