Re-building Linux kernel without âcleanâ
Clash Royale CLAN TAG#URR8PPP
up vote
9
down vote
favorite
I'm building a custom kernel based off 4.11 (for Mintx64, if it matters). I've already compiled and installed it to prove that it works. Now I've made a few small changes to a couple of files (in the driver and net subsystems, this is why I need to compile a custom kernel in the first place!)
Now I want to build the modified kernel. However when I run
fakeroot make -j5 deb-pkg LOCALVERSION=myname KDEB_PKGVERSION=1
The build system appears to start by "clean"-ing a whole load of stuff, so I stopped it quickly. Unfortunately the computer I'm using is not blessed with a good CPU and takes many hours to build from scratch. Therefore I'd rather avoid doing it again if possible!
Is it possible to make just an incremental build without everything be "clean"d or is this a requirement of the kernel build system?
The output I got was:
CHK include/config/kernel.release
make clean
CLEAN .
CLEAN arch/x86/lib
...
linux-mint kernel compiling
add a comment |Â
up vote
9
down vote
favorite
I'm building a custom kernel based off 4.11 (for Mintx64, if it matters). I've already compiled and installed it to prove that it works. Now I've made a few small changes to a couple of files (in the driver and net subsystems, this is why I need to compile a custom kernel in the first place!)
Now I want to build the modified kernel. However when I run
fakeroot make -j5 deb-pkg LOCALVERSION=myname KDEB_PKGVERSION=1
The build system appears to start by "clean"-ing a whole load of stuff, so I stopped it quickly. Unfortunately the computer I'm using is not blessed with a good CPU and takes many hours to build from scratch. Therefore I'd rather avoid doing it again if possible!
Is it possible to make just an incremental build without everything be "clean"d or is this a requirement of the kernel build system?
The output I got was:
CHK include/config/kernel.release
make clean
CLEAN .
CLEAN arch/x86/lib
...
linux-mint kernel compiling
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28
add a comment |Â
up vote
9
down vote
favorite
up vote
9
down vote
favorite
I'm building a custom kernel based off 4.11 (for Mintx64, if it matters). I've already compiled and installed it to prove that it works. Now I've made a few small changes to a couple of files (in the driver and net subsystems, this is why I need to compile a custom kernel in the first place!)
Now I want to build the modified kernel. However when I run
fakeroot make -j5 deb-pkg LOCALVERSION=myname KDEB_PKGVERSION=1
The build system appears to start by "clean"-ing a whole load of stuff, so I stopped it quickly. Unfortunately the computer I'm using is not blessed with a good CPU and takes many hours to build from scratch. Therefore I'd rather avoid doing it again if possible!
Is it possible to make just an incremental build without everything be "clean"d or is this a requirement of the kernel build system?
The output I got was:
CHK include/config/kernel.release
make clean
CLEAN .
CLEAN arch/x86/lib
...
linux-mint kernel compiling
I'm building a custom kernel based off 4.11 (for Mintx64, if it matters). I've already compiled and installed it to prove that it works. Now I've made a few small changes to a couple of files (in the driver and net subsystems, this is why I need to compile a custom kernel in the first place!)
Now I want to build the modified kernel. However when I run
fakeroot make -j5 deb-pkg LOCALVERSION=myname KDEB_PKGVERSION=1
The build system appears to start by "clean"-ing a whole load of stuff, so I stopped it quickly. Unfortunately the computer I'm using is not blessed with a good CPU and takes many hours to build from scratch. Therefore I'd rather avoid doing it again if possible!
Is it possible to make just an incremental build without everything be "clean"d or is this a requirement of the kernel build system?
The output I got was:
CHK include/config/kernel.release
make clean
CLEAN .
CLEAN arch/x86/lib
...
linux-mint kernel compiling
linux-mint kernel compiling
edited 13 mins ago
Rui F Ribeiro
37.3k1374118
37.3k1374118
asked Jun 2 '17 at 19:03
T Kilney
585
585
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28
add a comment |Â
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
7
down vote
accepted
The make clean
is only for the deb-pkg
target. Take a look at scripts/package/Makefile
:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you build the bindeb-pkg
instead, it won't do a clean. You probably don't need the source packages anyway.
I suspect it does a clean because it doesn't want to tar up build artifacts in the source tarball.
add a comment |Â
up vote
2
down vote
You could try producing those deb packages with a different tool, make-kpkg
that is installed by apt-get install kernel-package
. Then for example
make-kpkg --rootcmd=fakeroot --initrd --uc --us -j2 kernel_image kernel_headers
This command should not do a make clean
each time.
add a comment |Â
up vote
1
down vote
I fixed this by going into the makefile for the deb-pkg command and removing "make clean" from the script. This did not seem to cause any ill effects with the build and I have been running the custom kernel for a week or two now without problems. YMMV!
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
The make clean
is only for the deb-pkg
target. Take a look at scripts/package/Makefile
:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you build the bindeb-pkg
instead, it won't do a clean. You probably don't need the source packages anyway.
I suspect it does a clean because it doesn't want to tar up build artifacts in the source tarball.
add a comment |Â
up vote
7
down vote
accepted
The make clean
is only for the deb-pkg
target. Take a look at scripts/package/Makefile
:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you build the bindeb-pkg
instead, it won't do a clean. You probably don't need the source packages anyway.
I suspect it does a clean because it doesn't want to tar up build artifacts in the source tarball.
add a comment |Â
up vote
7
down vote
accepted
up vote
7
down vote
accepted
The make clean
is only for the deb-pkg
target. Take a look at scripts/package/Makefile
:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you build the bindeb-pkg
instead, it won't do a clean. You probably don't need the source packages anyway.
I suspect it does a clean because it doesn't want to tar up build artifacts in the source tarball.
The make clean
is only for the deb-pkg
target. Take a look at scripts/package/Makefile
:
deb-pkg: FORCE
$(MAKE) clean
$(call cmd,src_tar,$(KDEB_SOURCENAME))
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
bindeb-pkg: FORCE
$(MAKE) KBUILD_SRC=
+$(call cmd,builddeb)
If you build the bindeb-pkg
instead, it won't do a clean. You probably don't need the source packages anyway.
I suspect it does a clean because it doesn't want to tar up build artifacts in the source tarball.
answered Mar 13 at 21:47
RawwrBag
18613
18613
add a comment |Â
add a comment |Â
up vote
2
down vote
You could try producing those deb packages with a different tool, make-kpkg
that is installed by apt-get install kernel-package
. Then for example
make-kpkg --rootcmd=fakeroot --initrd --uc --us -j2 kernel_image kernel_headers
This command should not do a make clean
each time.
add a comment |Â
up vote
2
down vote
You could try producing those deb packages with a different tool, make-kpkg
that is installed by apt-get install kernel-package
. Then for example
make-kpkg --rootcmd=fakeroot --initrd --uc --us -j2 kernel_image kernel_headers
This command should not do a make clean
each time.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You could try producing those deb packages with a different tool, make-kpkg
that is installed by apt-get install kernel-package
. Then for example
make-kpkg --rootcmd=fakeroot --initrd --uc --us -j2 kernel_image kernel_headers
This command should not do a make clean
each time.
You could try producing those deb packages with a different tool, make-kpkg
that is installed by apt-get install kernel-package
. Then for example
make-kpkg --rootcmd=fakeroot --initrd --uc --us -j2 kernel_image kernel_headers
This command should not do a make clean
each time.
answered Jun 2 '17 at 20:58
J.J. Hakala
1766
1766
add a comment |Â
add a comment |Â
up vote
1
down vote
I fixed this by going into the makefile for the deb-pkg command and removing "make clean" from the script. This did not seem to cause any ill effects with the build and I have been running the custom kernel for a week or two now without problems. YMMV!
add a comment |Â
up vote
1
down vote
I fixed this by going into the makefile for the deb-pkg command and removing "make clean" from the script. This did not seem to cause any ill effects with the build and I have been running the custom kernel for a week or two now without problems. YMMV!
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I fixed this by going into the makefile for the deb-pkg command and removing "make clean" from the script. This did not seem to cause any ill effects with the build and I have been running the custom kernel for a week or two now without problems. YMMV!
I fixed this by going into the makefile for the deb-pkg command and removing "make clean" from the script. This did not seem to cause any ill effects with the build and I have been running the custom kernel for a week or two now without problems. YMMV!
answered Jun 20 '17 at 9:15
T Kilney
585
585
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f368864%2fre-building-linux-kernel-without-clean%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
@jc__ see output from build above, I can't immediately find where the makefile for that target is, but I'm still looking :)
â T Kilney
Jun 2 '17 at 19:28