我目前正在尝试在 meta-imx 之上编译自定义 Yocto 层。我在编译期间遇到以下错误。
ERROR: linux-imx-5.15.32+gitAUTOINC+fa6c316859-r0 do_package: Error execu
ting a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function:
0001: *** 0002:extend_recipe_sysroot(d) 0003: File: '/home/bherrera/winYocto5.15/sources/poky/meta/classes/staging.bbclass', lineno: 584, function: extend_recipe_sysroot 0580: if "/bin/" in l or "/sbin/" in l: 0581: # defer /*bin/* files until last in case they need libs 0582: binfiles[l] = (targetdir, dest) 0583: else: *** 0584: staging_copyfile(l, targetdir, dest, postinsts, seendirs) 0585: 0586: # Handle deferred binfiles 0587: for l in binfiles: 0588: (targetdir, dest) = binfiles[l] File: '/home/bherrera/winYocto5.15/sources/poky/meta/classes/staging.bbclass', lineno: 158, function: staging_copyfile 0154: os.symlink(linkto, dest) 0155: #bb.warn(c) 0156: else: 0157: try: *** 0158: os.link(c, dest) 0159: except OSError as err: 0160: if err.errno == errno.EXDEV: 0161: bb.utils.copyfile(c, dest) 0162: else: Exception: FileExistsError: [Errno 17] File exists: '/home/bherrera/winYocto5.15/build/tmp/sysroots-components/x86_64/libgcrypt-native/usr/include/gcrypt.h' -> '/home/bherrera/winYocto5.15/build/tmp/work/imx8mq_itx_p_c444-poky-linux/linux-imx/5.15.32+gitAUTOINC+fa6c316859-r0/recipe-sysroot-native/usr/include/gcrypt.h' ERROR: Logfile of failure stored in: /home/bherrera/winYocto5.15/build/tmp/work/imx8mq_itx_p_c444-poky-linux/linux-imx/5.15.32+gitAUTOINC+fa6c316859-r0/temp/log.do_package.3047284 ERROR: Task (/home/bherrera/winYocto5.15/sources/meta-winsys/recipes-kernel/linux/linux-imx_5.15.bb:do_package) failed with exit code '1' NOTE: Tasks Summary: Attempted 5912 tasks of which 5911 didn't need to be rerun and 1 failed.
我拥有的 reciper-kernel 文件与 meta-imx 层中的相同。唯一的区别是,在我的层的食谱内核中,我有以下 `linux-imx_%.bbappend` 文件。
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://imx8mq-itx-p-c444.dts"
SRC_URI:append = " file://imx8mq-itx-p-c444.dtsi"
SRC_URI:append = " file://imx8mq-itx-p-c444-lvds-auo.dts"
do_configure:append(){
cp ${WORKDIR}/imx8mq-itx-p-c444.dts ${S}/arch/arm64/boot/dts/freescale/
cp ${WORKDIR}/imx8mq-itx-p-c444.dtsi ${S}/arch/arm64/boot/dts/freescale/
cp ${WORKDIR}/imx8mq-itx-p-c444-lvds-auo.dts ${S}/arch/arm64/boot/dts/freescale/
echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444.dtb" >> ${S}/arch/arm64/boot/dts/freescale/Makefile
echo "dtb-$(CONFIG_ARCH_MXC) += imx8mq-itx-p-c444-lvds-auo.dts" >> ${S}/arch/arm64/boot/dts/freescale/Makefile
}
我不知道可能是什么问题。该任务编译得很好,它只在 `do_package` 阶段失败。