当前位置: 首页 > 知识库问答 >
问题:

更新yocto morty到thud后内核编译错误

盖昊东
2023-03-14

我在约克托·莫蒂上使用“linux-toradex-4.1-2.0.x-imx”,一切都很好。但是在更新所有层和poky到“Thud”版本后,我得到内核do_compile错误:

Sstate summary: Wanted 624 Found 66 Missed 558 Current 689 (10% match, 57% complete)
NOTE: Executing SetScene Tasks
WARNING: Variable key RDEPENDS_${KERNEL_PACKAGE_NAME}-base (${KERNEL_PACKAGE_NAME}-image) replaces original key RDEPENDS_kernel-base ( kernel-devicetree kernel-image).
ERROR: linux-toradex-samim-4.1-2.0.x-r0 do_compile: oe_runmake failed
ERROR: linux-toradex-samim-4.1-2.0.x-r0 do_compile: Function failed: do_compile (log file is located at /opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/temp/log.do_compile.23716)
ERROR: Logfile of failure stored in: /opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/temp/log.do_compile.23716
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8 HOSTCC=gcc  -isystem/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/usr/lib -L/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/lib -Wl,-rpath,/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native/lib -Wl,-O1 HOSTCPP=gcc  -E uImage CC=arm-angstrom-linux-gnueabi-gcc  -mno-thumb-interwork -marm -fuse-ld=bfd -fdebug-prefix-map=/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0=/usr/src/debug/linux-toradex-samim/4.1-2.0.x-r0 -fdebug-prefix-map=/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot= -fdebug-prefix-map=/opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-r0/recipe-sysroot-native=  -fdebug-prefix-map=/opt/yocto/toradex-morty/poky/build/tmp-glibc/work-shared/colibri-imx6/kernel-source=/usr/src/kernel   LD=arm-angstrom-linux-gnueabi-ld.bfd   LOADADDR=0x10008000
|   GEN     ./Makefile
| scripts/kconfig/conf  --silentoldconfig Kconfig
|   CHK     include/config/kernel.release
|   UPD     include/config/kernel.release
|   GEN     ./Makefile
|   WRAP    arch/arm/include/generated/asm/bitsperlong.h
|   WRAP    arch/arm/include/generated/asm/cputime.h
|   WRAP    arch/arm/include/generated/asm/current.h

.
.
.
...after some warnings...
.
.
|                  from /opt/yocto/toradex-morty/poky/build/tmp-glibc/work-shared/colibri-imx6/kernel-source/include/linux/crypto.h:21,
|                  from /opt/yocto/toradex-morty/poky/build/tmp-glibc/work-shared/colibri-imx6/kernel-source/include/crypto/algapi.h:15,
|                  from /opt/yocto/toradex-morty/poky/build/tmp-glibc/work-shared/colibri-imx6/kernel-source/crypto/ghash-generic.c:15:
| /opt/yocto/toradex-morty/poky/build/tmp-glibc/work-shared/colibri-imx6/kernel-source/include/linux/log2.h:22:1: warning: ignoring attribute 'noreturn' because it conflicts with attribute 'const' [-Wattributes]
|  int ____ilog2_NaN(void);
|  ^~~
|   LD      crypto/crypto_blkcipher.o
|   LD      crypto/crypto_hash.o
|   LD      crypto/cryptomgr.o
|   LD      crypto/built-in.o
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /opt/yocto/toradex-morty/poky/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-samim/4.1-2.0.x-0/temp/log.do_compile.10534)

内核配方是:

require recipes-kernel/linux/linux-imx.inc
include conf/tdx_version.conf

SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules"

SRC_URI = "git://git@git.myco.int/kernel/linux-toradex-4.1-2.0.x-imx.git;protocol=ssh;branch=${SRCBRANCH} \
        file://defconfig \
        file://0002-Add-APP-K7-board-support.patch \
        "

# Load USB functions configurable through configfs (CONFIG_USB_CONFIGFS)
KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', ' libcomposite', '',d)}"

LOCALVERSION = "-${TDX_VER_ITEM}"
# PV_append = "+git${SRCPV}"

SRCREV = "e420b7a49300560485af191ec63887d27da577db"
SRCBRANCH = "toradex_4.1-2.0.x-imx"

DEPENDS += "lzop-native bc-native"
COMPATIBLE_MACHINE = "(mx7|mx6)"

# defaults
TDX_VER_ITEM ??= "0"

inherit kernel

在'meta-toradex-nxp'层,我只看到'linux-toradex_4.9-2.3.x.bb'而不是4.1-2.0. x,这很重要吗?我是否需要在我的使用'Thud'编译的配方中添加其他内容?

我的bblayers.conf也是:

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  ${TOPDIR}/../meta-myproj \
  \
  ${TOPDIR}/../meta-angstrom \
  \
  ${TOPDIR}/../meta-toradex-nxp \
  ${TOPDIR}/../meta-freescale \
  ${TOPDIR}/../meta-freescale-3rdparty \
  \
  ${TOPDIR}/../meta-toradex-bsp-common \
  \
  ${TOPDIR}/../meta-snappy \
  \
  ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \
  ${TOPDIR}/../meta-openembedded/meta-oe \
  ${TOPDIR}/../meta-openembedded/meta-gnome \
  ${TOPDIR}/../meta-openembedded/meta-initramfs \
  ${TOPDIR}/../meta-openembedded/meta-networking \
  ${TOPDIR}/../meta-openembedded/meta-multimedia \
  ${TOPDIR}/../meta-openembedded/meta-python \
  ${TOPDIR}/../meta-openembedded/meta-webserver \
  \
  ${TOPDIR}/../meta-openembedded/meta-filesystems \
  \
  ${TOPDIR}/../meta-lxde \
  ${TOPDIR}/../meta-qt5 \
  ${TOPDIR}/../meta-qt5-extra \
  ${TOPDIR}/../meta-toradex-demos \
  ${TOPDIR}/../meta-freescale-distro \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-browser \
  ${TOPDIR}/../meta-swupdate \
  \
  \
  ${TOPDIR}/../meta \
"

提前非常感谢你。

更新:感谢@Marcel,我查看了yocto手册,它说:“GNU编译器集合版本8.2现在默认用于编译。如果您仍然需要使用版本7.x进行编译,还提供了GCC 7.3。您可以通过设置来选择此版本,也可以通过在配置中将GCCVERSION变量设置为“7.%”来选择。”

然后我插入'GCCVERSION="7.%"'到conf/local.conf,但不幸的是它仍然不工作。

共有1个答案

慕逸仙
2023-03-14

请注意,Thud正在使用更高版本的gcc编译器(准确地说是8.3)。不幸的是,过时的Linux内核4.1无法使用gcc 8.3进行编译,您需要将多个补丁向后移植才能使这种组合工作。另外请注意,OpenEmbedded通常将任何警告视为错误,您可能还希望通过编译标志禁用该警告。否则,所需的补丁数量将是无限的。总的来说,更好的方法可能是适当地采用稍后仍然支持的Linux内核,如我们现在正式在BSP 3.0b2中使用的toradex_4.14-2.0.x-imx。

 类似资料:
  • 问题内容: 我通过(conda update spyder)在anaconda中将spyder更新为4.1,除非我从anaconda提示符下将其打开,否则它将无法工作,否则它将显示此错误: 启动内核时发生错误,该错误是: 追溯(最近一次通话): 在create_kernel_manager_and_kernel_client kernel_manager.start_kernel(stderr =

  • 为什么有些人想要编译新内核?Debian 自带的默认内核已经包含了绝大部分配置, 所以编译新内核并不是必需的。然而,基于以下这些理由,编译新内核还是很有用的: 支持某些特殊的硬件,或者默认的内核配置和某些硬件冲突。 支持某些没有包含在预装内核中的硬件或选项,例如 APM 或 SMP。 compact 和 idepci 版本的内核没有音效支持。虽然 vanilla 版的内核支持, 但它可能因为其它原

  • 为什么有些人想要编译新内核?Debian 自带的默认内核已经包含了绝大部分配置, 所以编译新内核并不是必需的。然而,基于以下这些理由,编译新内核还是很有用的: 支持某些特殊的硬件,或者默认的内核配置和某些硬件冲突。 支持某些没有包含在预装内核中的硬件或选项,例如 APM 或 SMP。 通过删除无用的驱动程序来优化内核,以减少启动时间。 使用某些不被默认内核所支持的选项 (例如 high memor

  • 为什么有些人想要编译新内核?Debian 自带的默认内核已经包含了绝大部分配置, 所以编译新内核并不是必需的。然而,基于以下这些理由,编译新内核还是很有用的: 支持某些特殊的硬件,或者默认的内核配置和某些硬件冲突。 支持某些没有包含在预装内核中的硬件或选项,例如 APM 或 SMP。 通过删除无用的驱动程序来优化内核,以减少启动时间。 使用某些不被默认内核所支持的选项 (例如 high memor

  • 有时你可能想添加必要的驱动、补丁、Kali Linux内核里没有的功能.如下的教程描述如何根据你的需要快速地修改和编译Kali Linux内核.请注意目前默认的Kali Linux内核已经打过了大量的无线注入补丁. 安装编译所需的依赖 开始安装编译内核所需的所有依赖. apt-get install kernel-package ncurses-dev fakeroot bzip2 下载Kali

  • 编译Linux内核 下载内核源码 apt-get source linux-image-$(uname -r) apt-get build-dep linux-image-$(uname -r) apt-get install -y libncurses5 libncurses5-dev 修改内核配置并编译 chmod a+x debian/rules chmod a+x debian/scrip