Tiny Core Linux

General TC => General TC Talk => Topic started by: medvedm on May 09, 2011, 10:05:53 AM

Title: Removing stuff from TC
Post by: medvedm on May 09, 2011, 10:05:53 AM
Looking for advice about how to take stuff out of the TC base install that I don't need with the express purpose of making the filesize of the bzImage and tinycore.gz smaller.  I'm sure there are drivers and things I can remove from the kernel, so I'm going to start down that path, but if anyone has some sage advice, I'd love it.

I need drivers for all the devices on this board:

http://www.lippertembedded.com/en/lipperts-cool-xpressrunner-gs45.html

as well as the Ethernet chips on this guy:

http://www.rtd.com/PC104/UM/network/LAN25222.htm

But beyond that nothing else.

M
Title: Re: Removing stuff from TC
Post by: gerald_clark on May 09, 2011, 11:27:41 AM
You can recompile the source, but then it will not be portable.
Picking what to include will be your job, as will troubleshooting.
Unless you know how do do this, I suggest you do not.
Title: Re: Removing stuff from TC
Post by: medvedm on May 09, 2011, 12:03:45 PM
Portability isn't a goal... I'm looking to build a smaller image, which I understand makes it specific to the board I showed above.  That is OK, in fact that is exactly what I'm trying to do.  For example... I don't need any wireless, printer support, etc.  I'm willing to trade that for file size.

The instructions listed in the custom kernel wiki page are out of date and not really descriptive enough.  See:

http://wiki.tinycorelinux.net/wiki:custom_kernel

For example, I'm pretty sure the FTP link is incorrect and I can't seem to figure out which files I would need to get from http://distro.ibiblio.org/tinycorelinux/3.x/release/src/  to successfully build TC.

Can I remove modules out of the filesystem when doing an ezremaster?  That seems like a really error prone way to do it.

M
Title: Re: Removing stuff from TC
Post by: gutmensch on May 09, 2011, 12:51:44 PM
I've posted a script in the programming section, which remasters with only needed modules - but it requires to be run from the system, for which it should be created ;)

Other than that you only need the compiletc.tcz extension, download the linux-2.6.33.3-patched.tbz2 from http://distro.ibiblio.org/tinycorelinux/3.x/release/src/kernel/ and also config-2.6.33.3-tinycore, extract the first, copy the second to .config within the folder and you're ready to build. of course you can edit .config, you can also upx bzImage to reduce size, there are always options but most of them are already mentioned somewhere in the forum ;-)
Title: Re: Removing stuff from TC
Post by: gerald_clark on May 09, 2011, 02:38:25 PM
I had forgotten about Gutmensch's script.
That would be easiest.
Title: Re: Removing stuff from TC
Post by: tinypoodle on May 09, 2011, 05:40:39 PM
IME upx'ed kernel images do not work with all setups. Also it may depend which options are used with upx.
Title: Re: Removing stuff from TC
Post by: danielibarnes on May 09, 2011, 06:48:37 PM
Looking for advice about how to take stuff out of the TC base install that I don't need with the express purpose of making the filesize of the bzImage and tinycore.gz smaller.

Do you have a specific size requirement or are you looking to just optimize it?
Title: Re: Removing stuff from TC
Post by: medvedm on May 10, 2011, 05:00:50 AM
No specific requirement, I suppose under 8MB would be ideal.  The smaller the better w/o losing capability.
Title: Re: Removing stuff from TC
Post by: curaga on May 10, 2011, 05:08:58 AM
Then it's good to start with TC, since there is no wireless to remove in the base ;)

You can get rather good savings just removing unused modules with gutmensch's script. If you still need more, sort all files by size and remove the largest ones you don't need (find usr/ -type f -exec ls -l '{}' \; | sort -nk5). Fluff is rather big actually, now that I see it that high in the list.
Title: Re: Removing stuff from TC
Post by: MikeLockmoore on May 10, 2011, 11:02:44 AM
 :-[
Title: Re: Removing stuff from TC
Post by: curaga on May 10, 2011, 11:09:59 AM
Sorry. :) Everything's relative, fluff's still much smaller than other file managers.
Title: Re: Removing stuff from TC
Post by: MikeLockmoore on May 10, 2011, 02:21:50 PM
Maybe medvedm does not need any file manager in the remaster... kiosk mode?

But Curaga started me thinking of ways to strip Fluff file manager down a good bit more...  :o
Title: Re: Removing stuff from TC
Post by: tinypoodle on May 10, 2011, 02:32:00 PM
For me fluff has an excellent value-per-byte ratio, so I would rather have even features added at same ratio.

Giving priority to stripping what is really redundant, e.g. to particular hardware, is a good approach, and the script of gutmensch is very easy and fast.