Gentoo Archives: gentoo-embedded

From: Marcus Priesch <marcus@××××××××××××.at>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] build / test / target ... embedded system ...
Date: Wed, 03 Sep 2008 19:25:35
Message-Id: 1220469885.8351.33.camel@localhost
1 Hi gentoo-embeddeds,
2
3 i am a fellow gentoo user since nearly six or seven years now, and i
4 dont want to switch over to any other distribution out there, especially
5 when it comes to embedded linux stuff, gentoo for me is *THE* way to go!
6
7 however things could be more comfortable when it comes to cross
8 compiling, but this will evolve with time - i am sure - at least the
9 last post regarding "openmoko" "speaks out of my heart" (maybe there are
10 some german guys on this list who understand this phrase better) ;)
11
12 anyway, the crosscompiling stuff only hit me once when i wantetd to put
13 gentoo on a mips arch ... but there was a "denx" image already existing
14 so it was easier to crosscompile the few packages with this ... however,
15 gentoo was very helpful alsoin tis case as it had all the magic to cross
16 compile python for the 160MHz mips cpu ;)))
17
18 ok, enough of the introductory stuff ;) - now off to what i really want
19 to discuss with you ...
20
21 as i am mostly doing embedded gentoo on x86 hardware (epia and the like)
22 i currently have the following setup:
23
24 imagine you have lots of identical boxes around the world with only
25 remote access (ssh) running gentoo and want to have them all up to
26 date ...
27
28 i have
29 - development system chrooted or nfs-root (with all the dev stuff)
30 - test system (where i rsync only parts from the dev system -
31 mostly to save space, i leave out all the doc and dev-stuff)
32 - form this test system i make an image (via rsync into a loop-mounted
33 file)
34 - on the targets i have two root partitions who only differ
35 in /etc/fstab
36 - normally the target runs on "root1"
37 - i can upgrade (via rsync) from the image-file into "root2"
38 - then i switch over with grub to boot "root2" the next time
39 and define "root1" as the fallback if "root2" fails ...
40 - reboot
41 - if it was successful, i can log into "root2" and sync back
42 to "root1"
43 - if it wasnt successful, a check-script (via watchdog) triggers
44 a reboot, because of the "fallback" definede in grub, i end up
45 booting "root1"
46 -> so if the update doesnt work i can log in to the "old"
47 "root1" system and check what went wrong
48 -> if everything was successful, i sync "root2" to "root1",
49 reboot and everything is fine ;)
50
51 as i suppose that not only i have such a setup to maintain i would like
52 to discuss this approach with you - maybe we can come to an even better
53 solution ....
54
55 one thing which is not covered is the kernel upgrade ... or when the
56 system hangs when it boots "root2" ...
57
58 i assume a failsafe mechanism for a kernel upgrade will be hard to
59 find ... mind the dependency of /lib/modules/... along with different
60 kernel images ....
61
62 i know catalyst is out there, but i doubt it is flexible enough ... but
63 i would be fine off if you could teach me different ...
64
65 what are your approaches to such a scenario ... ?!?!
66
67 i also thought about building bin-pkgs and distributing them on the
68 targets ... is it possible to kepp all the .h and doc stuff out of a
69 bin-pkg ?!?!
70
71 well, thanks for reading this rather long post and i appreciate all your
72 comments !!!
73
74 thanks,
75 marcus.

Replies

Subject Author
Re: [gentoo-embedded] build / test / target ... embedded system ... Peter Stuge <peter@×××××.se>