簡體   English   中英

Yocto poky 在 function do_rootfs 上構建失敗

[英]Yocto poky build fails on function do_rootfs

我一直在按照https://www.linux4sam.org/bin/view/Linux4SAM/PokyBuild上的步驟使用 Yocto 為 SAMA5D27 評估套件構建 core-image-minimal 和 microchip-headless-image。 我被困在 bitbake core-image-minimal 和 microchip-headless-image 的 do_rootfs 命令上。

我已按照上述指南中的所有步驟操作,並添加了更多步驟以使這些步驟有效:

我將 Docker 與以下 Dockerfile 一起使用:

FROM ubuntu:18.04

RUN apt-get update 

RUN apt-get install sudo 

RUN sudo apt-get install -y git  

RUN sudo apt-get install -y python

RUN sudo apt-get install -y python3 

RUN sudo apt-get install -y vim

RUN sudo apt-get install -y binutils chrpath cpio cpp diffstat g++ gawk gcc make texinfo elfutils libc6-dev  wget 


# adding a user     
RUN useradd -ms /bin/bash user1
RUN usermod -aG sudo user1

RUN echo user1:user1 | chpasswd
CMD /bin/bash

進入 Docker 容器后,我使用以下命令運行構建腳本來執行指南中的步驟:

mkdir my_dir && cd my_dir

git clone git://git.yoctoproject.org/poky -b warrior 

git clone git://git.openembedded.org/meta-openembedded -b warrior

git clone git://code.qt.io/yocto/meta-qt5.git

git clone git://github.com/linux4sam/meta-atmel.git -b warrior

cd poky

source oe-init-build-env build-microchip

# change the local.conf and bblayers.conf based on suggestions in the guide 
cp -f /local.conf /my_dir/poky/build-microchip/conf/local.conf

cp -f /bblayers.conf /my_dir/poky/build-microchip/conf/bblayers.conf

# switch to the new user 
su user1

export PATH=$PATH:/my_dir/poky/bitbake/bin
sudo apt-get install locales
sudo dpkg-reconfigure locales
sudo locale-gen en_US.UTF-8

sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

# give user1 permissions to modify all subdirectories within my_dir
sudo chmod -R a+rwx /my_dir

這是我收到的錯誤消息 - 沒有提到明確的錯誤,只是“退出代碼 1”:

WARNING: /my_dir/meta-atmel/recipes-bsp/at91bootstrap/at91bootstrap_3.8.12.bb: Unable to get checksum for at91bootstrap SRC_URI entry 0001-Add-an-option-to-enable-SAM-BA-download.patch: file could not be found
WARNING: /my_dir/meta-atmel/recipes-bsp/at91bootstrap/at91bootstrap-sam-ba_3.8.12.bb: Unable to get checksum for at91bootstrap-sam-ba SRC_URI entry 0001-Add-an-option-to-enable-SAM-BA-download.patch: file could not be found
WARNING: /my_dir/meta-atmel/recipes-bsp/at91bootstrap/at91bootstrap-sam-ba_3.8.12.bb: Unable to get checksum for at91bootstrap-sam-ba SRC_URI entry 0002-Enable-image-download-via-sam-ba.patch: file could not be found
Parsing recipes: 100% |######################################################################| Time: 0:00:36
Parsing of 2364 .bb files complete (0 cached, 2364 parsed). 3452 targets, 336 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task censored dependencies

Build Configuration:
BB_VERSION           = "1.42.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "sama5d27-som1-ek-sd"
DISTRO               = "poky-atmel"
DISTRO_VERSION       = "2.7.3"
TUNE_FEATURES        = "arm vfp cortexa5 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            
meta-yocto-bsp       = "warrior:274e8c50eee14c0bfc1fc3f51d5b33cbc44c3a31"
meta-atmel           = "warrior:102d92bfc7bd772387ea89c149d33cc5ebf9179c"
meta-oe              
meta-networking      
meta-python          
meta-multimedia      = "warrior:a24acf94d48d635eca668ea34598c6e5c857e3f8"
meta-qt5             = "upstream/warrior:7d0b17aa229edc9e138edfe0e8477fbbe9013ba6"

NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org/releases/uninative/2.8/x86_64-nativesdk-libc.tar.xz;sha256sum=a09922172c3a439105e0ae6b943daad2d83505b17da0aba97961ff433b8c21ab
Initialising tasks: 100% |###################################################################| Time: 0:00:01
Sstate summary: Wanted 793 Found 0 Missed 793 Current 0 (0% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: autoconf-archive-native-2018.03.13-r0 do_fetch: Failed to fetch URL https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2018.03.13.tar.xz, attempting MIRRORS if available
WARNING: bzip2-native-1.0.6-r5 do_fetch: Failed to fetch URL http://downloads.yoctoproject.org/mirror/sources/bzip2-1.0.6.tar.gz, attempting MIRRORS if available
WARNING: bash-4.4.18-r0 do_fetch: Failed to fetch URL https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-023;apply=yes;striplevel=0;name=patch023, attempting MIRRORS if available
WARNING: libcap-2.26-r0 do_fetch: Failed to fetch URL https://cdn.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.26.tar.xz, attempting MIRRORS if available
WARNING: tcp-wrappers-7.6-r10 do_fetch: Failed to fetch URL ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.tar.gz, attempting MIRRORS if available
ERROR: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed, details in /my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs
ERROR: core-image-minimal-1.0-r0 do_rootfs: 
ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.83357
ERROR: Task (/my_dir/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2561 tasks of which 5 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /my_dir/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs
Summary: There were 8 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
user1@92cf383a5212:/my_dir/poky/build-microchip$ vim /my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.83357

and I've attached the log file for the failure with this message:

https://filebin.net/e02r8w5m3bn607qd

Any ideas what could be going wrong?

Edit: on further investigation, I realized that in /my_dir/poky/scripts/postinst-intercepts/update_gio_module_cache , ${binprefix} was coming out as empty, so that ${binprefix}qemuwrapper was nothing, and when you run qemuwrapper, which is the command run in update_gio_module_cache, you get the error message 'qemu-arm not found'. So I installed qemu-arm for ubuntu.

Further, I realized that the script gio-querymodules for sama5d27-som-ek1 is found at /my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/libexec/gio-querymodules, not at $D${libexec}gio-querymodules, which expands in my system to, /my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/usr/libexec/gio-querymodules.

Once I fix these paths up and run bitbake -c rootfs core-image-minimal, I get the following error:

/my_dir/poky/build-microchip/tmp/work/sama5d27_som1_ek_sd-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/libexec/gio-querymodules: Invalid ELF image for this architecture

在我的情況下,這個問題的解決方案有兩個:

  1. 我更改了設置用戶權限的方式以及將用戶更改為:

    chmod -R g+rw /home/sama5d27

    chmod -R o+rw /home/sama5d27

    useradd -p user1 -s /bin/bash user1

  2. 然后我得到了一個“os塊大小錯誤”,使用以下方法解決: https://github.com/openembedded/openembedded-core/blob/master/scripts/lib/wic/filemap.py

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM