busybox 更改后无法成功构建(添加了 i2cdetect 和 i2ctransfer)

问题描述 投票:0回答:1

设置:

虚拟盒7.0 镜像 Ubuntu 22.04.1

目标:

在 busybox 中添加 i2cdetect 后,根据 Digi-Key 教程在 yocto 项目中重建 STM32MP157 的 Linux 映像

问题:

我猜主要原因是

Exception: FileExistsError: [Errno 17] File exists: '/bin/busybox.suid' -> '/home/vboxuser/Projects/yocto/build-mp1/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/busybox/1.36.1-r0/package/usr/lib/busybox/ptest/bin/i2cdetect'

整个日志:

vboxuser@Ubuntu:~/Projects/yocto/build-mp1$ bitbake custom-image

Loading cache: 100% |#######################################################| Time: 0:00:04

Loaded 4039 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies



Build Configuration:

BB_VERSION           = "2.4.0"

BUILD_SYS            = "x86_64-linux"

NATIVELSBSTRING      = "universal"

TARGET_SYS           = "arm-poky-linux-gnueabi"

MACHINE              = "stm32mp1"

DISTRO               = "poky"

DISTRO_VERSION       = "4.2.3"

TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"

TARGET_FPU           = "hard"

meta                 

meta-poky            

meta-yocto-bsp       = "mickledore:2f5d4fa3495bea5ed0a4232b14cdeba39f27b75e"

meta-oe              

meta-python          = "mickledore:b0ba472191c2b7709ef04ae9c5a23bea040518f9"

meta-st-stm32mp      = "mickledore:931b3f5be2c00f55d114c8f9122082a9d229b776"

meta-custom          = "<unknown>:<unknown>"



WARNING: /home/vboxuser/Projects/yocto/poky/meta/recipes-core/busybox/busybox_1.36.1.bb:do_compile is tainted from a forced run

Initialising tasks: 100% |##################################################| Time: 0:00:09

Sstate summary: Wanted 13 Local 0 Mirrors 0 Missed 13 Current 1449 (0% match, 99% complete)

NOTE: Executing Tasks

ERROR: busybox-1.36.1-r0 do_package: Error executing 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: <module>

     0001:

 *** 0002:ptest_update_alternatives(d)

     0003:

File: '/home/vboxuser/Projects/yocto/poky/meta/classes-recipe/ptest.bbclass', lineno: 110, function: ptest_update_alternatives

     0106:        for alt_name, alt_link, alt_target, _ in alternatives:

     0107:            # Some alternatives are for man pages,

     0108:            # check if the alternative is in PATH

     0109:            if os.path.dirname(alt_link) in bin_paths:

 *** 0110:                os.symlink(alt_target, os.path.join(ptest_bindir, alt_name))

     0111:}

     0112:

     0113:do_configure_ptest_base[dirs] = "${B}"

     0114:do_compile_ptest_base[dirs] = "${B}"

Exception: FileExistsError: [Errno 17] File exists: '/bin/busybox.suid' -> '/home/vboxuser/Projects/yocto/build-mp1/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/busybox/1.36.1-r0/package/usr/lib/busybox/ptest/bin/i2cdetect'



ERROR: Logfile of failure stored in: /home/vboxuser/Projects/yocto/build-mp1/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/busybox/1.36.1-r0/temp/log.do_package.54781

ERROR: Task (/home/vboxuser/Projects/yocto/poky/meta/recipes-core/busybox/busybox_1.36.1.bb:do_package) failed with exit code '1'

NOTE: Tasks Summary: Attempted 3782 tasks of which 3777 didn't need to be rerun and 1 failed.



Summary: 1 task failed:

  /home/vboxuser/Projects/yocto/poky/meta/recipes-core/busybox/busybox_1.36.1.bb:do_package


bitbake -c do_cleanall busybox
bitbake -c do_cleanall custom_image
之后,我能够成功构建图像,但没有i2cDetect 模块

似乎添加 i2ctransfer 代替 i2cdetect 会导致同样的问题

我注意到有人已经在 dunfell 分支中用

busybox-1.35.0-r0
遇到了这个 问题,但我的
meta/recipes-core/busybox/busybox.inc
文件已经有这个补丁。

stm32 embedded-linux yocto bitbake
1个回答
-1
投票

我已经在

this
答案中提供了有关如何准备 Busybox 配置片段的答案。

除此之外,请确保不要同时包含

busybox
解决方案和
i2c-tools
配方,因为这会因文件冲突而失败。

© www.soinside.com 2019 - 2024. All rights reserved.