在食谱 Yocto Raspberrypi 4 中添加 gnuradio

adding gnuradio in recipe Yocto Raspberrypi 4

我正在尝试创建一个 yocto 配方以在我的 raspberrypi 4 上添加 gnu radio,但是当我生成图像时出现以下错误:

| ERROR: ExecutionError('/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/temp/run.do_compile.503884', 1, None, None)
ERROR: Task (/home/norian/Yocto/poky/meta/recipes-support/boost/boost_1.75.0.bb:do_compile) failed with exit code '1'

这就是 bitbake-layers show-layers 命令对我 returns 的影响:

layer                 path                                      priority
==========================================================================
meta                  /home/norian/Yocto/poky/meta              5
meta-poky             /home/norian/Yocto/poky/meta-poky         5
meta-yocto-bsp        /home/norian/Yocto/poky/meta-yocto-bsp    5
meta-raspberrypi      /home/norian/Yocto/poky/meta-raspberrypi  9
meta-oe               /home/norian/Yocto/meta-openembedded/meta-oe  6
meta-python           /home/norian/Yocto/meta-openembedded/meta-python  7
meta-filesystems      /home/norian/Yocto/meta-openembedded/meta-filesystems  6
meta-networking       /home/norian/Yocto/meta-openembedded/meta-networking  5
meta-qt5              /home/norian/Yocto/meta-openembedded/meta-qt5  7
meta-sdr              /home/norian/Yocto/meta-openembedded/meta-sdr  5
meta-my-layer         /home/norian/Yocto/meta-my-layer          6

我的食谱在 meta-my-layer 中,名为 radio-image.bb

内容如下:

SUMMARY = "A small image just capable of allowing a device to boot."

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

CORE_IMAGE_EXTRA_INSTALL = "\
    packagegroup-sdr-base-extended \
    packagegroup-sdr-base-debug \
    packagegroup-sdr-base-devel \
    packagegroup-sdr-base-python \
    packagegroup-sdr-python-extended \
    packagegroup-sdr-gnuradio-base \
    packagegroup-core-eclipse-debug \
    "
IMAGE_INSTALL += "nano"
CONF_VERSION = "1"
ENABLE_UART="1"

我复制了来自 meta-sdr 的 gnuradio-image.bb 配方的内容。 我还将文件夹 packagegroups 复制到我的食谱中。

我正在使用 Ubuntu 20.04.

我的 poky 版本是:

DISTRO_VERSION = "3.3.4"
DISTRO_CODENAME = "hardknott"

你能向我解释一下 boost 的用途以及如何更正它的编译吗?

编辑:我在 boost 编译日志文件中发现以下错误:

{standard input}: Assembler messages:
{standard input}:4183: Warning: end of file not at end of a line; newline inserted
{standard input}:4801: Error: unknown pseudo-op: `.l'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
aarch64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.


{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
aarch64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.



gcc.compile.c++ /home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/build/boost/bin.v2/libs/log/build/f79941b6f0ebe85fc9fba0b2ec31feac/syslog_backend.o

    "aarch64-poky-linux-g++" "-mcpu=cortex-a72" "-march=armv8-a+crc+crypto" "-Wl,-O1" "-Wl,--hash-style=gnu" "-Wl,--as-needed" "-Wl,-z,relro,-z,now" "-fstack-protector-strong" "-O2" "-D_FORTIFY_SOURCE=2" "-Wformat" "-Wformat-security" "-Werror=format-security" "--sysroot=/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/recipe-sysroot"  -ftemplate-depth-1024 -fvisibility-inlines-hidden  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0=/usr/src/debug/boost/1.75.0-r0                      -fdebug-prefix-map=/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0=/usr/src/debug/boost/1.75.0-r0                      -fdebug-prefix-map=/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/recipe-sysroot-native=  -fvisibility-inlines-hidden -fPIC -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_HAS_PTHREAD_MUTEX_ROBUST -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DNDEBUG -D_XOPEN_SOURCE=600 -D__STDC_CONSTANT_MACROS  -I"." -I"libs/log/src"  -c -o "/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/build/boost/bin.v2/libs/log/build/f79941b6f0ebe85fc9fba0b2ec31feac/syslog_backend.o" "libs/log/src/syslog_backend.cpp"

...skipped <p/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/build/boost/bin.v2/libs/log/build/f79941b6f0ebe85fc9fba0b2ec31feac>libboost_log.so.1.75.0 for lack of <p/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/build/boost/bin.v2/libs/log/build/f79941b6f0ebe85fc9fba0b2ec31feac>text_file_backend.o...
...skipped <p/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/boost_1_75_0/stage/lib>libboost_log.so.1.75.0 for lack of <p/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/build/boost/bin.v2/libs/log/build/f79941b6f0ebe85fc9fba0b2ec31feac>libboost_log.so.1.75.0...
...failed updating 2 targets...
WARNING: exit code 1 from a shell command.
ERROR: ExecutionError('/home/norian/Yocto/build-rpi/tmp/work/cortexa72-poky-linux/boost/1.75.0-r0/temp/run.do_compile.503884', 1, None, None)

我认为是 RAM 问题,检查 here and here

建议你先单独编译boost:

bitbake boost -c compile

或减少构建线程和并行编译进程的数量:

  • local.conf
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 1"

您可以将数字更改为您喜欢的数字(对于线程,它的最大值是您 cpu 的内核)

尝试在 local.conf 中添加 PARALLEL_MAKE = "-j 1" 和 :

bitbake boost -c compile