0

I download kernel source from git://kernel.ubuntu.com/.../ubuntu/ubuntu-trusty.git. I need to compile version 4.4.0-31-generic on 14.04.4 lts 64bit, so I clone and checkout branch Ubuntu-lts-4.4.0-31.50-xxx-14.04.1.I use config-4.4.0-31-generic as config file from linux-image-4.4.0-31-generic package. After I compiled, I realize kernel version is 4.4.13 in Makefile and I found arbitrary kernel version config item seems not take effect and installed modules is more than 5000 but package in linux-image-4.4.0-31-generic just contain about 1000 modules. The modules I installed size is around 3G, the package just 39M. Am I did it a wrong way?

  • @DavidFoerster The first two answers are wrong there. This won't build a debianized Ubuntu kernel. – Pilot6 Jul 13 '17 at 21:32
  • Please refer to Aleksadr’s answer as the others won’t produce the same result that you want. – David Foerster Jul 13 '17 at 21:38
  • @Pilot6: better? – David Foerster Jul 13 '17 at 21:38
  • That's perfect. We need a canonical answer how to build an Ubuntu kernel. People mix up make and debian/rules way a lot. – Pilot6 Jul 13 '17 at 21:40
0

You built the kernel a wrong way. The Debian way to build a kernel is:

fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic

This will build the Ubuntu kernel 4.4.0-31 if you checked out the correct tag.

Not the answer you're looking for? Browse other questions tagged or ask your own question.