【问题标题】:Yocto build error: Building image with debian package managementYocto 构建错误:使用 debian 包管理构建映像
【发布时间】:2020-01-13 12:46:11
【问题描述】:

我已经使用默认的 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 没有错误。 删除tmpfolder 没有变化。

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

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 分支,对 meta-linaro 使用 master 分支,因为在撰写本文时还没有 zeus 分支。 meta-linaro 的 master 分支确实与 layer.conf 中的 yocto/poky zeus 分支兼容,到目前为止没有任何问题。

【问题讨论】:

  • 请添加图层的版本信息
  • 由于这篇文章显然得到了负分,我认为这是因为缺乏信息和清晰度。所以我试图解决这个问题。

标签: yocto


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2015-06-04
    • 2018-05-13
    • 2021-09-30
    • 1970-01-01
    • 2018-01-02
    • 1970-01-01
    • 2017-10-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多