* [PATCH] cml1: Set proper LD while during kernel menuconfig
@ 2020-11-16 9:45 wonmin82
2020-11-16 10:33 ` [OE-core] " Nathan Rossi
0 siblings, 1 reply; 3+ messages in thread
From: wonmin82 @ 2020-11-16 9:45 UTC (permalink / raw)
To: openembedded-core; +Cc: Wonmin Jung
With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig
task for kernel recipes will fail with:
$ bitbake -c menuconfig virtual/kernel
...
scripts/kconfig/mconf Kconfig
scripts/Kconfig.include:43: gold linker 'x86_64-poky-linux-ld' not supported
/OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29:
recipe for target 'menuconfig' failed
make[2]: *** [menuconfig] Error 1
/OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606:
recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
/OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185:
recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
Command failed.
This is because that the KERNEL_LD variable already set in
kernel-arch.bbclass isn't used by do_menuconfig function of
cml1.bbclass.
To fix this issue specify LD variable while calling the kernel
menuconfig command.
Signed-off-by: Wonmin Jung <wonmin82@gmail.com>
---
meta/classes/cml1.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index d319d66ab2..02cd058fc5 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -48,7 +48,7 @@ python do_menuconfig() {
# ensure that environment variables are overwritten with this tasks 'd' values
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
- oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
+ oe_terminal("sh -c \"make LD=${KERNEL_LD} %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
d.getVar('PN') + ' Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] cml1: Set proper LD while during kernel menuconfig
2020-11-16 9:45 [PATCH] cml1: Set proper LD while during kernel menuconfig wonmin82
@ 2020-11-16 10:33 ` Nathan Rossi
2020-11-16 10:47 ` Wonmin Jung
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Rossi @ 2020-11-16 10:33 UTC (permalink / raw)
To: Wonmin Jung; +Cc: openembedded-core
On Mon, 16 Nov 2020 at 19:46, Wonmin Jung <wonmin82@gmail.com> wrote:
>
> With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig
> task for kernel recipes will fail with:
>
> $ bitbake -c menuconfig virtual/kernel
> ...
> scripts/kconfig/mconf Kconfig
> scripts/Kconfig.include:43: gold linker 'x86_64-poky-linux-ld' not supported
> /OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29:
> recipe for target 'menuconfig' failed
> make[2]: *** [menuconfig] Error 1
> /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606:
> recipe for target 'menuconfig' failed
> make[1]: *** [menuconfig] Error 2
> /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185:
> recipe for target '__sub-make' failed
> make: *** [__sub-make] Error 2
> Command failed.
>
> This is because that the KERNEL_LD variable already set in
> kernel-arch.bbclass isn't used by do_menuconfig function of
> cml1.bbclass.
>
> To fix this issue specify LD variable while calling the kernel
> menuconfig command.
>
> Signed-off-by: Wonmin Jung <wonmin82@gmail.com>
> ---
> meta/classes/cml1.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> index d319d66ab2..02cd058fc5 100644
> --- a/meta/classes/cml1.bbclass
> +++ b/meta/classes/cml1.bbclass
> @@ -48,7 +48,7 @@ python do_menuconfig() {
> # ensure that environment variables are overwritten with this tasks 'd' values
> d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
>
> - oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
> + oe_terminal("sh -c \"make LD=${KERNEL_LD} %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
I don't think this is the right place to be setting this, since cml1
is not only for the kernel. I think a better place to set this would
be in kernel.bbclass, alongside the existing HOSTLDFLAGS setting
through KCONFIG_CONFIG_COMMAND.
(https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n589)
Regards,
Nathan
> d.getVar('PN') + ' Configuration', d)
>
> # FIXME this check can be removed when the minimum bitbake version has been bumped
> --
> 2.29.2
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] cml1: Set proper LD while during kernel menuconfig
2020-11-16 10:33 ` [OE-core] " Nathan Rossi
@ 2020-11-16 10:47 ` Wonmin Jung
0 siblings, 0 replies; 3+ messages in thread
From: Wonmin Jung @ 2020-11-16 10:47 UTC (permalink / raw)
To: Nathan Rossi; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 3110 bytes --]
Good point. I'll submit another patch after build test.
2020년 11월 16일 (월) 오후 7:33, Nathan Rossi <nathan@nathanrossi.com>님이 작성:
> On Mon, 16 Nov 2020 at 19:46, Wonmin Jung <wonmin82@gmail.com> wrote:
> >
> > With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig
> > task for kernel recipes will fail with:
> >
> > $ bitbake -c menuconfig virtual/kernel
> > ...
> > scripts/kconfig/mconf Kconfig
> > scripts/Kconfig.include:43: gold linker 'x86_64-poky-linux-ld' not
> supported
> >
> /OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29:
> > recipe for target 'menuconfig' failed
> > make[2]: *** [menuconfig] Error 1
> > /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606:
> > recipe for target 'menuconfig' failed
> > make[1]: *** [menuconfig] Error 2
> > /OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185:
> > recipe for target '__sub-make' failed
> > make: *** [__sub-make] Error 2
> > Command failed.
> >
> > This is because that the KERNEL_LD variable already set in
> > kernel-arch.bbclass isn't used by do_menuconfig function of
> > cml1.bbclass.
> >
> > To fix this issue specify LD variable while calling the kernel
> > menuconfig command.
> >
> > Signed-off-by: Wonmin Jung <wonmin82@gmail.com>
> > ---
> > meta/classes/cml1.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> > index d319d66ab2..02cd058fc5 100644
> > --- a/meta/classes/cml1.bbclass
> > +++ b/meta/classes/cml1.bbclass
> > @@ -48,7 +48,7 @@ python do_menuconfig() {
> > # ensure that environment variables are overwritten with this tasks
> 'd' values
> > d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH
> PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
> >
> > - oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command
> failed.'; printf 'Press any key to continue... '; read r; fi\"" %
> d.getVar('KCONFIG_CONFIG_COMMAND'),
> > + oe_terminal("sh -c \"make LD=${KERNEL_LD} %s; if [ \\$? -ne 0 ];
> then echo 'Command failed.'; printf 'Press any key to continue... '; read
> r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
>
> I don't think this is the right place to be setting this, since cml1
> is not only for the kernel. I think a better place to set this would
> be in kernel.bbclass, alongside the existing HOSTLDFLAGS setting
> through KCONFIG_CONFIG_COMMAND.
> (
> https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n589
> )
>
> Regards,
> Nathan
>
>
> > d.getVar('PN') + ' Configuration', d)
> >
> > # FIXME this check can be removed when the minimum bitbake version
> has been bumped
> > --
> > 2.29.2
> >
> >
> >
> >
>
--
*Wonmin Jung*
Senior Research Engineer
Software Platform R&D Lab.
CTO Division
LG Electronics Inc.
C/P: 82-10-2793-5301
E-mail: wonmin82@gmail.com, wonmin.jung@lge.com
Skype, Google Hangout: wonmin82@gmail.com
<http://www.drjung.net>
[-- Attachment #2: Type: text/html, Size: 4509 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-16 10:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 9:45 [PATCH] cml1: Set proper LD while during kernel menuconfig wonmin82
2020-11-16 10:33 ` [OE-core] " Nathan Rossi
2020-11-16 10:47 ` Wonmin Jung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox