All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh
@ 2020-02-05  2:42 Martin Jansa
  2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Martin Jansa @ 2020-02-05  2:42 UTC (permalink / raw)
  To: openembedded-core

* 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', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_9.2.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-components/x86_64/automake-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/libtool-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gmp-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/ncurses-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pkgconfig-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/OE/build/oe-core/tmp-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/OE/build/oe-core/tmp-glibc/pkgdata/qemux86:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/fifo.10476:g'
  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@gmail.com>
---
 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 141eeafeb9..d2796b01bf 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -345,7 +345,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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created
  2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
@ 2020-02-05  2:42 ` Martin Jansa
  2020-02-05  3:00   ` Bruce Ashfield
  2020-02-05  3:25   ` Bruce Ashfield
  2020-02-05  2:42 ` [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call Martin Jansa
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Martin Jansa @ 2020-02-05  2:42 UTC (permalink / raw)
  To: openembedded-core

* for whatever reason, instead of silently continuing to build default kernel config

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel-yocto.bbclass | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index d2796b01bf..8e642cd999 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -318,8 +318,6 @@ do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
 do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
 do_kernel_configme[dirs] += "${S} ${B}"
 do_kernel_configme() {
-	set +e
-
 	# translate the kconfig_mode into something that merge_config.sh
 	# understands
 	case ${KCONFIG_MODE} in
@@ -345,8 +343,9 @@ 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}" 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
+	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}
+
+	if [ $? -ne 0 -o ! -f ${B}/.config ]; then
 		bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
 	fi
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call
  2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
  2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
@ 2020-02-05  2:42 ` Martin Jansa
  2020-02-05  2:52   ` Bruce Ashfield
  2020-02-05  2:42 ` [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake Martin Jansa
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2020-02-05  2:42 UTC (permalink / raw)
  To: openembedded-core

* since 5.4 kernel Kconfig will fail immediately when it detects
  that LD points to gold linker:

  scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported

* in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh
  but we need to pass it also into the make call here

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../kern-tools/kern-tools-native_git.bb       |  2 ++
 ...pass-LD-variable-from-shell-environm.patch | 32 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 57ec1abc6d..8053483355 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -22,3 +22,5 @@ do_install() {
 	cd ${S}/git
 	make DESTDIR=${D}${bindir} install
 }
+
+SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch b/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
new file mode 100644
index 0000000000..d7d3d9dd2b
--- /dev/null
+++ b/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
@@ -0,0 +1,32 @@
+From 091dbfede29c128a1a467d7f3c0aedc33ba3d2cb Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 5 Feb 2020 03:26:57 +0100
+Subject: [PATCH] merge_config.sh: pass LD variable from shell environment to
+ make
+
+* since 5.4 kernel Kconfig will fail immediately when it detects
+  that LD points to gold linker:
+
+  scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
+
+* in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh
+  but we need to pass it also into the make call here
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ tools/merge_config.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/merge_config.sh b/tools/merge_config.sh
+index 296e759..11f3085 100755
+--- a/tools/merge_config.sh
++++ b/tools/merge_config.sh
+@@ -153,7 +153,7 @@ fi
+ # Use the merged file as the starting point for:
+ # alldefconfig: Fills in any missing symbols with Kconfig default
+ # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
+-make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
++make LD=$LD KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
+ 
+ 
+ # Check all specified config values took (might have missed-dependency issues)
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake
  2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
  2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
  2020-02-05  2:42 ` [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call Martin Jansa
@ 2020-02-05  2:42 ` Martin Jansa
  2020-02-05  2:54   ` Bruce Ashfield
  2020-02-05  3:02 ` ✗ patchtest: failure for "kernel-yocto.bbclass: set KERN..." and 3 more Patchwork
  2020-02-05  3:03 ` [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Bruce Ashfield
  4 siblings, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2020-02-05  2:42 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../kern-tools/kern-tools-native_git.bb               | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 8053483355..28080e510f 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -11,16 +11,19 @@ PV = "0.2+git${SRCPV}"
 inherit native
 
 SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
-S = "${WORKDIR}"
+S = "${WORKDIR}/git"
 UPSTREAM_CHECK_COMMITS = "1"
 
+do_configure() {
+	:
+}
+
 do_compile() { 
 	:
 }
 
 do_install() {
-	cd ${S}/git
-	make DESTDIR=${D}${bindir} install
+	oe_runmake DESTDIR=${D}${bindir} install
 }
 
-SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
+SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call
  2020-02-05  2:42 ` [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call Martin Jansa
@ 2020-02-05  2:52   ` Bruce Ashfield
  0 siblings, 0 replies; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  2:52 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

I'll take this into the repo directly and send a SRCREV bump after
I've run it through a some of my kernel release steps.

Cheers,

Bruce

On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * since 5.4 kernel Kconfig will fail immediately when it detects
>   that LD points to gold linker:
>
>   scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
>
> * in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh
>   but we need to pass it also into the make call here
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  .../kern-tools/kern-tools-native_git.bb       |  2 ++
>  ...pass-LD-variable-from-shell-environm.patch | 32 +++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
>
> diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> index 57ec1abc6d..8053483355 100644
> --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> @@ -22,3 +22,5 @@ do_install() {
>         cd ${S}/git
>         make DESTDIR=${D}${bindir} install
>  }
> +
> +SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
> diff --git a/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch b/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
> new file mode 100644
> index 0000000000..d7d3d9dd2b
> --- /dev/null
> +++ b/meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
> @@ -0,0 +1,32 @@
> +From 091dbfede29c128a1a467d7f3c0aedc33ba3d2cb Mon Sep 17 00:00:00 2001
> +From: Martin Jansa <Martin.Jansa@gmail.com>
> +Date: Wed, 5 Feb 2020 03:26:57 +0100
> +Subject: [PATCH] merge_config.sh: pass LD variable from shell environment to
> + make
> +
> +* since 5.4 kernel Kconfig will fail immediately when it detects
> +  that LD points to gold linker:
> +
> +  scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
> +
> +* in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh
> +  but we need to pass it also into the make call here
> +
> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> +---
> + tools/merge_config.sh | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tools/merge_config.sh b/tools/merge_config.sh
> +index 296e759..11f3085 100755
> +--- a/tools/merge_config.sh
> ++++ b/tools/merge_config.sh
> +@@ -153,7 +153,7 @@ fi
> + # Use the merged file as the starting point for:
> + # alldefconfig: Fills in any missing symbols with Kconfig default
> + # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
> +-make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
> ++make LD=$LD KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
> +
> +
> + # Check all specified config values took (might have missed-dependency issues)
> --
> 2.20.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake
  2020-02-05  2:42 ` [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake Martin Jansa
@ 2020-02-05  2:54   ` Bruce Ashfield
  2020-02-05 13:57     ` Martin Jansa
  0 siblings, 1 reply; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  2:54 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  .../kern-tools/kern-tools-native_git.bb               | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> index 8053483355..28080e510f 100644
> --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> @@ -11,16 +11,19 @@ PV = "0.2+git${SRCPV}"
>  inherit native
>
>  SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
> -S = "${WORKDIR}"
> +S = "${WORKDIR}/git"

While not common, this was on purpose.  This isn't something that is
typically patched, it is something I queue and bump for release.

So I'm ok with the cleanup, but I'll drop the patch tweaking part when
I queue for test, since I'll have the patch already in the repo.

Bruce

>  UPSTREAM_CHECK_COMMITS = "1"
>
> +do_configure() {
> +       :
> +}
> +
>  do_compile() {
>         :
>  }
>
>  do_install() {
> -       cd ${S}/git
> -       make DESTDIR=${D}${bindir} install
> +       oe_runmake DESTDIR=${D}${bindir} install
>  }
>
> -SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
> +SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch"
> --
> 2.20.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created
  2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
@ 2020-02-05  3:00   ` Bruce Ashfield
  2020-02-05  3:25   ` Bruce Ashfield
  1 sibling, 0 replies; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  3:00 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * for whatever reason, instead of silently continuing to build default kernel config
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel-yocto.bbclass | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index d2796b01bf..8e642cd999 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -318,8 +318,6 @@ do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
>  do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
>  do_kernel_configme[dirs] += "${S} ${B}"
>  do_kernel_configme() {
> -       set +e
> -
>         # translate the kconfig_mode into something that merge_config.sh
>         # understands
>         case ${KCONFIG_MODE} in
> @@ -345,8 +343,9 @@ 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}" 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
> +       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}
> +

At one point there was a modified merge_config that I used while the
kernel caught up to the functionality that we needed, it didn't return
zero in this scenario. Hence why just checking the return code was
enough.

This makes sense to me, and explains the difference between our runs,
and why my clean oe-core + bitbake test worked as well.

Bruce

> +       if [ $? -ne 0 -o ! -f ${B}/.config ]; then
>                 bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
>         fi
>
> --
> 2.20.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* ✗ patchtest: failure for "kernel-yocto.bbclass: set KERN..." and 3 more
  2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
                   ` (2 preceding siblings ...)
  2020-02-05  2:42 ` [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake Martin Jansa
@ 2020-02-05  3:02 ` Patchwork
  2020-02-05  3:03 ` [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Bruce Ashfield
  4 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2020-02-05  3:02 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

== Series Details ==

Series: "kernel-yocto.bbclass: set KERN..." and 3 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/22426/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created
 Issue             Commit shortlog is too long [test_shortlog_length] 
  Suggested fix    Edit shortlog so that it is 90 characters or less (currently 122 characters)

* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-kernel/kern-tools/kern-tools/0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh
  2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
                   ` (3 preceding siblings ...)
  2020-02-05  3:02 ` ✗ patchtest: failure for "kernel-yocto.bbclass: set KERN..." and 3 more Patchwork
@ 2020-02-05  3:03 ` Bruce Ashfield
  2020-02-05  4:00   ` Bruce Ashfield
  4 siblings, 1 reply; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  3:03 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * 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', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_9.2.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-components/x86_64/automake-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/libtool-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gmp-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/ncurses-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pkgconfig-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/OE/build/oe-core/tmp-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/OE/build/oe-core/tmp-glibc/pkgdata/qemux86:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/fifo.10476:g'
>   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.

That's because there's a LOT of noise in the merge_config log, the
separate task for doing the audit has heuristics to highlight
important errors, and allows configuration fragments to override each
other, have optional fragments, etc.

I already have the various audit level variables in use for
linux-yocto style kernels, at the highest level it could be dumped,
but absolutely not by default.

Cheers,

Bruce

>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  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 141eeafeb9..d2796b01bf 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -345,7 +345,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
> --
> 2.20.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created
  2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
  2020-02-05  3:00   ` Bruce Ashfield
@ 2020-02-05  3:25   ` Bruce Ashfield
  1 sibling, 0 replies; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  3:25 UTC (permalink / raw)
  To: Martin Jansa, Richard Purdie
  Cc: Patches and discussions about the oe-core layer

Richard,

I've grabbed all 4 patches in this series and am running some
additional tests, and will do a quick AB run to see if they interact
with any of the other layers, etc. I'll send a consolidated pull
request on Wednesday.

Cheers,

Bruce

On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> * for whatever reason, instead of silently continuing to build default kernel config
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel-yocto.bbclass | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
> index d2796b01bf..8e642cd999 100644
> --- a/meta/classes/kernel-yocto.bbclass
> +++ b/meta/classes/kernel-yocto.bbclass
> @@ -318,8 +318,6 @@ do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
>  do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
>  do_kernel_configme[dirs] += "${S} ${B}"
>  do_kernel_configme() {
> -       set +e
> -
>         # translate the kconfig_mode into something that merge_config.sh
>         # understands
>         case ${KCONFIG_MODE} in
> @@ -345,8 +343,9 @@ 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}" 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
> +       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}
> +
> +       if [ $? -ne 0 -o ! -f ${B}/.config ]; then
>                 bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
>         fi
>
> --
> 2.20.1
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh
  2020-02-05  3:03 ` [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Bruce Ashfield
@ 2020-02-05  4:00   ` Bruce Ashfield
  0 siblings, 0 replies; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05  4:00 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 4, 2020 at 10:03 PM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
> On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > * 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', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_9.2.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-components/x86_64/automake-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/libtool-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gmp-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/ncurses-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pkgconfig-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/OE/build/oe-core/tmp-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/OE/build/oe-core/tmp-glibc/pkgdata/qemux86:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/fifo.10476:g'
> >   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.
>
> That's because there's a LOT of noise in the merge_config log, the
> separate task for doing the audit has heuristics to highlight
> important errors, and allows configuration fragments to override each
> other, have optional fragments, etc.

But of course, just allowing stderr into the log makes sense, since
the fragment messages themselves are stdout. That way we can show any
future traps/failures in the single log, and the audit step can offer
some more nuanced processing of the output.

I pulled together a patch that splits the output, and another value
for the log level that will allow everything into logs .. and am
running them through tests now.

Cheers,

Bruce

>
> I already have the various audit level variables in use for
> linux-yocto style kernels, at the highest level it could be dumped,
> but absolutely not by default.
>
> Cheers,
>
> Bruce
>
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  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 141eeafeb9..d2796b01bf 100644
> > --- a/meta/classes/kernel-yocto.bbclass
> > +++ b/meta/classes/kernel-yocto.bbclass
> > @@ -345,7 +345,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
> > --
> > 2.20.1
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake
  2020-02-05  2:54   ` Bruce Ashfield
@ 2020-02-05 13:57     ` Martin Jansa
  2020-02-05 14:39       ` Bruce Ashfield
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Jansa @ 2020-02-05 13:57 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

OK, the patchdir cleanup won't be needed as you've already applied that
.patch file in the repo.

But I have forgot to update LIC_FILES_CHKSUM, which shouldn't have the
"git/" anymore as it's relative to ${S}.

LIC_FILES_CHKSUM =
"file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249624278c3e343e501"

Please adjust in your consolidated pull requests.

On Wed, Feb 5, 2020 at 3:54 AM Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

> On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com>
> wrote:
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  .../kern-tools/kern-tools-native_git.bb               | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > index 8053483355..28080e510f 100644
> > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> > @@ -11,16 +11,19 @@ PV = "0.2+git${SRCPV}"
> >  inherit native
> >
> >  SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
> > -S = "${WORKDIR}"
> > +S = "${WORKDIR}/git"
>
> While not common, this was on purpose.  This isn't something that is
> typically patched, it is something I queue and bump for release.
>
> So I'm ok with the cleanup, but I'll drop the patch tweaking part when
> I queue for test, since I'll have the patch already in the repo.
>
> Bruce
>
> >  UPSTREAM_CHECK_COMMITS = "1"
> >
> > +do_configure() {
> > +       :
> > +}
> > +
> >  do_compile() {
> >         :
> >  }
> >
> >  do_install() {
> > -       cd ${S}/git
> > -       make DESTDIR=${D}${bindir} install
> > +       oe_runmake DESTDIR=${D}${bindir} install
> >  }
> >
> > -SRC_URI +=
> "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
> > +SRC_URI +=
> "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch"
> > --
> > 2.20.1
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>

[-- Attachment #2: Type: text/html, Size: 3587 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake
  2020-02-05 13:57     ` Martin Jansa
@ 2020-02-05 14:39       ` Bruce Ashfield
  2020-02-05 14:45         ` Martin Jansa
  0 siblings, 1 reply; 14+ messages in thread
From: Bruce Ashfield @ 2020-02-05 14:39 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Wed, Feb 5, 2020 at 8:57 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> OK, the patchdir cleanup won't be needed as you've already applied that .patch file in the repo.
>
> But I have forgot to update LIC_FILES_CHKSUM, which shouldn't have the "git/" anymore as it's relative to ${S}.
>
> LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249624278c3e343e501"
>
> Please adjust in your consolidated pull requests.

Absolutely, I tweaked and squashed it here.

But I've definitely taken the cleanups, since there's no valid reason
to make it so hard to patch (even if I grab and merge things).

Cheers,

Bruce

>
> On Wed, Feb 5, 2020 at 3:54 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>>
>> On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>> >
>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> > ---
>> >  .../kern-tools/kern-tools-native_git.bb               | 11 +++++++----
>> >  1 file changed, 7 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
>> > index 8053483355..28080e510f 100644
>> > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
>> > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
>> > @@ -11,16 +11,19 @@ PV = "0.2+git${SRCPV}"
>> >  inherit native
>> >
>> >  SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
>> > -S = "${WORKDIR}"
>> > +S = "${WORKDIR}/git"
>>
>> While not common, this was on purpose.  This isn't something that is
>> typically patched, it is something I queue and bump for release.
>>
>> So I'm ok with the cleanup, but I'll drop the patch tweaking part when
>> I queue for test, since I'll have the patch already in the repo.
>>
>> Bruce
>>
>> >  UPSTREAM_CHECK_COMMITS = "1"
>> >
>> > +do_configure() {
>> > +       :
>> > +}
>> > +
>> >  do_compile() {
>> >         :
>> >  }
>> >
>> >  do_install() {
>> > -       cd ${S}/git
>> > -       make DESTDIR=${D}${bindir} install
>> > +       oe_runmake DESTDIR=${D}${bindir} install
>> >  }
>> >
>> > -SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
>> > +SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch"
>> > --
>> > 2.20.1
>> >
>>
>>
>> --
>> - Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end
>> - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake
  2020-02-05 14:39       ` Bruce Ashfield
@ 2020-02-05 14:45         ` Martin Jansa
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Jansa @ 2020-02-05 14:45 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4765 bytes --]

On Wed, Feb 05, 2020 at 09:39:25AM -0500, Bruce Ashfield wrote:
> On Wed, Feb 5, 2020 at 8:57 AM Martin Jansa <martin.jansa@gmail.com> wrote:
> >
> > OK, the patchdir cleanup won't be needed as you've already applied that .patch file in the repo.
> >
> > But I have forgot to update LIC_FILES_CHKSUM, which shouldn't have the "git/" anymore as it's relative to ${S}.
> >
> > LIC_FILES_CHKSUM = "file://tools/kgit;beginline=5;endline=9;md5=9c30e971d435e249624278c3e343e501"
> >
> > Please adjust in your consolidated pull requests.
> 
> Absolutely, I tweaked and squashed it here.
> 
> But I've definitely taken the cleanups, since there's no valid reason
> to make it so hard to patch (even if I grab and merge things).

BTW there is still another issue with gold enabled builds in runtime

When running "bitbake -k -c testimage core-image-sato-sdk-ptest" to test my artifacts changes I've noticed:

Stopped HTTPService on 0.0.0.0:0
Traceback (most recent call last):
  File "/OE/build/oe-core/openembedded-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  File "/OE/build/oe-core/openembedded-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  File "/OE/build/oe-core/openembedded-core/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
    return func(*args, **kwargs)
  [Previous line repeated 2 more times]
  File "/OE/build/oe-core/openembedded-core/meta/lib/oeqa/runtime/cases/kernelmodule.py", line 46, in test_kernel_module
    self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
AssertionError: 2 != 0 : cd /usr/src/kernel && make scripts prepare
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
scripts/Kconfig.include:39:  gold linker 'ld' not supported
make[2]: *** [scripts/kconfig/Makefile:73: syncconfig] Error 1
make[1]: *** [Makefile:567: syncconfig] Error 2
make: *** [Makefile:678: include/config/auto.conf.cmd] Error 2
make: *** [include/config/auto.conf.cmd] Deleting file 'include/config/tristate.conf'

Looks like kernelmodule.py also needs to be adjusted to pass KERNEL_LD as LD.

Regards,

> > On Wed, Feb 5, 2020 at 3:54 AM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> >>
> >> On Tue, Feb 4, 2020 at 9:42 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> >> >
> >> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >> > ---
> >> >  .../kern-tools/kern-tools-native_git.bb               | 11 +++++++----
> >> >  1 file changed, 7 insertions(+), 4 deletions(-)
> >> >
> >> > diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> >> > index 8053483355..28080e510f 100644
> >> > --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> >> > +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> >> > @@ -11,16 +11,19 @@ PV = "0.2+git${SRCPV}"
> >> >  inherit native
> >> >
> >> >  SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
> >> > -S = "${WORKDIR}"
> >> > +S = "${WORKDIR}/git"
> >>
> >> While not common, this was on purpose.  This isn't something that is
> >> typically patched, it is something I queue and bump for release.
> >>
> >> So I'm ok with the cleanup, but I'll drop the patch tweaking part when
> >> I queue for test, since I'll have the patch already in the repo.
> >>
> >> Bruce
> >>
> >> >  UPSTREAM_CHECK_COMMITS = "1"
> >> >
> >> > +do_configure() {
> >> > +       :
> >> > +}
> >> > +
> >> >  do_compile() {
> >> >         :
> >> >  }
> >> >
> >> >  do_install() {
> >> > -       cd ${S}/git
> >> > -       make DESTDIR=${D}${bindir} install
> >> > +       oe_runmake DESTDIR=${D}${bindir} install
> >> >  }
> >> >
> >> > -SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch;patchdir=git"
> >> > +SRC_URI += "file://0001-merge_config.sh-pass-LD-variable-from-shell-environm.patch"
> >> > --
> >> > 2.20.1
> >> >
> >>
> >>
> >> --
> >> - Thou shalt not follow the NULL pointer, for chaos and madness await
> >> thee at its end
> >> - "Use the force Harry" - Gandalf, Star Trek II
> 
> 
> 
> -- 
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-02-05 14:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05  2:42 [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Martin Jansa
2020-02-05  2:42 ` [PATCH 2/4] kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created Martin Jansa
2020-02-05  3:00   ` Bruce Ashfield
2020-02-05  3:25   ` Bruce Ashfield
2020-02-05  2:42 ` [PATCH 3/4] kern-tools-native: pass LD variable from shell environment to the make call Martin Jansa
2020-02-05  2:52   ` Bruce Ashfield
2020-02-05  2:42 ` [PATCH 4/4] kern-tools-native: use more common S value and oe_runmake Martin Jansa
2020-02-05  2:54   ` Bruce Ashfield
2020-02-05 13:57     ` Martin Jansa
2020-02-05 14:39       ` Bruce Ashfield
2020-02-05 14:45         ` Martin Jansa
2020-02-05  3:02 ` ✗ patchtest: failure for "kernel-yocto.bbclass: set KERN..." and 3 more Patchwork
2020-02-05  3:03 ` [PATCH 1/4] kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh Bruce Ashfield
2020-02-05  4:00   ` Bruce Ashfield

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.