1 |
On Tue, 24 Aug 2004 09:02:54 -0400 |
2 |
Jason Cooper <gentoo@××××××××××.net> wrote: |
3 |
|
4 |
> > We are running harddisk-less bering routers (when we get all of them |
5 |
> > up and running there will probably be over 200 of them) Those are |
6 |
> > pulling runtime packages on the fly. Even if we do that, we need to |
7 |
> > reboot during upgrades. This year there have been a numbers of |
8 |
> > upgrades and it would be very nice to prevent the reboots. It is |
9 |
> > possible. |
10 |
> |
11 |
> I think one of questions I have regards systems that have flash and |
12 |
> ram as their only means of storage. It's my understanding that the |
13 |
> initrd image must be written to the flash as a whole. |
14 |
|
15 |
I probably forgot to mention it, we run those boxes from cdrom and not |
16 |
from flash. |
17 |
|
18 |
> Of course, any changes to the running system would work, but would not |
19 |
> be persistent. In this case, a package system may not be desirable. |
20 |
|
21 |
Critical updates might want to be commited quick, remotely. (ssh, web |
22 |
interface) Download an updated package now. Send someone out to find |
23 |
those boxes and replace the cd in case of a UPS failure ore something |
24 |
like that. |
25 |
|
26 |
Or if you grab the runtime packages from network during boot, nfs |
27 |
whatever, you update your nfs server and upgrade the devices. |
28 |
|
29 |
> Doesn't mean it shouldn't |
30 |
> be an option, just that there should be some means of upgrading the |
31 |
> image on the host and then flashing the target(s). Also, target |
32 |
> package management tools should be optional. |
33 |
|
34 |
Yes, they should be optional. |
35 |
|
36 |
> I think both approaches have merit. |
37 |
> |
38 |
> Hypothetical build process: |
39 |
> |
40 |
> # emerge crossdev |
41 |
> |
42 |
> # crossdev --arch=powerpc ... |
43 |
> |
44 |
> # export EMBEDDED="powerpc" ??? pulled out of thin air :) |
45 |
> |
46 |
> build the kernel... then |
47 |
> |
48 |
> # export E_ROOTFS=/opt/powerpc/rootfs ??? same here... |
49 |
> |
50 |
> # emerge system (this will go to $E_ROOTFS, for $EMBEDDED) |
51 |
> |
52 |
> emerge individual packages (ssh, nfs, ntpd, ipkg-tools, etc) |
53 |
> |
54 |
> add your app (if needed). |
55 |
> |
56 |
> edit rc script for app. |
57 |
> |
58 |
> configure everything. |
59 |
> |
60 |
> disconnect loopback file (rootfs), compress |
61 |
> |
62 |
> flash. |
63 |
|
64 |
Have you tried: |
65 |
|
66 |
ROOT=/opt/.../rootfs emerge uclibc busybox |
67 |
|
68 |
You will get alot of unwanted stuff there too, but that is a good start. |
69 |
|
70 |
You can also try something like: |
71 |
|
72 |
PACKAGES="ssh nfs ntpd ipkg-tools ..." |
73 |
FEATURES="buildpkg nodoc noinfo noman" emerge $PACKAGES |
74 |
( cd $E_ROOTFS |
75 |
for i in $PACKAGES ; do |
76 |
tar -jxpf /usr/portage/packages/All/${i}-* |
77 |
done |
78 |
) |
79 |
|
80 |
To get "rid" of some of the depended stuff like gcc etc. |
81 |
|
82 |
In this last case, the "runtime" packages are used to build your rootfs |
83 |
- the difference is the time when the packages are extracted. In any |
84 |
case, we don't want gcc python perl etc in our target - so runtime |
85 |
packages or rootfs images end up with the same. |
86 |
|
87 |
What we have been doing until now is building a live rootfs in a |
88 |
directory and the build the runtime packages (apkg) from there. (so far |
89 |
this is with glibc) |
90 |
|
91 |
> Do I have the right idea? It almost looks like a separate |
92 |
> 'portage/embedded/' tree may be necessary so package maintainers |
93 |
> aren't bothered with embedded issues. The embedded tree would |
94 |
> essentially be ebuild wrappers pulling extra patches, etc. Maybe |
95 |
> '.e_ebuild' or '.eebuild'? |
96 |
|
97 |
I'm not sure if that is what we want. Maintaing 2 trees is double work. |
98 |
If it is not absolutely neccessary to have a separate tree, I think its |
99 |
better to avoid it. |
100 |
|
101 |
> I'm sure a lot of this has already been covered... Unfortunately, I |
102 |
> can't find the archives to browse. :( |
103 |
|
104 |
I am pretty new here too, so I might have wrong in my opinions. |
105 |
|
106 |
-- |
107 |
Natanael Copa |
108 |
|
109 |
-- |
110 |
gentoo-embedded@g.o mailing list |