Gentoo Archives: gentoo-embedded

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

Replies

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