linux - 在 poky 构建中运行自定义 bitbake 时出现 do_install 错误

标签 linux makefile texas-instruments bitbake

我正在使用最新的 poky-am335x 构建简单的 helloworld 应用程序。通过一些解决方法,我可以编译应用程序。我正在做很多安装二进制文件的试验,但构建会抛出错误。

错误日志:

DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
DEBUG: Executing shell function do_install
NOTE: make -j 4 DESTDIR=/home/pis1kor/workspace/poky-am335x/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-1.0-r0/image install
make: *** No rule to make target `install'.  Stop.
ERROR: oe_runmake failed
ERROR: Function failed: do_install (see /home/pis1kor/workspace/poky-am335x/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/helloworld-1.0-r0/temp/log.do_install.29583 for further information)

Bitbake 文件:

DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"
SRC_URI = "file://helloworld.tar"

do_compile () {
        make -C ${WORKDIR}/helloworld all
}


do_install() {
        oe_runmake install DESTDIR=${D}
}


#do_install() {
#       oe_runmake install DESTDIR=${D}
#       make -C ${WORKDIR}/helloworld/ install
#       oe_runmake 'DESTDIR=${D}' install
#       cp -f ${WORKDIR}/helloworld/helloworld ${WORKDIR}/image
#       oe_runmake install ${WORKDIR}/helloworld
#       make -C ${WORKDIR}/helloworld install
#       install -d ${D}${bindir}/ ZZ
#}

inherit autotools gettext

生成文件:

IDIR = ./include
CC = arm-arago-linux-gnueabi-gcc  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 --sysroot=/home/pis1kor/workspace/poky-am335x/build/tmp/sysroots/am335x-evm
CFLAGS = -I$(IDIR)
LIBS = -lm

FILES = ./src/helloworld.c
OUT_EXE = helloworld

INSTALL = /usr/bin/install -c

INSTALL_DATA = ${INSTALL} -m 644



all: $(FILES)
        $(CC) -o $(OUT_EXE) $(FILES) $(CFLAGS) $(LIBS)

install:
        $(INSTALL_DATA) -C  helloworld ../image
#       sudo cp ./helloworld ../image/

clean:
        rm -f *.o helloworld

保留注释行是为了保留我尝试过的所有路径。

最佳答案

基本区别如下。

S = "${WORKDIR}/helloworld/"
EXTRA_OEMAKE = 'all -C ${S}'

"EXTRA_OEMAKE" 是我之前没有用过的关键宏。

我已经像下面这样更改了 bitbake 文件 helloworld.bb 文件。

DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

S = "${WORKDIR}/helloworld/"
EXTRA_OEMAKE = 'all -C ${S}'

SRC_URI = "file://helloworld.tar"

inherit autotools gettext

关于linux - 在 poky 构建中运行自定义 bitbake 时出现 do_install 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18508048/

相关文章:

c++ - 在 Ubuntu 14.04 的 OSRM 上运行 make 时出现内存错误

linux - 如何创建配置脚本?

c - MSP430:__delay_cycles() 很慢/MCLK 可能很慢

c - CC253x 固件的非标准 ZCL 封装支持

android - 使用 'perf record' 设置样本分析的速率

c - 命令行参数会是 "passed twice"吗?

linux - 如果变量声明在 bash 中的 for 循环内,为什么不能更改输入数据

mysql - mysql_stmt_close 时出现段错误

c++ - make 查找 fortran 77 文件但不查找 fortran 90 文件

embedded-linux - AM335x 看门狗不工作