WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Removing stuff from TC  (Read 2994 times)

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Removing stuff from TC
« 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

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Removing stuff from TC
« Reply #1 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.

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Removing stuff from TC
« Reply #2 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

Offline gutmensch

  • Administrator
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Removing stuff from TC
« Reply #3 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 ;-)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Removing stuff from TC
« Reply #4 on: May 09, 2011, 02:38:25 PM »
I had forgotten about Gutmensch's script.
That would be easiest.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Removing stuff from TC
« Reply #5 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Removing stuff from TC
« Reply #6 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?

Offline medvedm

  • Newbie
  • *
  • Posts: 48
Re: Removing stuff from TC
« Reply #7 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: Removing stuff from TC
« Reply #8 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.
The only barriers that can stop you are the ones you create yourself.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Removing stuff from TC
« Reply #9 on: May 10, 2011, 11:02:44 AM »
 :-[

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: Removing stuff from TC
« Reply #10 on: May 10, 2011, 11:09:59 AM »
Sorry. :) Everything's relative, fluff's still much smaller than other file managers.
The only barriers that can stop you are the ones you create yourself.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Removing stuff from TC
« Reply #11 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

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Removing stuff from TC
« Reply #12 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)