Dave Rensberger | 6 Oct 2010 15:04
Favicon

Re: Pruning Filesystem

>[ELDK] Pruning Filesystem
>
>" Any pointers?  Is 60MB attainable?  Has anyone successfully pruned
>away the ELDK in this fashion?"

A couple of years ago, my company required me to use DENX, and I ran into the issue that you're seeing and
solved it in exactly the way that you describe (pruned the filesystem).  The reason I did this was because
(in 2008 anyway), the "Root File System Builder" didn't seem to work and I couldn't find any real
documentation for it.   Maybe this has changed over the past couple of years.  

It was fairly easy.  What you basically want to do is prune the "crosstool-targetcomponents-ppc_4xx"
package down to the bare essentials (basically down to just the standard C library and maybe a few other
shared objects).   If you look at the contents of the package, it becomes pretty obvious what you don't want
(header files, static libraries, toolchain components, gcj stuff).  I can send you my pruning script if
you'd like.  We eventually got the base distribution well below 50MB, which I don't really consider
"embedded sized", but it was good enough for my project's requirements.   I personally think this could all
be a whole lot easier if the C-library were just partitioned into a separate package.   I the "Root File
System Builder" works now, I'd be interested in hearing about it, bu
 t probably won't go back and change at this point, since we only use DENX in a legacy product at this point anyway.

--Dave    
Batsayan Das | 6 Oct 2010 15:46
Favicon

Re: Pruning Filesystem

The other way is

Download busybox and cross compile and install it say in a directory named 
"rootfs". This step will create  bin, sbin, usr etc. 
run crosstool-targetcomponents-ldd on any of the binaries generated in 
step 1, now you can find out the libraries required, create "lib" 
directory and  copy those libraries along with soft links to the "lib" 
directory of your root file system 
compile kernel and install modules in the "roofs" directory. 
create **empty** tmp, var, mnt,  sys directories inside "rootfs" directory
Now create etc, and put some basic files "inittab", and "init.d/rcS" 

Now your "rootfs" is ready. 

Regards,
Batsayan Das
Tata Consultancy Services
Mailto: batsayan.das@...
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________

From:
Dave Rensberger <David.Rensberger@...>
To:
"eldk@..." <eldk@...>
Date:
(Continue reading)

Detlev Zundel | 6 Oct 2010 16:54
Picon
Picon
Picon
Favicon

Re: Pruning Filesystem

Hi Batsayan Das,

> The other way is
>
> Download busybox and cross compile and install it say in a directory named 
> "rootfs". This step will create  bin, sbin, usr etc. 

Busybox populates /etc (apart from busybox.links or somesuch) these
days?  Really?  I certainly have to look into busybox again.

> run crosstool-targetcomponents-ldd on any of the binaries generated in 
> step 1, now you can find out the libraries required, create "lib" 
> directory and  copy those libraries along with soft links to the "lib" 
> directory of your root file system 
> compile kernel and install modules in the "roofs" directory. 
> create **empty** tmp, var, mnt,  sys directories inside "rootfs" directory
> Now create etc, and put some basic files "inittab", and "init.d/rcS" 
>
> Now your "rootfs" is ready. 

Did you test this at all?  Do things like pam utilities, telnet server,
etc. work?

Actually I kind of doubt it.  There are a few pretty important files in
/etc which are not directly coupled to busybox but still are central to
a functioning linux system.

The intent of rfsb was to alleviate regular users from the burden of
such "neccessary but boring" tasks.

(Continue reading)

Batsayan Das | 7 Oct 2010 08:52
Favicon

Re: Pruning Filesystem

> Busybox populates /etc (apart from busybox.links or somesuch) these
> days?  Really?  I certainly have to look into busybox again.

Not ment to say /etc directory. it it for etc...:). Pls note there is no 
comma(,) between usr and etc. 
Sometimes the CROSS_COPILE toolchain that comes with EVM does not have 
required binaries required to compile rfsb, so the only option is to start 
from the busybox. 

Say for example I set CROSS_COMPILE=arm_v5t_le- and rfsb is looking for 
arm_v5t_le-rpm, which is not available, how to proceed form here? 

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

_______________________________________________
eldk mailing list
eldk@...
(Continue reading)

Detlev Zundel | 7 Oct 2010 11:30
Picon
Picon
Picon
Favicon

Re: Pruning Filesystem

Hi,

>> Busybox populates /etc (apart from busybox.links or somesuch) these
>> days?  Really?  I certainly have to look into busybox again.
>
> Not ment to say /etc directory. it it for etc...:). Pls note there is no comma
> (,) between usr and etc.

Ok, with an unpopulated /etc directory, I have my doubts that the
resulting file system works to boot a Linux system.

> Sometimes the CROSS_COPILE toolchain that comes with EVM does not have
> required binaries required to compile rfsb, so the only option is to
> start from the busybox.

Oh yes, we are on the ELDK mailinglist and the RFSB is explicitely
coupled to it.  Please read the document explaining why we chose this
design[1].

> Say for example I set CROSS_COMPILE=arm_v5t_le- and rfsb is looking for
> arm_v5t_le-rpm, which is not available, how to proceed form here?

You cannot.  The design of selecting packages with RFSB is coupled to
the RPM distribution of the ELDK.

Best wishes
  Detlev Zundel

[1] http://git.denx.de/?p=rfsb.git;a=blob;f=doc/README
--

-- 
(Continue reading)

Detlev Zundel | 6 Oct 2010 16:40
Picon
Picon
Picon
Favicon

Re: Pruning Filesystem

Hi Dave,

[...]

> I the "Root File System Builder" works now, I'd be interested in
> hearing about it, but probably won't go back and change at this point,
> since we only use DENX in a legacy product at this point anyway.

Documentatino is still not very much, but you can try to checkout the
git repo as pointed out and do a "make menuconfig" with CROSS_COMPILE
and PATH setup correctly.  Complain from there ;)

Cheers
  Detlev
--

-- 
Microsoft gives you windows, Linux gives you the whole house.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@...

Gmane