Buildroot插件文件是为目标体系结构编译的,尽管稍后会在Makefile中使用

Buildroot插件文件是为目标体系结构编译的,尽管稍后会在Makefile中使用,makefile,cross-compiling,automake,buildroot,Makefile,Cross Compiling,Automake,Buildroot,我正在尝试为dietsplash for buildroot创建一个包,我已经添加了这些文件 Config.in config BR2_PACKAGE_DIETSPLASH bool "dietsplash" help dietsplash is an simple splash screen service for embedded devices. It has support for animations. dietsplash.mk ##

我正在尝试为dietsplash for buildroot创建一个包,我已经添加了这些文件

Config.in

config BR2_PACKAGE_DIETSPLASH
    bool "dietsplash"
    help
        dietsplash is an simple splash screen service for
        embedded devices. It has support for animations.
dietsplash.mk

################################################################################
#
# dietsplash
#
################################################################################

DIETSPLASH_VERSION = v0.3
DIETSPLASH_SOURCE = dietsplash-$(DIETSPLASH_VERSION).tar.gz
DIETSPLASH_SITE = git://github.com/lucasdemarchi/dietsplash.git
DIETSPLASH_AUTORECONF = YES

$(eval $(autotools-package))
github存储库是

make的输出是:

>>> dietsplash v0.3 Building
PATH="/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/host/bin:/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/host/sbin:/home/justus_fluegel/.pub-cache/bin/:/usr/share/flutter/flutter/bin/cache/dart-sdk/bin/:/usr/share/flutter/flutter/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/snap/bin:/usr/local/texlive/2019/bin/x86_64-linux"  /usr/bin/make -j5  -C /media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/
make[1]: Entering directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
/usr/bin/make  all-am
make[2]: Entering directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
  GEN      src/background.h
/bin/bash: src/genstaticlogo: cannot execute binary file: Exec format error
Makefile:1017: recipe for target 'src/background.h' failed
make[2]: *** [src/background.h] Error 126
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
Makefile:400: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3'
package/pkg-generic.mk:238: recipe for target '/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/.stamp_built' failed
make: *** [/media/justus_fluegel/PROJECTS/buildroot/buildroot-2019.11.1/output/build/dietsplash-v0.3/.stamp_built] Error 2
和src/genstaticlogo文件

src/genstaticlogo: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.19.0, not stripped
我认为问题在于src/genstaticlogo是为目标编译的,但在构建过程中由Makefile.am执行。我如何告诉make为构建机器而不是目标编译src/genstaticlogo?虽然存储库不是我的工作,但从理论上讲,下载后修改makefile是可能的


谢谢你的帮助

您需要修补Makefile.am以支持交叉编译。有关详细信息,请参阅。简言之,在Makefile.am中需要类似的内容:

$(genstaticlogo_OBJECTS): CC=$(CC_FOR_BUILD)
$(genstaticlogo_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD)
$(genstaticlogo_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
由于您将修补Makefile.am,因此还需要在Buildroot DIETSPLASH.mk文件中设置
DIETSPLASH\u autoeconf=YES