[oe-commits] [openembedded-core] 12/19: kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh

git at git.openembedded.org git at git.openembedded.org
Wed Feb 5 23:56:28 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit c9e7bbffb11ce7ee4e2cc6fbec4ba922c5443bc3
Author: Martin Jansa <martin.jansa at gmail.com>
AuthorDate: Wed Feb 5 18:12:48 2020 -0500

    kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh
    
    * when ld-is-gold is used, merge_config.sh silently fails and doesn't generate anything
      useful in .config (and also include directory isn't created):
    
      tmp-glibc-bfd-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build:
      total 164K
      drwxr-xr-x 4 martin martin 4.0K Feb  5 02:27 .
      drwxrwxr-x 7 martin martin 4.0K Feb  5 02:27 ..
      -rw-rw-r-- 1 martin martin 133K Feb  5 02:28 .config
      -rw-rw-r-- 1 martin martin   39 Feb  5 02:27 .gitignore
      drwxr-xr-x 4 martin martin 4.0K Feb  5 02:27 include
      -rw-rw-r-- 1 martin martin  201 Feb  5 02:27 Makefile
      drwxrwxr-x 4 martin martin 4.0K Feb  5 02:27 scripts
      lrwxrwxrwx 1 martin martin   61 Feb  5 02:27 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source
    
      tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build:
      total 28K
      drwxr-xr-x 3 martin martin 4.0K Feb  5 02:26 .
      drwxrwxr-x 7 martin martin 4.0K Feb  5 02:26 ..
      -rw-rw-r-- 1 martin martin   74 Feb  5 02:26 .config
      -rw-rw-r-- 1 martin martin   39 Feb  5 02:26 .gitignore
      -rw-rw-r-- 1 martin martin  201 Feb  5 02:26 Makefile
      drwxrwxr-x 4 martin martin 4.0K Feb  5 02:26 scripts
      lrwxrwxrwx 1 martin martin   61 Feb  5 02:26 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source
    
      $ cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config
      CONFIG_LOCALVERSION="-yocto-standard"
    
    * and because the failure is silent, it will happily start building
      kernel with default defconfig, which even builds OK for qemux86-64
      but on qemux86 I've noticed this issue, because incorrectly
      configured kernel build fails with:
    
      $ tail -n 20 tmp-glibc-gold-qemux86/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_compile
        LD       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd-in.o
        AR       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd.a
        HOSTCC  scripts/mod/mk_elfconfig
        CC      scripts/mod/devicetable-offsets.s
        CC      scripts/mod/empty.o
      cc1: error: code model 'kernel' not supported in the 32 bit mode
      cc1: sorry, unimplemented: 64-bit mode not compiled in
      make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:99: scripts/mod/devicetable-offsets.s] Error 1
      make[2]: *** Waiting for unfinished jobs....
      cc1: error: code model 'kernel' not supported in the 32 bit mode
      cc1: sorry, unimplemented: 64-bit mode not compiled in
      make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:266: scripts/mod/empty.o] Error 1
      make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:1111: prepare0] Error 2
      make[1]: *** Waiting for unfinished jobs....
        LD       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool-in.o
      /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/tools/objtool
        LINK     /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool
      make: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:179: sub-make] Error 2
      WARNING: exit code 1 from a shell command.
    
    * the issue happens in log.do_kernel_configme, but the log is completely useless:
    
      cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_kernel_configme
      DEBUG: Executing python function extend_recipe_sysroot
      NOTE: Direct dependencies are ['virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-devtools/bison/bison_3.5.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/binutils/binutils-cross_2.33.bb:do_populate_sysroot', ' [...]
      NOTE: Installed into sysroot: ['bison-native', 'bc-native', 'binutils-cross-i686', 'gcc-cross-i686', 'autoconf-native', 'xz-native', 'flex-native', 'gnu-config-native', 'automake-native', 'libtool-native', 'texinfo-dummy-native', 'gettext-minimal-native', 'readline-native', 'zlib-native', 'gmp-native', 'libmpc-native', 'mpfr-native', 'linux-libc-headers', 'm4-native', 'ncurses-native', 'pkgconfig-native']
      NOTE: Skipping as already exists in sysroot: ['kern-tools-native', 'quilt-native']
      DEBUG: sed -e 's:^[^/]*/:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/:g' /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/bison-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gcc-cross-i686/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/autoconf-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gnu-config-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-compo [...]
      DEBUG: Python function extend_recipe_sysroot finished
      DEBUG: Executing shell function do_kernel_configme
      DEBUG: Shell function do_kernel_configme finished
    
      ]because merge_config.sh is redirected to work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log
      and bbfatal_log called in do_kernel_configme only when merge_config.sh fails which it should in this case
      but doesn't.
    
      The merge_config_build.log shows 5.4 specific error:
        scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
      but then it happily continues reporting what isn't applied in not created
      .config file
    
      --- tmp-glibc-bfd-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log  2020-02-05 02:28:01.455520207 +0100
      +++ tmp-glibc-gold-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log 2020-02-05 02:26:30.656470909 +0100
      @@ -171,586 +171,5113 @@
         HOSTCC  scripts/kconfig/symbol.o
         HOSTLD  scripts/kconfig/conf
       scripts/kconfig/conf  --alldefconfig Kconfig
      -./.tmp.config.jDjIEYi9Yq:2208:warning: unexpected data:  #
      -./.tmp.config.jDjIEYi9Yq:2209:warning: unexpected data:  # Generic Driver Options
      -./.tmp.config.jDjIEYi9Yq:2210:warning: unexpected data:  #
      -./.tmp.config.jDjIEYi9Yq:3102:warning: symbol value 'm' invalid for SAMPLE_SECCOMP
      -./.tmp.config.jDjIEYi9Yq:3119:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE
      -./.tmp.config.jDjIEYi9Yq:3120:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP
      -./.tmp.config.jDjIEYi9Yq:3121:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
      -#
      -# configuration written to .config
      -#
      +scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
      +make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/kconfig/Makefile:73: alldefconfig] Error 1
      +make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:567: alldefconfig] Error 2
       make[1]: Leaving directory '/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build'
      +make: *** [Makefile:179: sub-make] Error 2
      +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory
      +Value requested for CONFIG_LOCALVERSION not in final .config
      +Requested value:  CONFIG_LOCALVERSION=""
      +Actual value:
      +
      +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory
      +Value requested for CONFIG_LOCALVERSION_AUTO not in final .config
      +Requested value:  # CONFIG_LOCALVERSION_AUTO is not set
      +Actual value:
    
    * I don't know why merge_config.sh uses separate more difficult to find merge_config_build.log
      instead of leaving the output to end in log.do_kernel_configme, I'll send it as separate
      commit so that it can be discussed there.
    
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel-yocto.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index e8a9b1f..f71aa7d 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -354,7 +354,7 @@ do_kernel_configme() {
 		bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)"
 	fi
 
-	CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}"	HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
+	CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}"	HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
 	if [ $? -ne 0 ]; then
 		bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
 	fi

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list