kernel-devsrc: restructure for out of tree (and on target) module builds
PATCH v2 1/1 kernel-devsrc: restructure for out of tree (and on target) module builds
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make modules_prepare"
- The kernel source is installed into /lib/modules/<version>/build and a symlink created from /usr/src/kernel to the new location. This aligns with the standard location for module support code
- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
[YOCTO #12535]
---
v2: fix arch/arm devsrc builds
The arch conditional code for ARM was using invalid variables for the current version of the recipe. Those are now fixed, and we can package for ARM.
meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++++++++++++++++++++++------- 1 file changed, 138 insertions(+), 40 deletions(-)
meta/recipes-kernel/linux/kernel-devsrc.bb +138 -40
@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1" S = "${STAGING_KERNEL_DIR}" B = "${STAGING_KERNEL_BUILDDIR}" -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}" - PACKAGE_ARCH = "${MACHINE_ARCH}" +KERNEL_BUILD_ROOT="/lib/modules/" + do_install() { - kerneldir=${D}${KERNEL_SRC_PATH} - install -d $kerneldir - - # - # Copy the staging dir source (and module build support) into the devsrc structure. - # We can keep this copy simple and take everything, since a we'll clean up any build - # artifacts afterwards, and the extra i/o is not significant - # - cd ${B} - find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - cd ${S} - find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - - # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not - # The main build artifacts. We clean the directory to avoid QA errors on mismatched - # architecture (since scripts and helpers are native format). - KBUILD_OUTPUT="$kerneldir" - oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts - # make clean generates an absolute path symlink called "source" - # in $kerneldir points to $kerneldir, which doesn't make any - # sense, so remove it. - if [ -L $kerneldir/source ]; then - bbnote "Removing $kerneldir/source symlink" - rm -f $kerneldir/source - fi - - # As of Linux kernel version 3.0.1, the clean target removes - # arch/powerpc/lib/crtsavres.o which is present in - # KBUILD_LDFLAGS_MODULE, making it required to build external modules. - if [ ${ARCH} = "powerpc" ]; then - mkdir -p $kerneldir/arch/powerpc/lib/ - cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o - fi - - chown -R root:root ${D} + kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} + install -d $kerneldir + + # create the directory structure + rm -f $kerneldir/build + rm -f $kerneldir/source + mkdir -p $kerneldir/build + + # for compatibility with some older variants of this package, we + # create a /usr/src/kernel symlink to /lib/modules/<version>/source + mkdir -p ${D}/usr/src + ( + cd ${D}/usr/src + ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel + ) + + # for on target purposes, we unify build and source + ( + cd $kerneldir + ln -s build source + ) + + # first copy everything + ( + cd ${S} + cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build + ) + + # then drop all but the needed Makefiles/Kconfig files + rm -rf $kerneldir/build/Documentation + rm -rf $kerneldir/build/scripts + rm -rf $kerneldir/build/include + + # now copy in parts from the build that we'll need later + ( + cd ${B} + + cp Module.symvers $kerneldir/build + cp System.map* $kerneldir/build + if [ -s Module.markers ]; then + cp Module.markers $kerneldir/build + fi + + cp .config $kerneldir/build + + # TODO: this scripts copy will likely blow up QA, so for now, we + # require a more complex 'make scripts' to restore these, versus + # copying them here. Left as a reference to indicate that we + # know the scripts must be dealt with. + # cp -a scripts $kerneldir/build + + if [ -f tools/objtool/objtool ]; then + cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/ + fi + if [ -d arch/${ARCH}/scripts ]; then + cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} + fi + if [ -f arch/${ARCH}/*lds ]; then + cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH} + fi + + rm -f $kerneldir/build/scripts/*.o + rm -f $kerneldir/build/scripts/*/*.o + + if [ "${ARCH}" = "powerpc" ]; then + cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/ + fi + + cp -a include $kerneldir/build/include + ) + + # now grab the chunks from the source tree that we need + ( + cd ${S} + + cp -a scripts $kerneldir/build + if [ "${ARCH}" = "arm64" ]; then + # arch/arm64/include/asm/xen references arch/arm + cp -a --parents arch/arm/include/asm/xen $kerneldir/build/ + # arch/arm64/include/asm/opcodes.h references arch/arm + cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/ + fi + + # include the machine specific headers for ARM variants, if available. + if [ "${ARCH}" = "arm" ]; then + cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ + + # include a few files for 'make prepare' + cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ + cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ + fi + + if [ -d arch/${ARCH}/include ]; then + cp -a --parents arch/${ARCH}/include $kerneldir/build/ + fi + + cp -a include $kerneldir/build + + if [ "${ARCH}" = "x86" ]; then + # files for 'make prepare' to succeed with kernel-devel + cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/ + cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/ + cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/ + cp -a --parents arch/x86/boot/string.h $kerneldir/build/ + cp -a --parents arch/x86/boot/string.c $kerneldir/build/ + cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/ + fi + ) + + # Make sure the Makefile and version.h have a matching timestamp so that + # external modules can be built + touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h + + # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. + cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf + + chown -R root:root ${D} } + # Ensure we don't race against "make scripts" during cpio do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock" -PACKAGES = "kernel-devsrc" -FILES_${PN} = "${KERNEL_SRC_PATH}" -RDEPENDS_${PN} = "bc" +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}" +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*" +RDEPENDS_${PN} = "bc glibc-utils"
Signature · 1 line
2.5.0
One question, below inline:
Quoted 56 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsThe arch conditional code for ARM was using invalid variables for the current version of the recipe. Those are now fixed, and we can package for ARM.
meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++++++++++++++++++++++------- 1 file changed, 138 insertions(+), 40 deletions(-)meta/recipes-kernel/linux/kernel-devsrc.bb +0
-0
meta/recipes-kernel/linux/kernel-devsrc.bb do_populate_sysroot[noexec] = "1" · line 34
Quoted 5 lines
meta/recipes-kernel/linux/kernel-devsrc.bb +0
-2@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1" S = "${STAGING_KERNEL_DIR}" B = "${STAGING_KERNEL_BUILDDIR}" -KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}" -
I see this is removed, but later items reference KERNEL_VERSION. Is that defined elsewhere?
--Mark
Quoted 184 lines
meta/recipes-kernel/linux/kernel-devsrc.bb +138
-38PACKAGE_ARCH = "${MACHINE_ARCH}" +KERNEL_BUILD_ROOT="/lib/modules/" + do_install() { - kerneldir=${D}${KERNEL_SRC_PATH} - install -d $kerneldir - - # - # Copy the staging dir source (and module build support) into the devsrc structure. - # We can keep this copy simple and take everything, since a we'll clean up any build - # artifacts afterwards, and the extra i/o is not significant - # - cd ${B} - find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - cd ${S} - find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - - # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not - # The main build artifacts. We clean the directory to avoid QA errors on mismatched - # architecture (since scripts and helpers are native format). - KBUILD_OUTPUT="$kerneldir" - oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts - # make clean generates an absolute path symlink called "source" - # in $kerneldir points to $kerneldir, which doesn't make any - # sense, so remove it. - if [ -L $kerneldir/source ]; then - bbnote "Removing $kerneldir/source symlink" - rm -f $kerneldir/source - fi - - # As of Linux kernel version 3.0.1, the clean target removes - # arch/powerpc/lib/crtsavres.o which is present in - # KBUILD_LDFLAGS_MODULE, making it required to build external modules. - if [ ${ARCH} = "powerpc" ]; then - mkdir -p $kerneldir/arch/powerpc/lib/ - cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o - fi - - chown -R root:root ${D} + kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} + install -d $kerneldir + + # create the directory structure + rm -f $kerneldir/build + rm -f $kerneldir/source + mkdir -p $kerneldir/build + + # for compatibility with some older variants of this package, we + # create a /usr/src/kernel symlink to /lib/modules/<version>/source + mkdir -p ${D}/usr/src + ( + cd ${D}/usr/src + ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel + ) + + # for on target purposes, we unify build and source + ( + cd $kerneldir + ln -s build source + ) + + # first copy everything + ( + cd ${S} + cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build + ) + + # then drop all but the needed Makefiles/Kconfig files + rm -rf $kerneldir/build/Documentation + rm -rf $kerneldir/build/scripts + rm -rf $kerneldir/build/include + + # now copy in parts from the build that we'll need later + ( + cd ${B} + + cp Module.symvers $kerneldir/build + cp System.map* $kerneldir/build + if [ -s Module.markers ]; then + cp Module.markers $kerneldir/build + fi + + cp .config $kerneldir/build + + # TODO: this scripts copy will likely blow up QA, so for now, we + # require a more complex 'make scripts' to restore these, versus + # copying them here. Left as a reference to indicate that we + # know the scripts must be dealt with. + # cp -a scripts $kerneldir/build + + if [ -f tools/objtool/objtool ]; then + cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/ + fi + if [ -d arch/${ARCH}/scripts ]; then + cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} + fi + if [ -f arch/${ARCH}/*lds ]; then + cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH} + fi + + rm -f $kerneldir/build/scripts/*.o + rm -f $kerneldir/build/scripts/*/*.o + + if [ "${ARCH}" = "powerpc" ]; then + cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/ + fi + + cp -a include $kerneldir/build/include + ) + + # now grab the chunks from the source tree that we need + ( + cd ${S} + + cp -a scripts $kerneldir/build + if [ "${ARCH}" = "arm64" ]; then + # arch/arm64/include/asm/xen references arch/arm + cp -a --parents arch/arm/include/asm/xen $kerneldir/build/ + # arch/arm64/include/asm/opcodes.h references arch/arm + cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/ + fi + + # include the machine specific headers for ARM variants, if available. + if [ "${ARCH}" = "arm" ]; then + cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ + + # include a few files for 'make prepare' + cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ + cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ + fi + + if [ -d arch/${ARCH}/include ]; then + cp -a --parents arch/${ARCH}/include $kerneldir/build/ + fi + + cp -a include $kerneldir/build + + if [ "${ARCH}" = "x86" ]; then + # files for 'make prepare' to succeed with kernel-devel + cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/ + cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/ + cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/ + cp -a --parents arch/x86/boot/string.h $kerneldir/build/ + cp -a --parents arch/x86/boot/string.c $kerneldir/build/ + cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/ + fi + ) + + # Make sure the Makefile and version.h have a matching timestamp so that + # external modules can be built + touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h + + # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. + cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf + + chown -R root:root ${D} } + # Ensure we don't race against "make scripts" during cpio do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock" -PACKAGES = "kernel-devsrc" -FILES_${PN} = "${KERNEL_SRC_PATH}" -RDEPENDS_${PN} = "bc" +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}" +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*" +RDEPENDS_${PN} = "bc glibc-utils"
Quoted 62 lines · Mark Hatle
One question, below inline:
Quoted 59 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsThe arch conditional code for ARM was using invalid variables for the current version of the recipe. Those are now fixed, and we can package for ARM.
meta/recipes-kernel/linux/kernel-devsrc.bb | 178 ++++++++++++++++++++++------- 1 file changed, 138 insertions(+), 40 deletions(-)meta/recipes-kernel/linux/kernel-devsrc.bb +0
-0@@ -30,50 +30,148 @@ do_populate_sysroot[noexec] = "1" S = "${STAGING_KERNEL_DIR}" B = "${STAGING_KERNEL_BUILDDIR}"
Quoted 5 lines
meta/recipes-kernel/linux/kernel-devsrc.bb do_populate_sysroot[noexec] = "1" · line 34
Quoted 2 lines
meta/recipes-kernel/linux/kernel-devsrc.bb +0
-2-KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}" -I see this is removed, but later items reference
KERNEL_VERSION. Is that defined elsewhere?
Yup. It comes from the base classes. That variable in the current form, is actually empty.
Bruce
Quoted 188 lines
--Mark
Quoted 184 lines
meta/recipes-kernel/linux/kernel-devsrc.bb +138
-38PACKAGE_ARCH = "${MACHINE_ARCH}" +KERNEL_BUILD_ROOT="/lib/modules/" + do_install() { - kerneldir=${D}${KERNEL_SRC_PATH} - install -d $kerneldir - - # - # Copy the staging dir source (and module build support) into the devsrc structure. - # We can keep this copy simple and take everything, since a we'll clean up any build - # artifacts afterwards, and the extra i/o is not significant - # - cd ${B} - find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - cd ${S} - find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir - - # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not - # The main build artifacts. We clean the directory to avoid QA errors on mismatched - # architecture (since scripts and helpers are native format). - KBUILD_OUTPUT="$kerneldir" - oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts - # make clean generates an absolute path symlink called "source" - # in $kerneldir points to $kerneldir, which doesn't make any - # sense, so remove it. - if [ -L $kerneldir/source ]; then - bbnote "Removing $kerneldir/source symlink" - rm -f $kerneldir/source - fi - - # As of Linux kernel version 3.0.1, the clean target removes - # arch/powerpc/lib/crtsavres.o which is present in - # KBUILD_LDFLAGS_MODULE, making it required to build external modules. - if [ ${ARCH} = "powerpc" ]; then - mkdir -p $kerneldir/arch/powerpc/lib/ - cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o - fi - - chown -R root:root ${D} + kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} + install -d $kerneldir + + # create the directory structure + rm -f $kerneldir/build + rm -f $kerneldir/source + mkdir -p $kerneldir/build + + # for compatibility with some older variants of this package, we + # create a /usr/src/kernel symlink to /lib/modules/<version>/source + mkdir -p ${D}/usr/src + ( + cd ${D}/usr/src + ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel + ) + + # for on target purposes, we unify build and source + ( + cd $kerneldir + ln -s build source + ) + + # first copy everything + ( + cd ${S} + cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build + ) + + # then drop all but the needed Makefiles/Kconfig files + rm -rf $kerneldir/build/Documentation + rm -rf $kerneldir/build/scripts + rm -rf $kerneldir/build/include + + # now copy in parts from the build that we'll need later + ( + cd ${B} + + cp Module.symvers $kerneldir/build + cp System.map* $kerneldir/build + if [ -s Module.markers ]; then + cp Module.markers $kerneldir/build + fi + + cp .config $kerneldir/build + + # TODO: this scripts copy will likely blow up QA, so for now, we + # require a more complex 'make scripts' to restore these, versus + # copying them here. Left as a reference to indicate that we + # know the scripts must be dealt with. + # cp -a scripts $kerneldir/build + + if [ -f tools/objtool/objtool ]; then + cp -a tools/objtool/objtool $kerneldir/build/tools/objtool/ + fi + if [ -d arch/${ARCH}/scripts ]; then + cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} + fi + if [ -f arch/${ARCH}/*lds ]; then + cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH} + fi + + rm -f $kerneldir/build/scripts/*.o + rm -f $kerneldir/build/scripts/*/*.o + + if [ "${ARCH}" = "powerpc" ]; then + cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/ + fi + + cp -a include $kerneldir/build/include + ) + + # now grab the chunks from the source tree that we need + ( + cd ${S} + + cp -a scripts $kerneldir/build + if [ "${ARCH}" = "arm64" ]; then + # arch/arm64/include/asm/xen references arch/arm + cp -a --parents arch/arm/include/asm/xen $kerneldir/build/ + # arch/arm64/include/asm/opcodes.h references arch/arm + cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/ + fi + + # include the machine specific headers for ARM variants, if available. + if [ "${ARCH}" = "arm" ]; then + cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ + + # include a few files for 'make prepare' + cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ + cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ + fi + + if [ -d arch/${ARCH}/include ]; then + cp -a --parents arch/${ARCH}/include $kerneldir/build/ + fi + + cp -a include $kerneldir/build + + if [ "${ARCH}" = "x86" ]; then + # files for 'make prepare' to succeed with kernel-devel + cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscallhdr.sh $kerneldir/build/ + cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/ + cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/ + cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/ + cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ + cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ + cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/ + cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/ + cp -a --parents arch/x86/boot/string.h $kerneldir/build/ + cp -a --parents arch/x86/boot/string.c $kerneldir/build/ + cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/ + fi + ) + + # Make sure the Makefile and version.h have a matching timestamp so that + # external modules can be built + touch -r $kerneldir/build/Makefile $kerneldir/build/include/generated/uapi/linux/version.h + + # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. + cp $kerneldir/build/.config $kerneldir/build/include/config/auto.conf + + chown -R root:root ${D} } + # Ensure we don't race against "make scripts" during cpio do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock" -PACKAGES = "kernel-devsrc" -FILES_${PN} = "${KERNEL_SRC_PATH}" -RDEPENDS_${PN} = "bc" +FILES_${PN} = "${KERNEL_BUILD_ROOT} ${KERNEL_SRC_PATH}" +FILES_${PN}-dbg += "${KERNEL_BUILD_ROOT}*/build/scripts/*/.debug/*" +RDEPENDS_${PN} = "bc glibc-utils"
Hi,
Quoted 37 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
Quoted 6 lines
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc builds
Noticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
ERROR: kernel-devsrc-1.0-r0 do_install: Function failed: do_install (log file is located at /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot | NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:do_populate_sysroot'] | NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native', 'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native', 'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native', 'cryptodev-linux-native', 'util-macros-native', 'xproto-native'] | NOTE: Skipping as already exists in sysroot: ['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native', 'gnu-config-native', 'automake-native', 'autoconf-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native', 'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native'] | DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g' /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g' | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1 exit 1 from 'rm -rf $kerneldir/build/include' | ERROR: Function failed: do_install (log file is located at /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: task do_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install) failed with exit code '1'
Best Regards,
Maxin
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/ kernel-devsrc.bb RDEPENDS on or otherwise requires it)
Ross
Quoted 158 lines · Maxin B. John
Hi,
Quoted 37 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
Quoted 6 lines
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/
876/steps/BuildImages/logs/stdioERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux- gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/ work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/ temp/log.do_install.25822
Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/ binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/ build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/meta/recipes-devtools/ pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/ build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.
3.bb:do_populate_sysroot', 'virtual:native:/home/
pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/ build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/meta/recipes-devtools/ pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/ recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_ 1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native', 'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native', 'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native', 'cryptodev-linux-native', 'util-macros-native', 'xproto-native']
| NOTE: Skipping as already exists in sysroot: ['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native', 'gnu-config-native', 'automake-native', 'autoconf-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native', 'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native'] | DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto- worker/nightly-arm/build/build/tmp/work/qemuarm-poky- linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto- autobuilder/yocto-worker/nightly-arm/build/build/tmp/ work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/build/tmp/work/qemuarm- poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e
's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/build/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto- autobuilder/yocto-worker/nightly-arm/build/build/tmp/ work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/ yocto-worker/nightly-arm/build/build/tmp/work/qemuarm- poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g'| DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux- gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1 exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux- gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install) failed with exit code '1'Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 18 lines
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bbRDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected]> wrote:
Quoted 8 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
Other failures are listed below:
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase 1541: FAILED
HOSTCC scripts/sortextable
scripts/sortextable.c:31:10: fatal error: tools/be_byteshift.h: No such file or directory
#include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
----------------------------------------------------------------------
Similar on qemuarm - poky-lsb :
HOSTCC scripts/recordmcount
HOSTCC scripts/sortextablescripts/sortextable.c:31:10: fatal error: tools/be_byteshift.h: No such file or directory
#include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2-------------------------------------------------------------------------
Also on PowerPC:
scripts/sortextable.c:31:10: fatal error: tools/be_byteshift.h: No such file or directory
#include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
Best Regards,
Maxin
Interesting. I'll look at the errors and send a v3 next week.
I unfortunately have no capability to run the oe-selftests on my builder, so I can only fix these
by inspection.
Cheers,
Bruce
Quoted 67 lines · Maxin B. John
Quoted 18 lines
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bbRDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected]> wrote:
Quoted 8 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
Other failures are listed below:
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase 1541: FAILED
HOSTCC
scripts/sortextable
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory
#include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
----------------------------------------------------------------------Similar on qemuarm - poky-lsb :
HOSTCC
scripts/recordmcount
HOSTCCscripts/sortextablescripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1 make: *** [Makefile:557: scripts] Error 2-------------------------------------------------------------------------
Also on PowerPC:
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 51 lines · Maxin B. John
Quoted 18 lines
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bbRDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected]> wrote:
Quoted 8 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
Other failures are listed below:
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase 1541: FAILED
HOSTCC
scripts/sortextable
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
----------------------------------------------------------------------Similar on qemuarm - poky-lsb :
HOSTCC
scripts/recordmcount
HOSTCCscripts/sortextablescripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1 make: *** [Makefile:557: scripts] Error 2-------------------------------------------------------------------------
Also on PowerPC:
Quoted 8 lines
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
I have all these fixed now.
Will have a look at musl next.
Cheers,
Bruce
Quoted 4 lines
Best Regards,
Maxin
Swore I picked the v2 patch for the second run, I've fired a mini test build to see.
Ross
Quoted 92 lines · Bruce Ashfield
Quoted 67 lines · Maxin B. John
Also fails on musl:
Quoted 6 lines
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bb RDEPENDS on or otherwise requires it)Quoted 7 lines
Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected]> wrote:
Quoted 1 line · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the
kernel
Quoted 3 lines
Quoted 3 lines
source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in
the
Quoted 1 line
Quoted 1 line
final package. The main purpose of the kernel-devsrc package has
been to
Quoted 1 line
Quoted 1 line
build modules against the running kernel, not to include a full copy
of
Quoted 2 lines
Quoted 2 lines
the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
Other failures are listed below:
arm64:https://autobuilder.yocto.io/builders/nightly-arm64/builds/7
90/steps/Running%20Sanity%20Tests/logs/stdioRESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase
1541: FAILEDHOSTCC
scripts/sortextable
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such
file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
----------------------------------------------------------------------Similar on qemuarm - poky-lsb :
https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds
/812/steps/Running%20Sanity%20Tests/logs/stdioHOSTCC
scripts/recordmcount
HOSTCCscripts/sortextablescripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1 make: *** [Makefile:557: scripts] Error 2-------------------------------------------------------------------------
Also on PowerPC:
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds
/814/steps/Running%20Sanity%20Tests/logs/stdioQuoted 8 lines
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h: No such file or directory#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2I have all these fixed now.
Will have a look at musl next.
Cheers,
Bruce
Quoted 4 lines
Best Regards,
Maxin
Quoted 1 line · Ross
Swore I picked the v2 patch for the second run, I've fired a mini test build to see.
The other failures reported were valid and not addressed by v2. So only 32 bit ARM would have been fixed (packaging wise), the rest were ok.
I build and deployed kernel-devsrc for ARM multiple times, so if it does actually fail again .. I'm *very* interested to hear.
Bruce
Quoted 101 lines
Ross
On 1 March 2018 at 13:59, Bruce Ashfield <[email protected] <mailto:[email protected]>> wrote:
On 2018-03-01 5:58 AM, Maxin B. John wrote:
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bb
<http://kernel-devsrc.bb> RDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected] <mailto:[email protected]>> wrote:
>On Wed, Feb 28, 2018 at 02:20:45PM -0500, Bruce Ashfield wrote:
>> The existing kernel-devsrc package starts with a full copy
of the kernel
>> source and then starts to strip out elements that are not
required.
>>
>> This results in extra time (I/O) and extra space being
taken up in the
>> final package. The main purpose of the kernel-devsrc
package has been to
>> build modules against the running kernel, not to include a
full copy of
>> the source code for re-building the kernel. The end result
was a
>> 600M kernel-devsrc package.Other failures are listed below:
arm64:
https://autobuilder.yocto.io/builders/nightly-arm64/builds/790/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm64/builds/790/steps/Running%20Sanity%20Tests/logs/stdio>RESULTS - kernelmodule.KernelModuleTest.test_kernel_module -
Testcase 1541: FAILEDHOSTCC
scripts/sortextable
scripts/sortextable.c:31:10: fatal error:
tools/be_byteshift.h: No such file or directory #include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
----------------------------------------------------------------------Similar on qemuarm - poky-lsb :
https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds/812/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds/812/steps/Running%20Sanity%20Tests/logs/stdio>HOSTCC
scripts/recordmcount
HOSTCCscripts/sortextablescripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h:
No such file or directory
#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102:
scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2
-------------------------------------------------------------------------Also on PowerPC:
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds/814/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds/814/steps/Running%20Sanity%20Tests/logs/stdio>
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h:
No such file or directory
#include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2I have all these fixed now.
Will have a look at musl next.
Cheers,
Bruce
Best Regards,
Maxin
Ah ok, I misunderstood.
Ross
Quoted 129 lines · Bruce Ashfield
Quoted 3 lines · Ross
Swore I picked the v2 patch for the second run, I've fired a mini test build to see.
The other failures reported were valid and not addressed by v2. So only 32 bit ARM would have been fixed (packaging wise), the rest were ok.
I build and deployed kernel-devsrc for ARM multiple times, so if it does actually fail again .. I'm *very* interested to hear.
Bruce
Quoted 113 lines
Ross
On 1 March 2018 at 13:59, Bruce Ashfield <[email protected] <mailto:[email protected]>> wrote:
On 2018-03-01 5:58 AM, Maxin B. John wrote:
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/
build/meta/recipes-kernel/linux/kernel-devsrc.bb
<http://kernel-devsrc.bb> RDEPENDS on or otherwise requires
it)Ross On 1 March 2018 at 08:28, Maxin B. John <[email protected] <mailto:[email protected]>> wrote: >On Wed, Feb 28, 2018 at 02:20:45PM -0500, Bruce Ashfieldwrote:
>> The existing kernel-devsrc package starts with a full copy
of the kernel
>> source and then starts to strip out elements that are not
required.
>>
>> This results in extra time (I/O) and extra space being
taken up in the
>> final package. The main purpose of the kernel-devsrc
package has been to
>> build modules against the running kernel, not to include a
full copy of
>> the source code for re-building the kernel. The end result
was a
>> 600M kernel-devsrc package.Other failures are listed below:
arm64:
https://autobuilder.yocto.io/builders/nightly-arm64/builds/7
90/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm64/builds/
790/steps/Running%20Sanity%20Tests/logs/stdio>RESULTS - kernelmodule.KernelModuleTest.test_kernel_module - Testcase 1541: FAILED HOSTCC scripts/sortextable scripts/sortextable.c:31:10: fatal error: tools/be_byteshift.h: No such file or directory #include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1 make: *** [Makefile:557: scripts] Error 2 ----------------------------------------------------------------------
Similar on qemuarm - poky-lsb :
https://autobuilder.yocto.io/builders/nightly-arm-lsb/builds
/812/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm-lsb/build
s/812/steps/Running%20Sanity%20Tests/logs/stdio>HOSTCC scripts/recordmcount HOSTCC scripts/sortextable scripts/sortextable.c:31:10: fatal error: tools/be_byteshift.h: No such file or directory #include <tools/be_byteshift.h> ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:102: scripts/sortextable] Error 1 make: *** [Makefile:557: scripts] Error 2 -------------------------------------------------------------------------
Also on PowerPC:
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds
/814/steps/Running%20Sanity%20Tests/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-ppc-lsb/build
s/814/steps/Running%20Sanity%20Tests/logs/stdio>
scripts/sortextable.c:31:10: fatal error:tools/be_byteshift.h:
No such file or directory
#include <tools/be_byteshift.h>
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:102:scripts/sortextable] Error 1
make: *** [Makefile:557: scripts] Error 2I have all these fixed now.
Will have a look at musl next.
Cheers,
Bruce
Best Regards,
Maxin
I worked through some problems to test with musl:
- uprev'd linux-libc-headers --> refresh / change of the musl ethhdr patch
- worked around the binutils link issue and libsystemd
So I was able to assemble kernel-devsrc on an image with musl, and now I'm back to the problem that lead me to add glibc-utils to the RDEPENDS of kernel-devsrc:
---------
root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build# make ARCH=x86 scripts make: getconf: Command not found make: getconf: Command not found make: getconf: Command not found HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/bin2c make[1]: getconf: Command not found make[1]: getconf: Command not found make[1]: getconf: Command not found HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --silentoldconfig Kconfig WRAP arch/x86/include/generated/asm/clkdev.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s CHK scripts/mod/devicetable-offsets.h UPD scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/kallsyms HOSTCC scripts/conmakehash HOSTCC scripts/recordmcount HOSTCC scripts/sortextable root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build#
----------------
I've added Khem to the cc .. Khem: what in the muslc world would provide 'getconf' ? I didn't see it when glancing through the packaging.
Bruce
Quoted 145 lines · Ross
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bb<http://kernel-devsrc.bb> RDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected] <mailto:[email protected]>> wrote:
Hi,
On Wed, Feb 28, 2018 at 02:20:45PM -0500, Bruce Ashfield wrote:
> The existing kernel-devsrc package starts with a full copy of the
kernel
> source and then starts to strip out elements that are not required. >
> This results in extra time (I/O) and extra space being taken up
in the
> final package. The main purpose of the kernel-devsrc package has
been to
> build modules against the running kernel, not to include a full
copy of
> the source code for re-building the kernel. The end result was a > 600M kernel-devsrc package.
>
> This restructuring of the package uses an approach similar to other > distros, where the kernel-devsrc package is for building against the > running kernel and uses a curated set of copied infrastructure,
versus
> a mass copy of the entire kernel.
>
> The differences in this approach versus other is largely due to the > architecture support and the split build/source directory of the > kernel.
>
> The result is a kernel-devsrc package of about 10M, which is capable > of running "make scripts" and compiling kernel modules against the > running kernel.
>
> Along with the changes to the copying of the infrascture, we also > have the following changes:
>
> - a better/more explicit listing of dependencies for on-target > builds of "make scripts" or "makemodules_prepare"
>
> - The kernel source is installed into /lib/modules/<version>/build > and a symlink created from/usr/src/kernelto the new location. > This aligns with the standard location for module support > code
>
> - There is also a symlink from /lib/modules/<version>/source ->
build
> to reserve a spot for a new package that is simply the kernel > source. That package is not part of this update.
>
> [YOCTO #12535]
>
> Signed-off-by: Bruce Ashfield <[email protected]
<mailto:[email protected]>>
> ---
>
> v2: fixarch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio>ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install
(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.
3.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native',
'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native',
'openssl-native', 'gtk-doc-native', 'lzo-native',
'makedepend-native', 'cryptodev-linux-native', 'util-macros-native',
'xproto-native']
| NOTE: Skipping as already exists in sysroot:
['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm',
'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native',
'gnu-config-native', 'automake-native', 'autoconf-native',
'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native',
'texinfo-dummy-native', 'flex-native', 'libmpc-native',
'gmp-native', 'mpfr-native', 'm4-native']
| DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
| xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e
's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g'
-e
's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g' | DEBUG: Python functionextend_recipe_sysrootfinished
| DEBUG: Executing shell functiondo_install
| cp: with --parents, the destination must be a directory
| Try 'cp --help' for more information.
| WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task
(/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install)
failed with exit code '1'Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Alpine Linux has hit this and they just build a custom getconf binary as part of their musl build;
https://git.alpinelinux.org/cgit/aports/tree/main/musl
(also getent)
Ross
Quoted 264 lines · Bruce Ashfield
I worked through some problems to test with musl:
- uprev'd linux-libc-headers --> refresh / change of the musl ethhdr patch
- worked around the binutils link issue and libsystemd
So I was able to assemble kernel-devsrc on an image with musl, and now I'm back to the problem that lead me to add glibc-utils to the RDEPENDS of kernel-devsrc:
---------
root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build# make ARCH=x86 scripts make: getconf: Command not found make: getconf: Command not found make: getconf: Command not found HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/bin2c make[1]: getconf: Command not found make[1]: getconf: Command not found make[1]: getconf: Command not found HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --silentoldconfig Kconfig WRAP arch/x86/include/generated/asm/clkdev.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s CHK scripts/mod/devicetable-offsets.h UPD scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/kallsyms HOSTCC scripts/conmakehash HOSTCC scripts/recordmcount HOSTCC scripts/sortextable root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build#----------------
I've added Khem to the cc .. Khem: what in the muslc world would provide 'getconf' ? I didn't see it when glancing through the packaging.
Bruce
Quoted 204 lines · Ross
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/ kernel-devsrc.bb <http://kernel-devsrc.bb> RDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected] <mailto:
[email protected]>> wrote:Hi,
On Wed, Feb 28, 2018 at 02:20:45PM -0500, Bruce Ashfield wrote:
> The existing kernel-devsrc package starts with a full copy of the
kernel
> source and then starts to strip out elements that are not required. >
> This results in extra time (I/O) and extra space being taken up
in the
> final package. The main purpose of the kernel-devsrc package has
been to
> build modules against the running kernel, not to include a full
copy of
> the source code for re-building the kernel. The end result was a > 600M kernel-devsrc package.
>
> This restructuring of the package uses an approach similar to other > distros, where the kernel-devsrc package is for building against
the
> running kernel and uses a curated set of copied infrastructure,
versus
> a mass copy of the entire kernel.
>
> The differences in this approach versus other is largely due to the > architecture support and the split build/source directory of the > kernel.
>
> The result is a kernel-devsrc package of about 10M, which is
capable
> of running "make scripts" and compiling kernel modules against the > running kernel.
>
> Along with the changes to the copying of the infrascture, we also > have the following changes:
>
> - a better/more explicit listing of dependencies for on-target
> builds of "make scripts" or "makemodules_prepare"
>
> - The kernel source is installed into /lib/modules/<version>/build
> and a symlink created from/usr/src/kernelto the new location.
> This aligns with the standard location for module support
> code
>
> - There is also a symlink from /lib/modules/<version>/source ->
build
> to reserve a spot for a new package that is simply the kernel
> source. That package is not part of this update.
>
> [YOCTO #12535]
>
> Signed-off-by: Bruce Ashfield <[email protected]
<mailto:[email protected]>>> ---
>
> v2: fixarch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876
/steps/BuildImages/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm/builds/87
6/steps/BuildImages/logs/stdio>ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel- devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel- devsrc/1.0-r0/temp/log.do_install.25822
Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-
arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3. bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/ pkgconfig_git.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-devtools/gcc/gcc-cross_7.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:
do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06. bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-
worker/nightly-arm/build/meta/recipes-connectivity/openssl/ openssl_1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native', 'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native', 'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native', 'cryptodev-linux-native', 'util-macros-native', 'xproto-native']
| NOTE: Skipping as already exists in sysroot:
['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native', 'gnu-config-native', 'automake-native', 'autoconf-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native', 'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native']
| DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/
nightly-arm/build/build/tmp/work/qemuarm-poky-linux- gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
| xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/
yocto-worker/nightly-arm/build/build/tmp/work/qemuarm- poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yoct
o-worker/nightly-arm/build/build/tmp/work/qemuarm-poky- linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e
's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yoc
to-worker/nightly-arm/build/build/tmp/hosttools:g'-e 's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto -worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuil der/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm- poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto- worker/nightly-arm/build/build/tmp/work/qemuarm-poky- linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g' | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel- devsrc/1.0-r0/temp/run.do_install.25822:1
exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel- devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/
build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install)
failed with exit code '1'Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Quoted 7 lines · Ross
Alpine Linux has hit this and they just build a custom getconf binary as part of their musl build;
https://git.alpinelinux.org/cgit/aports/tree/main/musl
(also getent)
I have long thought for adding musl-utils recipes for compat issues
we should probably enhance bsd-headers to include
https://github.com/boltlinux/musl-utils
and also rename the recipe to be called glibc-compat or musl-utils
Quoted 253 lines
Ross
Quoted 248 lines · Bruce Ashfield
I worked through some problems to test with musl:
- uprev'd linux-libc-headers --> refresh / change of the musl ethhdr patch
- worked around the binutils link issue and libsystemd
So I was able to assemble kernel-devsrc on an image with musl, and now I'm back to the problem that lead me to add glibc-utils to the RDEPENDS of kernel-devsrc:
---------
root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build# make ARCH=x86 scripts make: getconf: Command not found make: getconf: Command not found make: getconf: Command not found HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/bin2c make[1]: getconf: Command not found make[1]: getconf: Command not found make[1]: getconf: Command not found HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --silentoldconfig Kconfig WRAP arch/x86/include/generated/asm/clkdev.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s CHK scripts/mod/devicetable-offsets.h UPD scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/kallsyms HOSTCC scripts/conmakehash HOSTCC scripts/recordmcount HOSTCC scripts/sortextable root@qemux86-64:/lib/modules/4.14.19-yocto-standard/build#----------------
I've added Khem to the cc .. Khem: what in the muslc world would provide 'getconf' ? I didn't see it when glancing through the packaging.
Bruce
Quoted 188 lines · Ross
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bb
<http://kernel-devsrc.bb> RDEPENDS on or otherwise requires it)Ross
On 1 March 2018 at 08:28, Maxin B. John <[email protected] <mailto:[email protected]>> wrote:
Hi,
On Wed, Feb 28, 2018 at 02:20:45PM -0500, Bruce Ashfield wrote:
> The existing kernel-devsrc package starts with a full copy of the
kernel
> source and then starts to strip out elements that are not
required.
>
> This results in extra time (I/O) and extra space being taken up
in the
> final package. The main purpose of the kernel-devsrc package has
been to
> build modules against the running kernel, not to include a full
copy of
> the source code for re-building the kernel. The end result was a > 600M kernel-devsrc package.
>
> This restructuring of the package uses an approach similar to
other
> distros, where the kernel-devsrc package is for building against
the
> running kernel and uses a curated set of copied infrastructure,
versus
> a mass copy of the entire kernel.
>
> The differences in this approach versus other is largely due to
the
> architecture support and the split build/source directory of the > kernel.
>
> The result is a kernel-devsrc package of about 10M, which is
capable
> of running "make scripts" and compiling kernel modules against the > running kernel.
>
> Along with the changes to the copying of the infrascture, we also > have the following changes:
>
> - a better/more explicit listing of dependencies for on-target
> builds of "make scripts" or "makemodules_prepare"
>
> - The kernel source is installed into
/lib/modules/<version>/build> and a symlink created from /usr/src/kernel to the new location. > This aligns with the standard location for module support > code > > - There is also a symlink from /lib/modules/<version>/source -> build > to reserve a spot for a new package that is simply the kernel > source. That package is not part of this update. > > [YOCTO #12535] > > Signed-off-by: Bruce Ashfield <[email protected] <mailto:[email protected]>> > --- > > v2: fix arch/arm devsrc builds Noticed one kernel-devsrc build failure in autobuilder (qemuarm) :https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
<https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio>
ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log file is located at
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822
Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot',
'
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.3.bb:do_populate_sysroot','virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot',
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native',
'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native',
'openssl-native', 'gtk-doc-native', 'lzo-native',
'makedepend-native', 'cryptodev-linux-native', 'util-macros-native',
'xproto-native']
| NOTE: Skipping as already exists in sysroot:
['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm',
'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native',
'gnu-config-native', 'automake-native', 'autoconf-native',
'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native',
'texinfo-dummy-native', 'flex-native', 'libmpc-native',
'gmp-native', 'mpfr-native', 'm4-native']
| DEBUG: sed -e's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
| xargs sed -i -e's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g'
-e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g'
-e's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g'
-e's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g'
-e's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g'
| DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1
exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task(/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install)
failed with exit code '1'Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Quoted 6 lines · Ross
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bbRDEPENDS on or otherwise requires it)
I sent patches to add musl-utils which should help this case. Perhaps adding glibc-utils to
deps unconditionally is not right thing here. We can use libc-glibc and libc-musl overrides
to select the right utils.
Other idea is to create virtual/libc-utils but that seems like an overkill.
Quoted 137 lines
Ross
Quoted 118 lines · Maxin B. John
Hi,
Quoted 37 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
Quoted 6 lines
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log
file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.
3.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native',
'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native',
'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native',
'cryptodev-linux-native', 'util-macros-native', 'xproto-native']
| NOTE: Skipping as already exists in sysroot: ['binutils-cross-arm',
'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc',
'quilt-native', 'gettext-minimal-native', 'gnu-config-native',
'automake-native', 'autoconf-native', 'libtool-native',
'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native',
'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native']
| DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
| xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e
's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g'
-e
's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g'| DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install)
failed with exit code '1'Quoted 7 lines
Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 8 lines · Khem Raj
Quoted 6 lines · Ross
Also fails on musl:
ERROR: Nothing RPROVIDES 'glibc-utils' (but
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/meta/recipes-kernel/linux/kernel-devsrc.bbRDEPENDS on or otherwise requires it)
Quoted 5 lines
I sent patches to add musl-utils which should help this case. Perhaps adding glibc-utils to
deps unconditionally is not right thing here. We can use libc-glibc and libc-musl overrides
to select the right utils.
Yah. I've already removed that in my updated WIP version of the patch, I'm just trying to complete
the work and get the scripts building on target with musl .. I assume I can use the c library variable
and select the right package ?
Bruce
Quoted 145 lines
Other idea is to create virtual/libc-utils but that seems like an overkill.
Quoted 121 lines
Ross
Quoted 118 lines · Maxin B. John
Hi,
Quoted 37 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
Quoted 6 lines
[YOCTO #12535]
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log
file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.
3.bb:do_populate_sysroot',
'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:d
o_populate_sysroot']
| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native',
'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native',
'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native',
'cryptodev-linux-native', 'util-macros-native', 'xproto-native']
| NOTE: Skipping as already exists in sysroot: ['binutils-cross-arm',
'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc',
'quilt-native', 'gettext-minimal-native', 'gnu-config-native',
'automake-native', 'autoconf-native', 'libtool-native',
'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native',
'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native']
| DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
| xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y
octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e
's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g'
-e
's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g'
-e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g'| DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1exit 1 from 'rm -rf $kerneldir/build/include'
| ERROR: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
NOTE: recipe kernel-devsrc-1.0-r0: taskdo_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install)
failed with exit code '1'Quoted 16 lines
Quoted 7 lines
Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 6 lines · Bruce Ashfield
Yah. I've already removed that in my updated WIP version of the patch, I'm just trying to complete
the work and get the scripts building on target with musl .. I assume I can use the c library variable
and select the right package ?
Until we have a virtual provider to magically pick the right one, this would be the most correct:
RDEPENDS_append_libc-glibc = " glibc-utils"
RDEPENDS_append_libc-musl = " musl-utils"
I guess you could assume that any existing libc has a utils package and just use ${TCLIBC}-utils though.
Ross
Quoted 42 lines · Maxin B. John
Hi,
Quoted 39 lines · Bruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel.
The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel.
Along with the changes to the copying of the infrascture, we also have the following changes:
- a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make
modules_prepare"- The kernel source is installed into /lib/modules/<version>/build and a symlink created from
/usr/src/kernelto the new location. This aligns with the standard location for module support code- There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update.
[YOCTO #12535]
Quoted 8 lines
Quoted 4 lines
Signed-off-by Bruce Ashfield <[email protected]>---
v2: fix
arch/armdevsrc buildsNoticed one kernel-devsrc build failure in autobuilder (qemuarm) :
https://autobuilder.yocto.io/builders/nightly-arm/builds/876/steps/BuildImages/logs/stdio
This failure actually can't be from v2, it is the v1 issue I fixed. The offending lines of
code are completely gone.
Bruce
Quoted 28 lines
ERROR: kernel-devsrc-1.0-r0
do_install: Function failed:do_install(log file is located at/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)
ERROR: Logfile of failure stored in:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822
Log data follows:
| DEBUG: Executing python functionextend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/binutils/binutils-cross_2.30.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/xz/xz_5.2.3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/gcc/gcc-cross_7.
3.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot', '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:do_populate_sysroot']| NOTE: Installed into sysroot: ['pkgconfig-native', 'lzop-native', 'kern-tools-native', 'pseudo-native', 'kmod-native', 'bc-native', 'openssl-native', 'gtk-doc-native', 'lzo-native', 'makedepend-native', 'cryptodev-linux-native', 'util-macros-native', 'xproto-native'] | NOTE: Skipping as already exists in sysroot: ['binutils-cross-arm', 'xz-native', 'gcc-runtime', 'gcc-cross-arm', 'bison-native', 'glibc', 'quilt-native', 'gettext-minimal-native', 'gnu-config-native', 'automake-native', 'autoconf-native', 'libtool-native', 'linux-libc-headers', 'libgcc', 'zlib-native', 'texinfo-dummy-native', 'flex-native', 'libmpc-native', 'gmp-native', 'mpfr-native', 'm4-native'] | DEBUG: sed -e 's:^[^/]*/:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native/:g' /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_COMPONENTS_DIR:/home/pokybuild/yocto-autobuilder/y octo-worker/nightly-arm/build/build/tmp/sysroots-components:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/pkgdata/qemuarm:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/fifo.25822:g' | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | cp: with --parents, the destination must be a directory | Try 'cp --help' for more information. | WARNING: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/run.do_install.25822:1 exit 1 from 'rm -rf $kerneldir/build/include' | ERROR: Function failed: do_install (log file is located at /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/kernel-devsrc/1.0-r0/temp/log.do_install.25822)NOTE: recipe kernel-devsrc-1.0-r0: task
do_install: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/recipes-kernel/linux/kernel-devsrc.bb:do_install) failed with exit code '1'Best Regards,
Maxin
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"