WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: size of newly compiled and patched kernel  (Read 3614 times)

Offline nagtiny

  • Newbie
  • *
  • Posts: 7
size of newly compiled and patched kernel
« 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!

Offline aw

  • Newbie
  • *
  • Posts: 45
Re: size of newly compiled and patched kernel
« Reply #1 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 for inspiration.
github.com/aw

Offline nagtiny

  • Newbie
  • *
  • Posts: 7
Re: size of newly compiled and patched kernel
« Reply #2 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: size of newly compiled and patched kernel
« Reply #3 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.
The only barriers that can stop you are the ones you create yourself.

Offline nagtiny

  • Newbie
  • *
  • Posts: 7
Re: size of newly compiled and patched kernel
« Reply #4 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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: size of newly compiled and patched kernel
« Reply #5 on: October 27, 2016, 02:48:37 PM »
Your steps are correct, can't tell at a glance what would cause it.
The only barriers that can stop you are the ones you create yourself.