I'm using the "canonical way" to build ubuntu kernel with ./debian/rules binary-generic. On my machine the build takes more than half an hour. Is there a way to quickly build only vmlinuz? In fact I need only the kernel binary image. After installing the new kernel from a deb package I update the kernel by replacing vmlinuz.
Asked
Active
Viewed 667 times
0
Al Izi
- 1
-
For reasons that I have never understood, the "canonical way" always does a build clean. There is no need to do that. I do not use the "cononical way" and incremental compiles, with only small change takes only a few minutes (on my computer, where a clean compile takes ~26 minutes). – Doug Smythies Sep 14 '17 at 16:22
-
So you do `make`, right? A different question then. How to use the configuration produced by `debian/rules updateconfigs` when building with make? – Al Izi Sep 14 '17 at 16:35
-
I use [this method](https://askubuntu.com/questions/718381/how-to-compile-and-install-custom-mainline-kernel/718662#718662). – Doug Smythies Sep 14 '17 at 16:41
-
I did not see that you edited your comment. Just steal the Ubuntu kernel configuration for the kernel version you are trying to build. Example: `cp /boot/config-4.4.0-93-generic .config` but disable debug. – Doug Smythies Sep 14 '17 at 16:52
-
So presumably I can make a "canonical ubuntu build" once, install the packages to the target machine and copy the resulting /boot/config file to the kernel sources folder and continue with "make build". This will allow to use both kinds of build. – Al Izi Sep 14 '17 at 17:00
-
I found that `make` also updates `.config` file so there is no way to modfy it before build. Is there a way to leave `.config` untouched? – Al Izi Sep 17 '17 at 02:53
-
Well, it checks the .config and does re-write it, but it shouldn't change anything, unless something is wrong. I also sometimes use "olddefconfig" to automatically use defaults for any new config stuff. See the link I gave above. – Doug Smythies Sep 17 '17 at 06:56