1 |
I too am working with a VIA based SBCs. A CLE266 version, CL10000; and a |
2 |
CN400 based one. |
3 |
|
4 |
If you ever want the hardware mpeg2 decoding take a look at |
5 |
http://gentoo-wiki.com/HOWTO_Unichrome |
6 |
|
7 |
|
8 |
-- |
9 |
heath holcomb |
10 |
liquidcable at bulah.com |
11 |
www.bulah.com |
12 |
|
13 |
On Friday 12 August 2005 04:19 am, Pierre Cassimans wrote: |
14 |
> I saw these errors also yesterday, but did not find enough time to submit |
15 |
> the comments yet :( |
16 |
> |
17 |
> I still had problems with the python-fchksum stuff and groff compiling. |
18 |
> |
19 |
> emerge python did the trick for the first thing and USE="-sandbox" emerge |
20 |
> -e system did it for the second. |
21 |
> |
22 |
> Those commands were available in howto version 0.6, not in the 0.7. But |
23 |
> they are still needed. |
24 |
> |
25 |
> For what package is the USE="-sandbox" needed? I thought sandbox was a |
26 |
> FEATURE flag? |
27 |
> |
28 |
> I'm also working on a VIA epia M9000 system. What i would like to do is |
29 |
> test the image (booting etc) on qemu before putting it on a compact flash. |
30 |
> It would be nice if we could bring together some info on that part too (Or |
31 |
> on other emulator soft). I will try to write it down while i work on this |
32 |
> part and will post it here. If people already did this stuff, please post |
33 |
> ;) |
34 |
> |
35 |
> Pierre Cassimans |
36 |
> |
37 |
> >From: "Marcel Romijn" <MRomijn@×××××××××××××××.com> |
38 |
> >Reply-To: gentoo-embedded@l.g.o |
39 |
> >To: <gentoo-embedded@l.g.o> |
40 |
> >Subject: RE: [gentoo-embedded] x86 SBC Gentoo Embedded HotTo version 0.07 |
41 |
> >Date: Fri, 12 Aug 2005 02:39:00 -0400 |
42 |
> > |
43 |
> >Hello Heath, |
44 |
> > |
45 |
> >Nice writedown! I haven't made it to the end yet (lack of time), but I'm |
46 |
> >getting there... |
47 |
> > |
48 |
> >I noticed some issues along the way (not counting grub begin spelled as |
49 |
> >"grug" or "gurb" ;-) ) |
50 |
> > |
51 |
> >In step 3 you write: |
52 |
> > |
53 |
> ><snip> |
54 |
> ># Set root password for the embedded_rootfs |
55 |
> >chromm /embedded_rootfs |
56 |
> >passwd |
57 |
> >rm /embedded_rootfs/etc/passwd- |
58 |
> >Exit |
59 |
> ></snip> |
60 |
> > |
61 |
> >I presume 'chromm' should have been 'chroot' ? |
62 |
> >If it is indeed 'chroot' then you should either do "rm /etc/passwd-" |
63 |
> >before the "exit" or the "exit" before the "rm |
64 |
> >/embedded_rootfs/etc/passwd-". |
65 |
> > |
66 |
> >A few lines down, you write: |
67 |
> > |
68 |
> ><snip> |
69 |
> >rm -R /embedded_rootfs/var/db/pkg/ * |
70 |
> ></snip> |
71 |
> > |
72 |
> >As a reletive newbie, doing a quick copy/paste of this command late in |
73 |
> >the evening as root in '/', this wiped out all files, except the ones |
74 |
> >that were firmly locked. |
75 |
> >Fortunately, I'm going through you HowTo in VMWare, so I could restore a |
76 |
> >previous snapshot ;-) |
77 |
> > |
78 |
> >I presume the space before the '*' should have been omitted? |
79 |
> > |
80 |
> ><snip> |
81 |
> >rm -R /embedded_rootfs/var/db/pkg/* |
82 |
> ></snip> |
83 |
> > |
84 |
> > |
85 |
> >My aim is to create an embedded Gentoo for a Via Epia ME6000, which |
86 |
> >reads the kernel and a ramdisk image from CF and then runs completely |
87 |
> >from RAM. |
88 |
> >If I'm not mistaken, you were heading for a Via Epia as well? |
89 |
> > |
90 |
> >Regards, |
91 |
> > |
92 |
> >Marcel Romijn |
93 |
> > |
94 |
> > |
95 |
> >-----Original Message----- |
96 |
> >From: Heath Holcomb [mailto:liquidcable@×××××.com] |
97 |
> >Sent: Monday, 08 August, 2005 4:17 |
98 |
> >To: gentoo-embedded@l.g.o |
99 |
> >Subject: [gentoo-embedded] x86 SBC Gentoo Embedded HotTo version 0.07 |
100 |
> > |
101 |
> >Version 0.07 |
102 |
> >Please add, delete, modify. Thanks! |
103 |
> > |
104 |
> >Several fixes. Root password now works. Several work arounds are no |
105 |
> >longer |
106 |
> >need, as the embedded Gentoo team has fixed them (I'm guess because I no |
107 |
> > |
108 |
> >longer get those errors). There is still one problem when "emerge -e |
109 |
> >system" |
110 |
> >for groff. Bug 98187 (http://bugs.gentoo.org/show_bug.cgi?id=98187). |
111 |
> >Check |
112 |
> >out the bug report for the temp fix/work around (USE="-sandbox" emerge |
113 |
> >-e |
114 |
> >system). |
115 |
> > |
116 |
> >I've update my website with this version also. |
117 |
> >http://www.bulah.com/embeddedgentoo.html |
118 |
> > |
119 |
> > |
120 |
> >#----------------------------------------------------------------------- |
121 |
> >--------- |
122 |
> ># Embedded Gentoo How-To for x86 |
123 |
> ># |
124 |
> ># A how-to guide to setup a Gentoo embedded environment, you must be |
125 |
> >root. |
126 |
> ># These commands are to be run on your development system, |
127 |
> ># any x86 Gentoo Linux computer will do. The system should be fast, |
128 |
> ># to speed development. The target can be any x86 based SBC. I'm |
129 |
> ># using a Geode based SBC. Latter I'll use a Via based SBC. |
130 |
> ># |
131 |
> ># version 0.07 |
132 |
> ># 2005.8.7 |
133 |
> ># |
134 |
> ># Heath Holcomb (heath at bulah.com) |
135 |
> ># Ned Ludd (original commands posted) |
136 |
> ># Lloyd Sargent (contributor) |
137 |
> ># Yuri Vasilevski (contributor) |
138 |
> ># Mike George (contributor) |
139 |
> ># Kammi Cazze (contributor) |
140 |
> ># Marius Schaefer (contributor) |
141 |
> ># |
142 |
> ># Definitions and Terms |
143 |
> ># system_rootfs = your regular rootfs, development computer |
144 |
> ># development_rootfs = what you use to build the embedded_rootfs |
145 |
> ># embedded_rootfs = rootfs you deploy to the target system |
146 |
> ># SBC = single board computer (here it's an x86 based) |
147 |
> ># |
148 |
> ># References |
149 |
> ># http://www.gentoo.org/doc/en/handbook/index.xml |
150 |
> ># http://www.epiawiki.org |
151 |
> ># http://epia.kalf.org |
152 |
> ># Gentoo embedded mailing list (gentoo-embedded@l.g.o) |
153 |
> ># |
154 |
> ># |
155 |
> ># Overview of process (steps) |
156 |
> ># 1 - Prepare the development_rootfs from your system_rootfs |
157 |
> ># 2 - Build the development_rootfs |
158 |
> ># 3 - Build the embedded_rootfs |
159 |
> ># 4 - Build and install non-system programs to the embedded_rootfs |
160 |
> ># 5 - Build and install a kernel to the embedded_rootfs |
161 |
> ># 6 - Deploy embedded_rootfs to target |
162 |
> ># |
163 |
> >#----------------------------------------------------------------------- |
164 |
> >--------- |
165 |
> > |
166 |
> >#----- Step 1 - Prepare the development_rootfs from your system_rootfs |
167 |
> >------- |
168 |
> > |
169 |
> ># You must be root. |
170 |
> >su - |
171 |
> > |
172 |
> ># Create the development_rootfs. |
173 |
> ># I use i586 because of target is a Geode processor. |
174 |
> >mkdir -p /opt/i586-gentoo-uclibc-linux/usr/portage |
175 |
> > |
176 |
> ># Download the latest stage 1 tarball. |
177 |
> >wget \ |
178 |
> >http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-ucl |
179 |
> >ibc-2005.0.tar.bz2 |
180 |
> > |
181 |
> ># Untar the stage to the development_rootfs. |
182 |
> >tar -xvjpf stage1-x86-uclibc-2005.0.tar.bz2 -C |
183 |
> >/opt/i586-gentoo-uclibc-linux/ |
184 |
> > |
185 |
> ># Mount the proc and portage directories to your development_rootfs. |
186 |
> ># Makes your system_rootfs's proc and portage directory available from |
187 |
> >inside |
188 |
> ># of your development_rootfs (after chrooting). |
189 |
> >mount --bind /proc /opt/i586-gentoo-uclibc-linux/proc/ |
190 |
> >mount --bind /usr/portage /opt/i586-gentoo-uclibc-linux/usr/portage |
191 |
> > |
192 |
> ># Copy over DNS information to the development_rootfs. |
193 |
> >cp /etc/resolv.conf /opt/i586-gentoo-uclibc-linux/etc/resolv.conf |
194 |
> > |
195 |
> ># Chroot into the development_rootfs. |
196 |
> >chroot /opt/i586-gentoo-uclibc-linux /bin/bash --login |
197 |
> > |
198 |
> > |
199 |
> >#----- Step 2 - Build the development_rootfs |
200 |
> >--------------------------------- |
201 |
> > |
202 |
> ># Create new environment and load variables into memory. |
203 |
> >env-update |
204 |
> >source /etc/profile |
205 |
> > |
206 |
> ># Modify make.conf file to your liking/needs. |
207 |
> >nano -w /etc/make.conf |
208 |
> ># This is for my target, Geode x86 processor. |
209 |
> >/* |
210 |
> >USE="bitmap-fonts minimal truetype-fonts mmx" |
211 |
> >CHOST="i586-gentoo-linux-uclibc" |
212 |
> >CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer -mmmx" |
213 |
> >CXXFLAGS="${CFLAGS}" |
214 |
> >FEATURES="buildpkg" |
215 |
> > |
216 |
> >VIDEO_CARDS="chips" |
217 |
> >UCLIBC_CPU="586MMX" |
218 |
> >*/ |
219 |
> > |
220 |
> ># Set profile to use 2.6 kernel. |
221 |
> ># The current stage uses 2.4 by default, and for most cases you are |
222 |
> >going |
223 |
> ># to want a 2.6.x kernel. |
224 |
> >cd /etc/ |
225 |
> >unlink make.profile |
226 |
> >ln -s ../usr/portage/profiles/uclibc/x86 make.profile |
227 |
> > |
228 |
> ># Start the bootstrap script. |
229 |
> >cd /usr/portage/scripts |
230 |
> >./bootstrap.sh -p -v |
231 |
> >./bootstrap.sh |
232 |
> > |
233 |
> ># Emerge the system ebuild for the development_rootfs. |
234 |
> >emerge -e system |
235 |
> > |
236 |
> >#----- Step 3 - Build the embedded_rootfs |
237 |
> >------------------------------------ |
238 |
> > |
239 |
> ># Create the embedded_rootfs directory. |
240 |
> >mkdir /embedded_rootfs |
241 |
> > |
242 |
> ># Emerge baselayout-lite into embedded_rootfs. |
243 |
> ># This gives your system a basic file structure. |
244 |
> ># 1.0_pre1 is the only one that is stable, right? |
245 |
> >cd /usr/portage/sys-apps/baselayout-lite/ |
246 |
> >ROOT=/embedded_rootfs emerge baselayout-lite-1.0_pre1.ebuild |
247 |
> > |
248 |
> ># Workaround 1 |
249 |
> ># Baselayout-lite is still beta, so a few fixes are needed. |
250 |
> ># There needs to be a directory "log" in /var. |
251 |
> ># Inittab calls for /usr/bin/tail, but it needs to /usr/bin. |
252 |
> >mkdir /embedded_rootfs/var/log |
253 |
> >nano -w /embedded_rootfs/etc/inittab |
254 |
> >/* |
255 |
> >#tty3::respawn:/usr/bin/tail -f /var/log/messages |
256 |
> >tty3::respawn:/bin/tail -f /var/log/messages |
257 |
> >*/ |
258 |
> > |
259 |
> ># Emerge uclibc into the embedded_rootfs. |
260 |
> ># Use the -K option because we don't get the extra files created by the |
261 |
> ># build/emerge process into our embedded rootfs which needs to be as |
262 |
> ># small as possible. |
263 |
> >ROOT=/embedded_rootfs emerge -K uclibc |
264 |
> > |
265 |
> ># Emerge busybox into the embedded_rootfs. |
266 |
> ># First you must emerge it into your development_rootfs. |
267 |
> ># This does not create the symlinks in our development embedded rootfs. |
268 |
> >emerge busybox |
269 |
> >ROOT=/embedded_rootfs emerge -K busybox |
270 |
> > |
271 |
> ># Create the symlinks for busybox in the embedded_rootfs. |
272 |
> >mkdir /embedded_rootfs/proc |
273 |
> >mount -o bind /proc/ /embedded_rootfs/proc/ |
274 |
> >chroot /embedded_rootfs /bin/busybox --install -s |
275 |
> >umount /embedded_rootfs/proc |
276 |
> > |
277 |
> ># Set time zone in your embedded_rootfs. |
278 |
> ># See http://leaf.sourceforge.net/doc/guide/buci-tz.html for details. |
279 |
> ># For central standard time in the US, use "CST6CDT". |
280 |
> >nano -w /embedded_rootfs/etc/TZ |
281 |
> >/* |
282 |
> >CST6CDT |
283 |
> >*/ |
284 |
> > |
285 |
> ># Install a boot loader (usually grug or lilo). |
286 |
> ># Once you copy/deploy your embedded_rootfs to your target SBC you will |
287 |
> ># have to run grub on the command line to write to the master boot |
288 |
> >record |
289 |
> ># (MBR). |
290 |
> ># For some reason not all of /boot/grub is copied over to the |
291 |
> ># embedded_rootfs, so a extra manual copy step is needed. |
292 |
> ># The --nodeps gets rip of the run time need of ncurses. |
293 |
> >emerge --nodeps grub |
294 |
> >ROOT=/embedded_rootfs emerge -K --nodeps grub |
295 |
> >cp -R /boot/grub /embedded_rootfs/boot/ |
296 |
> > |
297 |
> ># Modify your boot configure file. |
298 |
> ># The example below is for a gurb, for a boot partition on /dev/hda1 and |
299 |
> >only |
300 |
> ># one partition on the target SBC system. |
301 |
> >nano -w /embedded_rootfs/boot/grub/grub.conf |
302 |
> >/* |
303 |
> >default 0 |
304 |
> >timeout 10 |
305 |
> >splashimage=(hd0,0)/boot/grub/splash.xpm.gz |
306 |
> > |
307 |
> >title=Linux 2.6.x |
308 |
> >root (hd0,0) |
309 |
> >kernel /vmlinuz-2.6.x root=/dev/hda1 vga=792 |
310 |
> >*/ |
311 |
> > |
312 |
> ># Set root password for the embedded_rootfs |
313 |
> >chromm /embedded_rootfs |
314 |
> >passwd |
315 |
> >rm /embedded_rootfs/etc/passwd- |
316 |
> >exit |
317 |
> > |
318 |
> ># Modify fstab. |
319 |
> ># Below is mine, yours may vary. |
320 |
> >nano -w /embedded_rootfs/etc/fstab |
321 |
> >/* |
322 |
> >/dev/hda1 / reiserfs defaults |
323 |
> >0 0 |
324 |
> >none /proc proc defaults |
325 |
> >0 0 |
326 |
> >none /sys sysfs defaults |
327 |
> >0 0 |
328 |
> >none /dev/shm tmpfs defaults 0 0 |
329 |
> >*/ |
330 |
> > |
331 |
> ># Clean up the embedded_rootfs. |
332 |
> ># Don't know why these files are there in the first place, so if anyone |
333 |
> ># can tell me why..... |
334 |
> >rm -R /embedded_rootfs/var/db/pkg/ * |
335 |
> >rm -R /embedded_rootfs/var/lib/portage/ |
336 |
> > |
337 |
> >#---- Step 4 - Build and install non-system programs to the |
338 |
> >embedded_rootfs -- |
339 |
> > |
340 |
> ># Emerge other software you need for you embedded target. |
341 |
> ># This is very wildly depending on your needs. |
342 |
> ># Also your proprietary application will be done here. |
343 |
> >emerge foo* |
344 |
> >ROOT=/embedded_rootfs emerge -K foo* |
345 |
> > |
346 |
> > |
347 |
> >#---- Step 5 - Build and install a kernel to the embedded_rootfs |
348 |
> >------------- |
349 |
> > |
350 |
> ># Install a kernel into embedded_rootfs. |
351 |
> ># First we will emerge it into our development_rootfs, then configure |
352 |
> >and |
353 |
> ># build it. |
354 |
> >emerge vanilla-sources |
355 |
> >cd /usr/src/ |
356 |
> >cd linux |
357 |
> >make menuconfig |
358 |
> ># Configure your kernel for your TARGET SBC here. I HIGHLY suggest you |
359 |
> ># configure the kernel to compile everything into the kernel, and |
360 |
> >nothing |
361 |
> ># as a module. |
362 |
> >make |
363 |
> >ROOT=/embedded_rootfs make modules_install |
364 |
> >cp /usr/src/linux/arch/i386/boot/bzImage |
365 |
> >/embedded_rootfs/boot/vmlinuz-2.6.x |
366 |
> > |
367 |
> ># A few notes on compiling your kernel. |
368 |
> ># If deploying to Compact Flash/DiskOnChip/SD use ext2, as the |
369 |
> >journaling |
370 |
> ># filing systems "write" to much for a flash device. |
371 |
> ># If deploying to a hard drive use a journaling filing system, such as |
372 |
> ># ext3 or reiserfs. |
373 |
> > |
374 |
> > |
375 |
> >#---- Step 6 - Deploy embedded_rootfs to target |
376 |
> >------------------------------ |
377 |
> > |
378 |
> ># Prepare a Gentoo (or any Linux distro) system on the target SBC using |
379 |
> >a |
380 |
> ># harddrive. This is known as the target development rootfs. |
381 |
> ># We will create a partition (/embedded_rootfs) that will server as our |
382 |
> ># "test" partition to deploy our embedded_rootfs that we generate on our |
383 |
> ># development_system. |
384 |
> ># |
385 |
> ># I use the following partitions to speed development (yours may vary): |
386 |
> ># /dev/hda1 - /embedded_rootfs - 1 GB |
387 |
> ># /dev/hda2 - /boot - 100 MB |
388 |
> ># /dev/hda3 - swap - (size varies, 512 MB is a good number) |
389 |
> ># /dev/hda4 - / - (what is left, at least 1.5 GB per 2005.0 install |
390 |
> >guide |
391 |
> >specs) |
392 |
> ># |
393 |
> ># Copy over your embedded_rootfs from you development system to your |
394 |
> >target |
395 |
> ># system and the directory /embedded_rootfs. This needs to be done via |
396 |
> >NFS as |
397 |
> ># need to preserve the permissions. |
398 |
> ># |
399 |
> >#The following commands are done from the |
400 |
> ># target development rootfs. |
401 |
> >mount -t reiserfs /dev/hda1 /mnt/embedded_rootfs |
402 |
> >mount -t nfs\ |
403 |
> >192.168.0.10:/opt/i586-gentoo-uclibc-linux/embedded_rootfs\ |
404 |
> >/mnt/nfs_embedded_rootfs |
405 |
> >cp -adpR /mnt/nfs_embedded_rootfs/* /mnt/embedded_rootfs |
406 |
> > |
407 |
> > |
408 |
> ># Modify your target system's gurb.conf (or lilo.conf) for allow you to |
409 |
> >boot |
410 |
> ># to the embedded_rootfs partition. |
411 |
> ># |
412 |
> ># Reboot, and if all goes well you'll be greeted with a login prompt. |
413 |
> ># |
414 |
> ># Fin. |
415 |
> > |
416 |
> > |
417 |
> > |
418 |
> >-- |
419 |
> >heath holcomb |
420 |
> >liquidcable at bulah.com |
421 |
> >www.bulah.com |
422 |
> >-- |
423 |
> >gentoo-embedded@g.o mailing list |
424 |
> > |
425 |
> > |
426 |
> > |
427 |
> >-- |
428 |
> >gentoo-embedded@g.o mailing list |
429 |
|
430 |
-- |
431 |
gentoo-embedded@g.o mailing list |