WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?  (Read 2253 times)

Offline Ferns

  • Newbie
  • *
  • Posts: 14
Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« on: December 09, 2010, 01:50:10 AM »
I have rebuilt the TinyCore 3.x kernel using the patched source and the provided config which can be found in 3.x/release/src/kernel. Everything works (compile, install, run) but the modules section is much larger compared to the one found in the distribution (my version is around 37MB, the lib/modules in the 3.x distribution is around 3.4MB). As a result loading the OS is much slower. I guess the official TC distribution strips some unneeded kernel driver weight but there is no config or special script that I could find. Does someone have this missing link?
Background: I started this excercise because I ultimately need to upgrade my kernel to 2.6.34+ for it includes a Quanta multi-touchscreen driver. 
As an alternative maybe TC 3.5 (or TC 4.x) can upgrade the kernel to 2.6.35.9 (the last LTS kernel)? However, I rather be able to upgrade the kernel myself while keeping the core tiny :-)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #1 on: December 09, 2010, 02:21:12 AM »
The modules are stripped out into extensions named *2.6.33.3-tinycore.tcz

I didn't see a script to do this, but you could concatenate *2.6.33.3-tinycore.tcz.list for the full module listing.

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #2 on: December 09, 2010, 05:10:38 AM »
you can also do a
Code: [Select]
make localmodconfig

to get only the modules for your special system (requires all wanted modules to be loaded before that).
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #3 on: December 09, 2010, 08:20:38 AM »
The script is sorter.sh, in release/src/kernel.
The only barriers that can stop you are the ones you create yourself.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #4 on: December 09, 2010, 01:24:50 PM »
Do you need to upgrade the kernel or is it just that the modules are prepackaged with the new kernel?
Have you tried building this module? http://hidtouchsuite.sourceforge.net/
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Ferns

  • Newbie
  • *
  • Posts: 14
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #5 on: December 09, 2010, 04:27:25 PM »
Thanks for the various tips. Basically I am trying to determine if there is a standard way to take the generated
kernel (bzImage and modules) and turn it into tinycore.gz and/or microcore.gz. My current method works but is not complete because it just replaces the bzImage and tinycore.gz: I don't touch the various *.2.6.33.3-tinycore.tcz packages.
Basically you might say I'm messing up my system updating only part of the kernel modules.
I guess I'm getting too much ahead of the game trying to upgrade the kernel and it would be best for me to wait for a new official release (so that would be 4.x). That way I can be sure everything works.

Because my required change is small (I only need to add a simple driver) I did the following:
I copied the source files I needed from the latest kernel to the patched 2.6.33.3 linux.
I did the make clean, make oldconfig (setting my new module to 'y'), make menuconfig (just to verify) and make bzImage. The result was the successful creation of a new bzImage. My new bzImage is only 6K larger than the original version. I replaced the kernel image with the new version and now everything works perfectly, including the touchscreen. However, this method is not recommended for none-programmers :-)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: Rebuilding the kernel...TinyCore becomes Not-So-TinyCore?
« Reply #6 on: December 13, 2010, 10:15:01 AM »
Hi all, I'm interested in adding a little customization to TC myself (as well as gain some knowledge in building the system).  However, I can't even seem to get past the construction of the "ramdisk"!  Fern, what steps did you take to uncompress and recompress the initrd?  I've tried Googling and following the "remastering" section of the wiki here with no luck.  For the list of steps I'm currently taking, please refer to http://forum.tinycorelinux.net/index.php?topic=8068.0 (reply #10).  Any help the get me past this stump would greatly be appreciated. :)

Dave