Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: lolouis on February 02, 2011, 05:05:18 PM

Title: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 02, 2011, 05:05:18 PM
I basically use the same custom kernel (2.6.35.10) for my linux distros on my various machines, the rationale being that it includes only what I need and only the modules needed by my hardware, thus avoiding any unnecessary waste of the resources available.
Besides the kernel patches that need to be applied to a new kernel, what are the requirements specific to TC that need to be included in the compilation so that everything will work well in Tiny Core Linux?
(things like ramdisk size, tmpfs (for sure), squashfs (?), etc.)
Title: Re: On compiling a new kernel for TC - the requirements
Post by: tinypoodle on February 02, 2011, 05:32:49 PM
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/src/kernel/
Title: Re: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 02, 2011, 08:24:31 PM
Thanks!!

I followed the Remastering wiki to unpack the initrd and I just can't believe it that the whole filesystem is only 19 MB...It's almost incredible to me that a modern system with Xwindows can take such a tiny little space on HD - I simply love it!  :)

One thing... How do I go about converting the kernel modules from x.ko to x.ko.gz? (the Remastering wiki doesn't say and I've looked around but could not find this information).
Thank you, and many thanks to all those who have contributed to the creation of this wonderful mini/micro distribution. I've seen many in this category over the past several days, but TCL seems to be the very best of all.
Title: Re: On compiling a new kernel for TC - the requirements
Post by: Juanito on February 02, 2011, 10:15:31 PM
One thing... How do I go about converting the kernel modules from x.ko to x.ko.gz? (the Remastering wiki doesn't say and I've looked around but could not find this information).

Code: [Select]
$ gzip x.ko
You can also use advcomp
Title: Re: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 03, 2011, 02:41:22 AM

Code: [Select]
$ gzip x.ko
You can also use advcomp

Ah, as simple as gzipping them? That was easy... :)
Seriously, I'd like to duplicate the same level of compression as in the original TCL modules, so advcomp is probably the way to go. Is there a specific code to be used with advcomp so as to achieve that exact level of compression? Thanks.
Title: Re: On compiling a new kernel for TC - the requirements
Post by: Juanito on February 03, 2011, 03:35:00 AM
Code: [Select]
$ advdef -z4 x.ko.gz
Title: Re: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 03, 2011, 11:41:52 AM
Code: [Select]
$ advdef -z4 x.ko.gz

So, not a question of either...or, but you first gzip 'em, then advdef 'em... My first time using advcomp.
Thanks!
Title: Re: On compiling a new kernel for TC - the requirements
Post by: Arslan S. on February 03, 2011, 12:31:43 PM
advdef recompresses the compressed files with advanced techniques as far as i know
Title: Re: On compiling a new kernel for TC - the requirements
Post by: tinypoodle on February 06, 2011, 01:39:16 PM
I followed the Remastering wiki to unpack the initrd and I just can't believe it that the whole filesystem is only 19 MB...It's almost incredible to me that a modern system with Xwindows can take such a tiny little space on HD - I simply love it!  :)

Not sure where you got that nr. from, here is 16.6MB which corresponds to what is observed in tmpfs on running system after boot (base norestore).
Title: Re: On compiling a new kernel for TC - the requirements
Post by: tinypoodle on February 06, 2011, 01:53:16 PM
advdef recompresses the compressed files with advanced techniques as far as i know

While doing some experimenting/benchmarking with various compression methods, I happened to observe that simply gzip'ing my previously gunzip'ed mydata.tgz with peazip's max. compression options would result in a slightly smaller size than recompressing mydata.tgz with advdef.
Advanced techniques must relate to gzip per se, as most other compressors I tried would achieve a significantly better compression ratio.
Title: Re: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 06, 2011, 04:47:35 PM
I followed the Remastering wiki to unpack the initrd and I just can't believe it that the whole filesystem is only 19 MB...It's almost incredible to me that a modern system with Xwindows can take such a tiny little space on HD - I simply love it!  :)

Not sure where you got that nr. from, here is 16.6MB which corresponds to what is observed in tmpfs on running system after boot (base norestore).

19 MB is what a 'df' showed after decompressing the original TCL filesystem with
'zcat tinycore.gz | cpio -i -H newc -d' on an ext2 partition sized about 1 GB.
Title: Re: On compiling a new kernel for TC - the requirements
Post by: tinypoodle on February 06, 2011, 05:42:38 PM
'du' would be the right tool for this  ;)
Title: Re: On compiling a new kernel for TC - the requirements
Post by: lolouis on February 06, 2011, 05:53:08 PM
But 'df' too, no?, since the uncompressed tinycore.gz files were the only files on that partition when I ran the 'df' command....