Yoto构建错误:使用debian软件包管理构建映像

问题描述 投票:-2回答:2

我已经使用默认的RPM软件包管理来构建映像,但是现在我想使用debian软件包管理而不是RPM来构建映像,Yocto在image do_rootfs步骤的最后一步中返回错误。

错误;

update-alternatives: Error: not linking /home/yoctouser/build/tmp/work/myimage/1.0-r0/rootfs/usr/bin/dpkg-deb to /bin/busybox.nosuid since /home/yoctouser/build/tmp/work/jetson_nano-poky-linux/myimage/1.0-r0/rootfs/usr/bin/dpkg-deb exists and is not a link

ERROR: myimage-1.0-r0 do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.
Details of the failure are in /home/yoctouser/build/tmp/work/jetson_nano-poky-linux/myimage/1.0-r0/temp/log.do_rootfs.
ERROR: myimage-1.0-r0 do_rootfs: 
ERROR: myimage-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/yoctouser/build/tmp/work/jetson_nano-poky-linux/myimage/1.0-r0/temp/log.do_rootfs.9391
ERROR: Task (/home/yoctouser/layers/meta-mylayer/images/myimage.bb:do_rootfs) failed with exit code '1'

[一起构建debian软件包管理和busybox似乎有问题。

image.bb:

DESCRIPTION = "Test image."

inherit core-image

inherit distro_features_check

IMAGE_FEATURES += "package-management"

IMAGE_LINGUAS ?= " "

IMAGE_INSTALL += " \
    ifupdown \
    dropbear \
"

export IMAGE_BASENAME = "myimage"

构建image-core-minimal没有错误。删除tmp文件夹没有变化。

----------编辑:-----------有关所用图层的更多信息:

bblayers.bb:

  /home/yoctouser/layers/poky-zeus/meta \
  /home/yoctouser/layers/poky-zeus/meta-poky \
  /home/yoctouser/layers/poky-zeus/meta-yocto-bsp \
  /home/yoctouser/layers/meta-tegra \
  /home/yoctouser/layers/meta-linaro/meta-linaro-toolchain \
  /home/yoctouser/layers/meta-openembedded/meta-virtualization \
  /home/yoctouser/layers/meta-openembedded/meta-oe \
  /home/yoctouser/layers/meta-openembedded/meta-filesystems \
  /home/yoctouser/layers/meta-openembedded/meta-selinux \
  /home/yoctouser/layers/meta-openembedded/meta-security \
  /home/yoctouser/layers/meta-openembedded/meta-python \
  /home/yoctouser/layers/meta-openembedded/meta-iot-cloud \
  /home/yoctouser/layers/meta-openembedded/meta-perl \
  /home/yoctouser/layers/meta-openembedded/meta-multimedia \
  /home/yoctouser/layers/meta-openembedded/meta-networking \

将Zeus分支用于所有层,将master分支用于meta-linaro,因为在撰写本文时尚无zeus分支。 meta-linaro的master分支确实与layer.conf中的yocto / poky zeus分支声明了兼容性,并且到目前为止还没有问题。

yocto
2个回答
0
投票

我发现我正在使用的层之一meta-linaro具有.bbappendbusybox,将dpkg-deb配置为链接到busybox。我为meta-linaro层创建了一个补丁,删除了该配置和样式,构建成功完成。


0
投票
Hi Varyag,

I am facing this same issue with meta-swupdate layer and docker-ce.

$ bitbake swupdate-image
WARNING: You have included the meta-gnome layer, but 'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-gnome README for details on enabling meta-gnome support.
Loading cache: 100% |###################################################################################################################################################| Time: 0:00:00
Loaded 4047 entries from dependency cache.
Parsing recipes: 100% |#################################################################################################################################################| Time: 0:00:01
Parsing of 2906 .bb files complete (2905 cached, 1 parsed). 4047 targets, 470 skipped, 4 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Multiple providers are available for u-boot-fw-utils (u-boot-fw-utils, libubootenv, libubootenv-cross, u-boot-fslc-fw-utils, u-boot-fslc-fw-utils-cross, u-boot-qoriq-fw-utils, u-boot-qoriq-fw-utils-cross)
Consider defining a PREFERRED_PROVIDER entry to match u-boot-fw-utils

Build Configuration:
BB_VERSION           = "1.42.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "imx8mqevk"
DISTRO               = "fsl-imx-wayland"
DISTRO_VERSION       = "4.19-warrior"
TUNE_FEATURES        = "aarch64"
TARGET_FPU           = ""
meta                 
meta-poky            = "warrior:c9a1a608f5146e5dcfebc8e566cb7f6388a3986f"
meta-oe              
meta-multimedia      = "warrior:a24acf94d48d635eca668ea34598c6e5c857e3f8"
meta-freescale       = "warrior:0bde01370b18adf36fb59b87b661c9272fecbce2"
meta-freescale-3rdparty = "warrior:da422478d38e744283bcf61123c4a526396c7030"
meta-freescale-distro = "warrior:d4e77ea682fa10d0d54a723b3d3099c44fc5e95c"
meta-bsp             
meta-sdk             
meta-ml              = "HEAD:bb05c60e6398b374ac49554c642a3bef36452f73"
meta-browser         = "HEAD:5f365ef0f842ba4651efe88787cf9c63bc8b6cb3"
meta-rust            = "HEAD:11aed43748d7dd194dc6c06a35a16104400d1090"
meta-gnome           
meta-networking      
meta-python          
meta-filesystems     = "warrior:a24acf94d48d635eca668ea34598c6e5c857e3f8"
meta-qt5             = "warrior:171871280307126c94faeeb90fb635a26495459d"
meta-virtualization  = "warrior:bda5b6ab326a4926aedd32f137de5f3837c8cdb8"
meta-vxxxxn        = "<unknown>:<unknown>"
meta-swupdate        = "warrior:8ad6a75e1778cdda671b3d6aea2a9692613020ec"

Initialising tasks: 100% |##############################################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 3 Found 1 Missed 2 Current 1048 (33% match, 99% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
**ERROR: swupdate-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['docker-ce'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.**
Details of the failure are in /home/avinash/Projects/CodeAurora-fsl/imx-yocto-bsp/build-swupdate-wayland/tmp/work/imx8mqevk-poky-linux/swupdate-image/1.0-r0/temp/log.do_rootfs.
ERROR: swupdate-image-1.0-r0 do_rootfs: 
ERROR: swupdate-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/avinash/Projects/CodeAurora-fsl/imx-yocto-bsp/build-swupdate-wayland/tmp/work/imx8mqevk-poky-linux/swupdate-image/1.0-r0/temp/log.do_rootfs.30542
ERROR: Task (/home/avinash/Projects/CodeAurora-fsl/Vxxxxn/meta-swupdate/recipes-extended/images/swupdate-image.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3155 tasks of which 3154 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/avinash/Projects/CodeAurora-fsl/Vxxxxn/meta-swupdate/recipes-extended/images/swupdate-image.bb:do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
$

Any ideas how I could solve this? Thanks.

Regards,
Avinash.
© www.soinside.com 2019 - 2024. All rights reserved.