* [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
@ 2018-11-05 7:52 Masahiro Yamada
2018-11-05 11:06 ` Ard Biesheuvel
2018-11-09 16:17 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-11-05 7:52 UTC (permalink / raw)
To: linux-kbuild; +Cc: Ard Biesheuvel, Masahiro Yamada, Michal Marek, linux-kernel
Ard Biesheuvel reports bindeb-pkg with O= option is broken in the
following way:
...
LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko
LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko
LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko
fakeroot -u debian/rules binary
make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
/bin/bash /home/ard/linux/scripts/package/builddeb
Makefile:600: include/config/auto.conf: No such file or directory
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[12]: *** [syncconfig] Error 1
make[11]: *** [syncconfig] Error 2
make[10]: *** [include/config/auto.conf] Error 2
make[9]: *** [__sub-make] Error 2
...
Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only
for out-of-tree build"), both objtree and srctree were added to
--include-dir, and the wrong code '$MAKE image_name' was working
relying on that. Now, the potential issue that had previously been
hidden just showed up.
'$MAKE image_name' recurses to the generated $(objtree)/Makefile and
ends up with running in srctree, which is incorrect. It should be
invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed
in objtree.
Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build")
Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
scripts/package/builddeb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90c9a8a..0b31f4f 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 -s -f $srctree/Makefile 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.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
2018-11-05 7:52 [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used Masahiro Yamada
@ 2018-11-05 11:06 ` Ard Biesheuvel
2018-11-09 16:17 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2018-11-05 11:06 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Linux Kbuild mailing list, Michal Marek, Linux Kernel Mailing List
On 5 November 2018 at 08:52, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Ard Biesheuvel reports bindeb-pkg with O= option is broken in the
> following way:
>
> ...
> LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko
> LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko
> fakeroot -u debian/rules binary
> make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
> /bin/bash /home/ard/linux/scripts/package/builddeb
> Makefile:600: include/config/auto.conf: No such file or directory
> ***
> *** Configuration file ".config" not found!
> ***
> *** Please run some configurator (e.g. "make oldconfig" or
> *** "make menuconfig" or "make xconfig").
> ***
> make[12]: *** [syncconfig] Error 1
> make[11]: *** [syncconfig] Error 2
> make[10]: *** [include/config/auto.conf] Error 2
> make[9]: *** [__sub-make] Error 2
> ...
>
> Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only
> for out-of-tree build"), both objtree and srctree were added to
> --include-dir, and the wrong code '$MAKE image_name' was working
> relying on that. Now, the potential issue that had previously been
> hidden just showed up.
>
> '$MAKE image_name' recurses to the generated $(objtree)/Makefile and
> ends up with running in srctree, which is incorrect. It should be
> invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed
> in objtree.
>
> Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build")
> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This fixes the issue I was seeing
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Thanks.
> ---
>
> scripts/package/builddeb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 90c9a8a..0b31f4f 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 -s -f $srctree/Makefile 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.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
2018-11-05 7:52 [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used Masahiro Yamada
2018-11-05 11:06 ` Ard Biesheuvel
@ 2018-11-09 16:17 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-11-09 16:17 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Ard Biesheuvel, Michal Marek, Linux Kernel Mailing List
On Mon, Nov 5, 2018 at 4:53 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Ard Biesheuvel reports bindeb-pkg with O= option is broken in the
> following way:
>
> ...
> LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko
> LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko
> LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko
> fakeroot -u debian/rules binary
> make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg
> /bin/bash /home/ard/linux/scripts/package/builddeb
> Makefile:600: include/config/auto.conf: No such file or directory
> ***
> *** Configuration file ".config" not found!
> ***
> *** Please run some configurator (e.g. "make oldconfig" or
> *** "make menuconfig" or "make xconfig").
> ***
> make[12]: *** [syncconfig] Error 1
> make[11]: *** [syncconfig] Error 2
> make[10]: *** [include/config/auto.conf] Error 2
> make[9]: *** [__sub-make] Error 2
> ...
>
> Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only
> for out-of-tree build"), both objtree and srctree were added to
> --include-dir, and the wrong code '$MAKE image_name' was working
> relying on that. Now, the potential issue that had previously been
> hidden just showed up.
>
> '$MAKE image_name' recurses to the generated $(objtree)/Makefile and
> ends up with running in srctree, which is incorrect. It should be
> invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed
> in objtree.
>
> Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build")
> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild/fixes.
> scripts/package/builddeb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 90c9a8a..0b31f4f 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 -s -f $srctree/Makefile 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.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-09 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 7:52 [PATCH] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used Masahiro Yamada
2018-11-05 11:06 ` Ard Biesheuvel
2018-11-09 16:17 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.