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