1 |
--- Anthony Russello <arussello@××××××.com> wrote: |
2 |
|
3 |
> Hi Quentin, |
4 |
> |
5 |
> Thanks for getting back to me. |
6 |
> |
7 |
> Currently I'm working on the third option you listed |
8 |
> below. I've actually been building a base system |
9 |
> completely from scratch, utilizing busybox, glibc, |
10 |
> boa, samba 2.2.x, and sysvinit for the core apps. |
11 |
> |
12 |
> What I was hoping was that there would already be, |
13 |
> at |
14 |
> the very least, a package that would contain the |
15 |
> rootfs, device nodes, etc. |
16 |
|
17 |
So you want the ppc stage1 or stage2 tarball for this. |
18 |
It will need to be stripped out.... or you can just |
19 |
setup a chroot build env... search for uclibc gentoo |
20 |
in the forums or on the web. I don't see the webpage |
21 |
still up... hmmm. must have closed it... |
22 |
|
23 |
So, use a stage3 x86 tarball, untar into some big |
24 |
devel space. |
25 |
|
26 |
mount/bind proc & dev |
27 |
|
28 |
fix up etc/mtab to be correct. |
29 |
|
30 |
write a script something like |
31 |
|
32 |
mount -o bind /dev /path/to/devel/dev |
33 |
mount -t proc proc /path/to/devel/proc |
34 |
|
35 |
chroot /path/to/devel /bin/bash |
36 |
|
37 |
umount /path/to/devel/dev |
38 |
umount /path/to/devel/proc |
39 |
|
40 |
Perhaps add some locking to keep from running this |
41 |
twice ;-) |
42 |
|
43 |
once in devel space. emerge sync, emerge --update |
44 |
--deep world. Build the cross compiler per cross |
45 |
build howto which can be found in the forums. |
46 |
|
47 |
setup your make.conf for the cross env or write a |
48 |
wrapper script to emerge to set the |
49 |
ROOT=/new/ppc/fs/relative/to/devel/rootfs |
50 |
PATH=/path.../see/cross/build/notes emerge |
51 |
baselayout-lite busybox boa foo |
52 |
|
53 |
Have some lunch... check on the progress. Depending |
54 |
on your build host, start testing or go home for the |
55 |
day. |
56 |
|
57 |
|
58 |
Come back, NFS mount and test your system. Write a |
59 |
script to clone the rootfs you just built |
60 |
|
61 |
rsync /path/to/devel/opt/ppcrootfs /tmp/scratchroot |
62 |
rm somelistoffiles |
63 |
(have a look at the Catalyst scripts and then add |
64 |
some more as needed) |
65 |
|
66 |
See how small of a fs you can get. |
67 |
|
68 |
Don't forget to creat all of the symbolic links for |
69 |
busybox. You may need to inject a package to fool |
70 |
portage into thinking you have the basic unix utils |
71 |
packages already installed. |
72 |
|
73 |
Then you should be just about all set. |
74 |
|
75 |
Note: you really want the baselayout lite as you don't |
76 |
want to full runlevels system in an embedded app. |
77 |
Just a simple set of init scripts. Note, you can also |
78 |
use busybox for your init. This is what freescale |
79 |
does. |
80 |
|
81 |
>From there you can do almost anything. |
82 |
|
83 |
Just remember to save all packages for the future. |
84 |
You may need to re-create all of your work in say 2 |
85 |
years to fix a bug for a client. Backups are your |
86 |
friend. |
87 |
|
88 |
Have fun. |
89 |
|
90 |
Q |
91 |
|
92 |
|
93 |
|
94 |
|
95 |
> Also, I saw recent work on adding emerge to busybox, |
96 |
> which would be handy during initial development |
97 |
> (chroot'ing into the rootfs, and then using the |
98 |
> busybox emerge to install some packages). |
99 |
> |
100 |
> Any thoughts on this? |
101 |
> |
102 |
> Thanks, |
103 |
> Anthony |
104 |
> |
105 |
> --- Quentin Arce <qarce@×××××.com> wrote: |
106 |
> > |
107 |
> > |
108 |
> > Anthony, |
109 |
> > |
110 |
> > I have looked at this in my work and at home. |
111 |
> Work |
112 |
> > we |
113 |
> > have used the 8248 and 8245. Home, I am working |
114 |
> on |
115 |
> > a |
116 |
> > small x86 based system. Gentoo will work for your |
117 |
> > target... but, you really want to think about if |
118 |
> you |
119 |
> > should. Think long term support. Also, think |
120 |
> about |
121 |
> > the build system, stability. In working on my own |
122 |
> > mini x86 based linux distro based on Gentoo... So, |
123 |
> > far... you can do it. You can cross compile it, |
124 |
> > but, |
125 |
> > there are still some packages that don't seem to |
126 |
> > work |
127 |
> > just yet. You want the base layout lite. And you |
128 |
> > want a system based on Busybox for the size you |
129 |
> are |
130 |
> > targeting. Check out the portage profiles: |
131 |
> > |
132 |
> > /usr/portage/profiles/embedded |
133 |
> > /usr/portage/profiles/uclibc |
134 |
> > /usr/portage/profiles/default-ppc-2004.3 |
135 |
> > |
136 |
> > I am now using the uclibc for my x86 project. I |
137 |
> > used |
138 |
> > the default-ppc-2004.3 to build a 8248 rootfs. |
139 |
> The |
140 |
> > size was way too big to be burned into the flash |
141 |
> > though. |
142 |
> > |
143 |
> > You could come up with your own custom profile, |
144 |
> > inject |
145 |
> > any packages you need and then you could use |
146 |
> > portage. |
147 |
> > |
148 |
> > OR |
149 |
> > |
150 |
> > You could use something like Debian to build a |
151 |
> mini |
152 |
> > root and strip it of all cruft. (hint, hint) You |
153 |
> > could even do this on an x86 system and then write |
154 |
> a |
155 |
> > few scripts to fix the post scripts from the deb |
156 |
> > install. (hint hint) Then just sync the built |
157 |
> root |
158 |
> > to |
159 |
> > another directory, clean the clone and build a |
160 |
> jffs2 |
161 |
> > image. |
162 |
> > |
163 |
> > OR |
164 |
> > |
165 |
> > You can go the full custom route via LFS or your |
166 |
> own |
167 |
> > home grown. |
168 |
> > |
169 |
> > |
170 |
> > I have learned quite a bit since I started with |
171 |
> ppc |
172 |
> > embedded. I'm still learning with mini x86. |
173 |
> > |
174 |
> > Q |
175 |
> > |
176 |
> > |
177 |
> > |
178 |
> > --- Anthony Russello <arussello@××××××.com> wrote: |
179 |
> > > Hi, |
180 |
> > > |
181 |
> > > Thanks for the reply, I'm sorry it took so long |
182 |
> to |
183 |
> > > get back to you, but |
184 |
> > > I never received an email to me until the digest |
185 |
> > > caught up. |
186 |
> > > |
187 |
> > > We're working on a small NAS-like device. Very |
188 |
> > > light weight, and |
189 |
> > > targetting to consumers rather than businesses, |
190 |
> so |
191 |
> > > everything will be |
192 |
> > > pretty simple. |
193 |
> > > |
194 |
> > > I'm currently working on getting a 2.6.x kernel |
195 |
> up |
196 |
> > > on the early boards. |
197 |
> > > Once that's up and running, I'll be working on |
198 |
> the |
199 |
> > > rootfs. I've been |
200 |
> > > doing a lot of checking as far as dependencies |
201 |
> go, |
202 |
> > > and I've got the |
203 |
> > > libraries narrowed down substantially. We're |
204 |
> also |
205 |
> > > using the 2.2.x samba |
206 |
> > > branch, since the 3.x branch requires a large |
207 |
> > number |
208 |
> > > of libraries that |
209 |
> > > we don't want to include. |
210 |
> > > |
211 |
> > > I've been ensuring that every binary going into |
212 |
> > the |
213 |
> > > image is stripped so |
214 |
> > > far as well. |
215 |
> > > |
216 |
> > > I guess I was kind of hoping that the gentoo |
217 |
> > > embedded group was working |
218 |
> > > with small root filesystem sizes, and whether or |
219 |
> > not |
220 |
> > > there was a base |
221 |
> > > layout package that would simply contain things |
222 |
> > like |
223 |
> > > pre-populated /dev, |
224 |
> > > and other absolutely essential sources like |
225 |
> that. |
226 |
> > > |
227 |
> > > Are there any plans for such a package? Perhaps |
228 |
> > > with makefiles that |
229 |
> > > would leverage cross compilers to create a base |
230 |
> > > system for target X on |
231 |
> > > host Y? |
232 |
> > > |
233 |
> > > It would make embedded development incredibly |
234 |
> easy |
235 |
> > > with cross compilers |
236 |
> > > and base layout packages of that sort ready to |
237 |
> be |
238 |
> > > emerged into /opt or |
239 |
> > > something like that. |
240 |
> > > |
241 |
> > > Thanks, |
242 |
> > > Anthony |
243 |
> > > |
244 |
> > > On Tue, 2005-04-12 at 08:29 -0700, Quentin Arce |
245 |
> > > wrote: |
246 |
> > > > |
247 |
> > > > One thing you may want to keep in mind when |
248 |
> > > building |
249 |
> > > > your system is to make sure all bins are |
250 |
> > stripped. |
251 |
> > > |
252 |
> > > > Also, some embedded companies have tools which |
253 |
> > > > determine which libs are being used on the |
254 |
> > system |
255 |
> > > and |
256 |
> > > > remove all others from the final image. Just |
257 |
> to |
258 |
> > > > squeeze that last bit of space out. |
259 |
> > > > |
260 |
> > > > Also, don't forget to remove all other |
261 |
> un-needed |
262 |
> > > > files. Like /var/db, all man, etc. |
263 |
> > > > |
264 |
> > > > Q |
265 |
> > > > |
266 |
> > > > |
267 |
> > > > --- Anthony Russello <arussello@××××××.com> |
268 |
> > wrote: |
269 |
> > > > > Hi All, |
270 |
> > > > > |
271 |
> > > > > I'm working on a base layout for an embedded |
272 |
> > > system |
273 |
> > > > > based on the |
274 |
> > > > > Freescale 8241 chip, and was wondering what |
275 |
> > > might be |
276 |
> > > > > available in the |
277 |
> > > > > world of gentoo for that purpose. |
278 |
> > > > > |
279 |
> > > > > Here are the requirements we've laid out: |
280 |
> > > > > |
281 |
> > > > > Read/write /etc (jffs2 filesystem) |
282 |
> |
283 |
=== message truncated === |
284 |
|
285 |
|
286 |
|
287 |
|
288 |
__________________________________ |
289 |
Do you Yahoo!? |
290 |
Plan great trips with Yahoo! Travel: Now over 17,000 guides! |
291 |
http://travel.yahoo.com/p-travelguide |
292 |
-- |
293 |
gentoo-embedded@g.o mailing list |