Tiny Core Linux

Tiny Core Base => Corepure64 => Topic started by: nagtiny on October 26, 2016, 03:45:20 PM

Title: size of newly compiled and patched kernel
Post by: nagtiny on October 26, 2016, 03:45:20 PM
hello,

i patched the linux-4.2.9-patched.tar.xz with the dirty COW fix using config-4.2.9-tinycore64, and built it according to the wiki entry. everything worked as expected, but the size of the new kernel image is nearly twice as big as the original one. did i miss any compress option when making bzImage?

thanks!
Title: Re: size of newly compiled and patched kernel
Post by: aw on October 26, 2016, 10:34:35 PM
You need to compress the kernel modules (.ko -> .ko.gz) files using gzip.

You can have a look at my kernel Makefile https://github.com/Jidoteki/tinycore-kernel/blob/master/Makefile (https://github.com/Jidoteki/tinycore-kernel/blob/master/Makefile) for inspiration.
Title: Re: size of newly compiled and patched kernel
Post by: nagtiny on October 27, 2016, 04:42:00 AM
thanks for the answer, but because i do not change the kernel version (only patching the current one), i do not build the modules at all, i only build the kernel (make bzImage), and its the kernel image which is too big.
Title: Re: size of newly compiled and patched kernel
Post by: curaga on October 27, 2016, 05:40:11 AM
It sounds like the config was not applied, a 2x increase can't really be explained otherwise.
Title: Re: size of newly compiled and patched kernel
Post by: nagtiny on October 27, 2016, 08:42:27 AM
just to be sure, i recompiled 4.2.9 without my patch, here is what i did step by step:


the newly created bzImage is now 6.2MB.

did i miss something?
thank you
Title: Re: size of newly compiled and patched kernel
Post by: curaga on October 27, 2016, 02:48:37 PM
Your steps are correct, can't tell at a glance what would cause it.