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?
Asked
Active
Viewed 533 times
1
David Foerster
- 35,754
- 55
- 92
- 145
lihe
- 13
- 3
-
@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](/a/830723/175814) 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
-
1That'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
1 Answers
1
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.
Pilot6
- 88,764
- 91
- 205
- 313