This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Build the SDK with Yocto fail

Part Number: TDA4VM


您好,我正在移植meta-ros到yocto pro中,使用TDA4工程

我增加了源码如下。

cd source

git clone -b dunfell https://github.com/ros/meta-ros.git

在conf/bblayer.conf添加了meta-ros相关包

在conf/setenv中添加了 

export ROS_OE_RELEASE_SERIES="dunfell"
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE ROS_OE_RELEASE_SERIES"

添加了文件

SUMMARY = "A image including a bare-minimum installation of ROS 2 and including some basic pub/sub examples. It includes two DDS middleware implementations, FastDDS and Cyclone DDS"
DESCRIPTION = "${SUMMARY}"

inherit ros_distro_${ROS_DISTRO}
inherit ${ROS_DISTRO_TYPE}_image

ROS_SYSROOT_BUILD_DEPENDENCIES = " \
    ament-lint-auto \
    ament-cmake-auto \
    ament-cmake-core \
    ament-cmake-cppcheck \
    ament-cmake-cpplint \
    ament-cmake-export-definitions \
    ament-cmake-export-dependencies \
    ament-cmake-export-include-directories \
    ament-cmake-export-interfaces \
    ament-cmake-export-libraries \
    ament-cmake-export-link-flags \
    ament-cmake-export-targets \
    ament-cmake-gmock \
    ament-cmake-gtest \
    ament-cmake-include-directories \
    ament-cmake-libraries \
    ament-cmake \
    ament-cmake-pytest \
    ament-cmake-python \
    ament-cmake-ros \
    ament-cmake-target-dependencies \
    ament-cmake-test \
    ament-cmake-version \
    ament-cmake-uncrustify \
    ament-cmake-flake8 \
    ament-cmake-pep257 \
    ament-copyright \
    ament-cpplint \
    ament-flake8 \
    ament-index-python \
    ament-lint-cmake \
    ament-mypy \
    ament-package \
    ament-pclint \
    ament-pep257 \
    ament-pycodestyle \
    ament-pyflakes \
    ament-uncrustify \
    ament-xmllint \
    cmake \
    eigen3-cmake-module \
    fastcdr \
    fastrtps-cmake-module \
    fastrtps \
    git \
    gmock-vendor \
    gtest-vendor \
    pkgconfig \
    python-cmake-module \
    python3-catkin-pkg \
    python3-empy \
    python3 \
    python3-nose \
    python3-pytest \
    rcutils \
    rmw-implementation-cmake \
    rosidl-cmake \
    rosidl-default-generators \
    rosidl-generator-c \
    rosidl-generator-cpp \
    rosidl-generator-dds-idl \
    rosidl-generator-py \
    rosidl-parser \
    rosidl-runtime-c \
    rosidl-runtime-cpp \
    rosidl-typesupport-c \
    rosidl-typesupport-cpp \
    rosidl-typesupport-fastrtps-cpp \
    rosidl-typesupport-interface \
    rosidl-typesupport-introspection-c \
    rosidl-typesupport-introspection-cpp \
    foonathan-memory-vendor \
    libyaml-vendor \
"

IMAGE_INSTALL:append = " \
    ros-base \
    examples-rclcpp-minimal-action-client \
    examples-rclcpp-minimal-action-server \
    examples-rclcpp-minimal-client \
    examples-rclcpp-minimal-composition \
    examples-rclcpp-minimal-publisher \
    examples-rclcpp-minimal-service \
    examples-rclcpp-minimal-subscriber \
    examples-rclcpp-minimal-timer \
    examples-rclcpp-multithreaded-executor \
    examples-rclpy-executors \
    examples-rclpy-minimal-action-client \
    examples-rclpy-minimal-action-server \
    examples-rclpy-minimal-client \
    examples-rclpy-minimal-publisher \
    examples-rclpy-minimal-service \
    examples-rclpy-minimal-subscriber \
    demo-nodes-cpp \
    demo-nodes-cpp-rosnative \
    demo-nodes-py \
    cyclonedds \
    rmw-cyclonedds-cpp \
    tmux \
    python3-argcomplete \
    glibc-utils \
    rt-tests \
    stress \
    ${ROS_SYSROOT_BUILD_DEPENDENCIES} \
"
#       opencl-headers-dev \
#    byobu \
#    localedef \
#    xrt-dev \
#    xrt \
#    zocl \
#    opencl-clhpp-dev \
# IMAGE_LINGUAS = "en-us"
# GLIBC_GENERATE_LOCALES = "en_US.UTF-8"

执行 TOOLCHAIN_BASE=/home/yk/tda4/toolchain MACHINE=j7-evm bitbake -k arago-core-psdkla-bundle 报错如下

yk@EcoLinux:~/tda4/sdk/yocto-build/build$ TOOLCHAIN_BASE=/home/yk/tda4/toolchain MACHINE=j7-evm bitbake -k arago-core-psdkla-bundle
WARNING: Layer meta-psdkla should set LAYERSERIES_COMPAT_meta-psdkla in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer meta-psdkla should set LAYERSERIES_COMPAT_meta-psdkla in its conf/layer.conf file to list the core layer names it is compatible with.
NOTE: Started PRServer with DBfile: /home/yk/tda4/sdk/yocto-build/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 41697, PID: 21056
WARNING: Layer meta-psdkla should set LAYERSERIES_COMPAT_meta-psdkla in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer meta-psdkla should set LAYERSERIES_COMPAT_meta-psdkla in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |###############################################################################################################| Time: 0:00:01
Loaded 11128 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "aarch64-linux"
MACHINE              = "j7-evm"
DISTRO               = "arago"
DISTRO_VERSION       = "2021.09"
TUNE_FEATURES        = "aarch64"
TARGET_FPU           = ""
DISTRO_NAME          = "Arago"
ROS_DISTRO           = "foxy"
ROS_VERSION          = "2"
ROS_PYTHON_VERSION   = "3"
meta-arago-distro
meta-arago-extras    = "HEAD:f798b7a60966528c8eec33b43546a744f545fc4e"
meta-psdkla          = "HEAD:06a6260f965ad7765581878c52b0bed894103847"
meta-qt5             = "HEAD:5ef3a0ffd3324937252790266e2b2e64d33ef34f"
meta-virtualization  = "HEAD:beea119eb529b4a11f266004aee8b548427aea39"
meta-networking
meta-python
meta-oe
meta-gnome
meta-filesystems     = "HEAD:7203130ed8b58c0df75cb72222ac2bcf546bce44"
meta-ti              = "HEAD:f8ddf45aca3fe5dd8b39bca8610b1e54a035eb5d"
meta-arm
meta-arm-toolchain   = "HEAD:c4f04f3fb66f8f4365b08b553af8206372e90a63"
meta                 = "HEAD:1ee082e979baaba871bbe1d91181bb04951faf3b"
meta-aws             = "HEAD:49e7a5ffb8799b9eee638a6a5425a13b00c33215"
meta-jupyter         = "HEAD:82db248e2eca36e52cbeafe599b755dc87720383"
meta-ros2-foxy
meta-ros2
meta-ros-common
meta-ros-backports-gatesgarth
meta-ros-backports-hardknott = "dunfell:cd2e0d0625385ca821aa5129d20805640ac80734"


Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "arm-linux-gnueabi"
MACHINE              = "j7-evm-k3r5"
DISTRO               = "arago"
DISTRO_VERSION       = "2021.09"
TUNE_FEATURES        = "arm armv7a vfp thumb callconvention-hard"
TARGET_FPU           = "hard"
DISTRO_NAME          = "Arago"
ROS_DISTRO           = "foxy"
ROS_VERSION          = "2"
ROS_PYTHON_VERSION   = "3"
meta-arago-distro
meta-arago-extras    = "HEAD:f798b7a60966528c8eec33b43546a744f545fc4e"
meta-psdkla          = "HEAD:06a6260f965ad7765581878c52b0bed894103847"
meta-qt5             = "HEAD:5ef3a0ffd3324937252790266e2b2e64d33ef34f"
meta-virtualization  = "HEAD:beea119eb529b4a11f266004aee8b548427aea39"
meta-networking
meta-python
meta-oe
meta-gnome
meta-filesystems     = "HEAD:7203130ed8b58c0df75cb72222ac2bcf546bce44"
meta-ti              = "HEAD:f8ddf45aca3fe5dd8b39bca8610b1e54a035eb5d"
meta-arm
meta-arm-toolchain   = "HEAD:c4f04f3fb66f8f4365b08b553af8206372e90a63"
meta                 = "HEAD:1ee082e979baaba871bbe1d91181bb04951faf3b"
meta-aws             = "HEAD:49e7a5ffb8799b9eee638a6a5425a13b00c33215"
meta-jupyter         = "HEAD:82db248e2eca36e52cbeafe599b755dc87720383"
meta-ros2-foxy
meta-ros2
meta-ros-common
meta-ros-backports-gatesgarth
meta-ros-backports-hardknott = "dunfell:cd2e0d0625385ca821aa5129d20805640ac80734"

Initialising tasks: 100% |##########################################################################################################| Time: 0:00:11
Sstate summary: Wanted 2 Found 0 Missed 2 Current 5808 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: arago-core-psdkla-bundle-1.0-r0_psdkla_5 do_rootfs: 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:do_rootfs(d)
     0003:
File: '/home/yk/tda4/sdk/yocto-build/sources/meta-arago/meta-arago-distro/classes/tisdk-bundle.bbclass', lineno: 713, function: do_rootfs
     0709:    # generate the initial manifest
     0710:    create_manifest(d)
     0711:
     0712:    # generate rootfs
 *** 0713:    create_rootfs(d)
     0714:}
     0715:
     0716:fakeroot python do_image () {
     0717:    from oe.utils import execute_pre_post_process
File: '/home/yk/tda4/sdk/yocto-build/sources/oe-core/meta/lib/oe/rootfs.py', lineno: 979, function: create_rootfs
     0975:    img_type = d.getVar('IMAGE_PKGTYPE')
     0976:    if img_type == "rpm":
     0977:        RpmRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
     0978:    elif img_type == "ipk":
 *** 0979:        OpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
     0980:    elif img_type == "deb":
     0981:        DpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
     0982:
     0983:    os.environ.clear()
File: '/home/yk/tda4/sdk/yocto-build/sources/oe-core/meta/lib/oe/rootfs.py', lineno: 214, function: create
     0210:        execute_pre_post_process(self.d, rootfs_post_install_cmds)
     0211:
     0212:        self.pm.run_intercepts()
     0213:
 *** 0214:        execute_pre_post_process(self.d, post_process_cmds)
     0215:
     0216:        if self.progress_reporter:
     0217:            self.progress_reporter.next_stage()
     0218:
File: '/home/yk/tda4/sdk/yocto-build/sources/oe-core/meta/lib/oe/utils.py', lineno: 264, function: execute_pre_post_process
     0260:    for cmd in cmds.strip().split(';'):
     0261:        cmd = cmd.strip()
     0262:        if cmd != '':
     0263:            bb.note("Executing %s ..." % cmd)
 *** 0264:            bb.build.exec_func(cmd, d)
     0265:
     0266:# For each item in items, call the function 'target' with item as the first
     0267:# argument, extraargs as the other arguments and handle any exceptions in the
     0268:# parent thread
File: '/home/yk/tda4/sdk/yocto-build/sources/bitbake/lib/bb/build.py', lineno: 254, function: exec_func
     0250:    with bb.utils.fileslocked(lockfiles):
     0251:        if ispython:
     0252:            exec_func_python(func, d, runfile, cwd=adir)
     0253:        else:
 *** 0254:            exec_func_shell(func, d, runfile, cwd=adir)
     0255:
     0256:    try:
     0257:        curcwd = os.getcwd()
     0258:    except:
File: '/home/yk/tda4/sdk/yocto-build/sources/bitbake/lib/bb/build.py', lineno: 455, function: exec_func_shell
     0451:    with open(fifopath, 'r+b', buffering=0) as fifo:
     0452:        try:
     0453:            bb.debug(2, "Executing shell function %s" % func)
     0454:            with open(os.devnull, 'r+') as stdin, logfile:
 *** 0455:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
     0456:        finally:
     0457:            os.unlink(fifopath)
     0458:
     0459:    bb.debug(2, "Shell function %s finished" % func)
File: '/home/yk/tda4/sdk/yocto-build/sources/bitbake/lib/bb/process.py', lineno: 184, function: run
     0180:
     0181:    if pipe.returncode != 0:
     0182:        if log:
     0183:            # Don't duplicate the output in the exception if logging it
 *** 0184:            raise ExecutionError(cmd, pipe.returncode, None, None)
     0185:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
     0186:    return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/home/yk/tda4/sdk/yocto-build/build/arago-tmp-external-arm-glibc/work/j7_evm-linux/arago-core-psdkla-bundle/1.0-r0_psdkla_5/temp/run.tisdk_image_build.24486' failed with exit code 1

ERROR: Logfile of failure stored in: /home/yk/tda4/sdk/yocto-build/build/arago-tmp-external-arm-glibc/work/j7_evm-linux/arago-core-psdkla-bundle/1.0-r0_psdkla_5/temp/log.do_rootfs.24486
ERROR: Task (/home/yk/tda4/sdk/yocto-build/sources/meta-psdkla/recipes-core/images/arago-core-psdkla-bundle.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 17918 tasks of which 16711 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 4 seconds
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 1 task failed:
  /home/yk/tda4/sdk/yocto-build/sources/meta-psdkla/recipes-core/images/arago-core-psdkla-bundle.bb:do_rootfs
Summary: There were 4 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

请问我 如何解决?