* [PATCH] kbuild/builddeb: Fix building .deb packages out-of-tree
@ 2018-11-08 19:56 Borislav Petkov
0 siblings, 0 replies; only message in thread
From: Borislav Petkov @ 2018-11-08 19:56 UTC (permalink / raw)
To: LKML; +Cc: Masahiro Yamada, Michal Marek, linux-kbuild
From: Borislav Petkov <bp@suse.de>
When building a .deb package with
make O=/tmp/b oldconfig
cd /tmp/b
make bindeb-pkg
the build fails with
fakeroot -u debian/rules binary
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[12]: *** [/mnt/kernel/kernel/linux/scripts/kconfig/Makefile:69: syncconfig] Error 1
make[11]: *** [/mnt/kernel/kernel/linux/Makefile:544: syncconfig] Error 2
make[10]: *** [Makefile:640: include/config/auto.conf] Error 2
make[9]: *** [Makefile:15: __sub-make] Error 2
because ($MAKE -s image_name) in the subshell is missing KBUILD_SRC and
cannot find .config. Passing in KBUILD_SRC= for the current pwd fixes
the build.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: <linux-kbuild@vger.kernel.org>
---
scripts/package/builddeb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90c9a8ac7adb..149bbbd8e98d 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -81,7 +81,7 @@ else
cp System.map "$tmpdir/boot/System.map-$version"
cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
fi
-cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path"
+cp "$($MAKE KBUILD_SRC= -s image_name)" "$tmpdir/$installed_image_path"
if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then
# Only some architectures with OF support have this target
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-08 19:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 19:56 [PATCH] kbuild/builddeb: Fix building .deb packages out-of-tree Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).