通过 tar 将 Yocto 项目复制到其他电脑

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

由于客户端的互联网连接较差,我将 Yocto 项目的 tar 文件复制给客户。

但是,客户在解压 Yocto 项目并运行 bitbake 命令在其 PC 上构建项目时遇到了问题。

客户收到以下构建代码错误:

s32v@s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
  Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
  Following is the list of potential problems / advisories:

  Error, TMPDIR has changed location. You need to either move it back to /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp or rebuild

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

我编辑了 /build_s32v234evb_release/tmp/saved_tmpdir 文件来重新定位 tmp 目录,这个错误已经过去了。

但是,我在构建 Kernel 时又遇到了错误,看来目录参数仍然错误...(仅构建 U-Boot 时没有错误。)

s32v@s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
Loading cache: 100% |########################################################################################################################################################################| ETA:  00:00:00
Loaded 2462 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.26.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "aarch64-fsl-linux"
MACHINE           = "s32v234evb"
DISTRO            = "fsl-networking"
DISTRO_VERSION    = "1.8"
TUNE_FEATURES     = "aarch64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(nobranch):03b0fbcf6b3b5cd16ae16738fbaabd1c6bf98536"
meta-fsl-arm      = "(nobranch):c9f259a4bf8472dfa3ff75f1c3fcbe5e0ded7aaf"
meta-fsl-networking = "(nobranch):b8ff02a8d508464a16c84e1d13c155f45aa98cbe"
meta-fsl-toolchain = "(nobranch):0a235c4bcd4057608ee60b8c898eec9509632b95"
meta-virtualization = "(nobranch):0277cbcb47db4239d0a4aa3b37c5c6a705070951"
meta-fsl-s32v     = "<unknown>:<unknown>"
meta-oe           
meta-networking   
meta-python       
meta-webserver    
meta-filesystems  = "(nobranch):c841231b9f327d2d06d19d2ba1324dd86b83617c"
meta-linaro       
meta-aarch64      
meta-linaro-toolchain = "(nobranch):5075a82bd510d19617803fb16da2375605225cbb"

NOTE: Preparing RunQueue
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_deploy is tainted from a forced run
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 Image CC=aarch64-fsl-linux-gcc    --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb LD=aarch64-fsl-linux-ld.bfd    --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb
| make: *** /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work-shared/s32v234evb/kernel-source: No such file or directory.  Stop.
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Task 76 (/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile) failed with exit code '1'
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
|   LINK  tests/qemu-iotests/socket_scm_helper
|   GEN   qemu-doc.html
|   GEN   qemu.1
|   CC    qga/commands.o
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/pixman-1: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/glib-2.0: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/lib/glib-2.0/include: No such file or directory [enabled by default]
| /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/qemu-2.2.0/qga/commands.c:13:18: fatal error: glib.h: No such file or directory
|  #include <glib.h>
|                   ^
| compilation terminated.
| make: *** [qga/commands.o] Error 1
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Task 2849 (virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1504 tasks of which 1502 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:

Summary: 2 tasks failed:
  /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile
  virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile
Summary: There were 3 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

我的问题是:

  1. 是否可以通过 tar 文件将 Yocot 项目复制到另一台电脑?
  2. 除了保存的_tmpdir 文件之外,我还需要编辑哪些配置/初始文件?
  3. Yocto 项目定义了哪个文件“kernel-source”目录?

最诚挚的问候, 郭伟

linux tar yocto
4个回答
11
投票

当您将 tar 项目复制到另一台电脑时,两个文件将被修改:

  1. build/conf/bblayers.conf
  2. 构建/tmp/saved_tmpdir

0
投票

如果只是网络连接的问题,我建议您创建一个下载文件夹镜像。

在你这边,你添加

BB_GENERATE_MIRROR_TARBALLS
并构建。 然后在客户端复制整个
DL_DIR
文件夹,并在那里使用
BB_NO_NETWORK

您可以查看这里这里查看使用示例。

然后,您可以在客户端进行新的构建,而无需连接互联网。为了加快进程,您还可以将

sstate-cache
文件夹复制到客户端,并使用 SSTATE_MIRRORS 添加 sstate 镜像。

  1. 不,您将需要一个新的构建文件夹
  2. 您需要在客户端创建一个新的 Yocto 环境
  3. 它是 bitbake 变量
    STAGING_KERNEL_DIR

0
投票

错误,TMPDIR 已更改位置。您需要将其移回...

我和用户 jamie 一起构建了所有 yocto 的东西。由于磁盘空间不足,我将 jamie 的整个 $HOME 目录复制到另一个存储空间更大的磁盘 /dev/sdb1 上。 当我尝试运行 bitbake 命令进行测试时,我得到了同样的错误。这是一个对我有用的简单解决方案:

mount  /dev/sdb1  /mnt/sdb1/
mount  --bind  /mnt/sdb1/home_jamie/  /home/jamie/

我想要的是恢复bitbake命令曾经运行过的确切的原始文件系统布局。

要使上述更改永久生效,请将以上安装写入 /etc/fstab 的条目。


0
投票
您只需编辑文件 ./build/tmp/saved_tmpdir ,使其指向新位置

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