i've been trying to put together a really basic example of a recipe using "externalsrc" that refers to some local source, and cannot get it to work. so here's what i'm trying.
as a demo, i selected a random simple OE recipe -- in this case, "dmidecode", whose recipe you can see here (and which seems conveniently simple for demonstration purposes): https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/dmidecode/dmidecode_3.5.bb?h=master so to start, since the SRC_URI is a tarball, i downloaded the tarball so that i have the equivalent local source here: $ ls /home/rpjday/oe/srcs/dmidecode-3.5 AUTHORS dmioem.h Makefile util.c biosdecode.c dmiopt.c man util.h config.h dmiopt.h NEWS version.h dmidecode.c dmioutput.c ownership.c vpddecode.c dmidecode.h dmioutput.h README vpdopt.c dmioem.c LICENSE types.h vpdopt.h $ as my first test, i set the build to the source directory in my dmid_1.0.bb recipe file: inherit externalsrc EXTERNALSRC = "/home/rpjday/oe/srcs/dmidecode-3.5" EXTERNALSRC_BUILD = "${EXTERNALSRC}" do_install() { oe_runmake \ DESTDIR="${D}" \ prefix="${prefix}" \ sbindir="${sbindir}" \ docdir="${docdir}/${BPN}" \ mandir="${mandir}" \ install then ran: $ bitbake dmid sure enough, that build in the source directory, generating: AUTHORS dmidecode.o dmioutput.h ownership* version.h biosdecode* dmioem.c dmioutput.o ownership.c vpddecode* biosdecode.c dmioem.h LICENSE ownership.o vpddecode.c biosdecode.o dmioem.o Makefile README vpddecode.o config.h dmiopt.c man/ types.h vpdopt.c dmidecode* dmiopt.h NEWS util.c vpdopt.h dmidecode.c dmiopt.o oe-logs@ util.h vpdopt.o dmidecode.h dmioutput.c oe-workdir@ util.o great, but i really want to build out-of-tree to preserve the pristine state of the source, so i followed the instructions and allowed EXTERNALSRC_BUILD to default to ${WORKDIR}/${BPN}-${PV}: inherit externalsrc EXTERNALSRC = "/home/rpjday/oe/srcs/dmidecode-3.5" # EXTERNALSRC_BUILD = "${EXTERNALSRC}" so I did a "make clean" in the source directory to start with the pristine source (also deleted the "oe-" symlinks), then: $ bitbake dmid ... snip ... | NOTE: make -j 8 DESTDIR=/home/rpjday/oe/builds/qemux86/tmp/work/core2-64-poky-linux/dmid/1.0/image prefix=/usr sbindir=/usr/sbin docdir=/usr/share/doc/dmid mandir=/usr/share/man install | make: *** No rule to make target 'install'. Stop. | ERROR: oe_runmake failed from "bitbake -e dmid", i can see: S="/home/rpjday/oe/srcs/dmidecode-3.5" WORKDIR="/home/rpjday/oe/builds/qemux86/tmp/work/core2-64-poky-linux/dmid/1.0" B="/home/rpjday/oe/builds/qemux86/tmp/work/core2-64-poky-linux/dmid/1.0/dmid-1.0" but there is nothing unloaded into the B directory; hence, the failure. in fact, the log file for the compile step is: DEBUG: Executing python function externalsrc_compile_prefunc NOTE: dmid: compiling from external source tree /home/rpjday/oe/srcs/dmidecode-3.5 DEBUG: Python function externalsrc_compile_prefunc finished DEBUG: Executing python function fetcher_hashes_dummyfunc DEBUG: Python function fetcher_hashes_dummyfunc finished DEBUG: Executing shell function do_compile NOTE: nothing to compile DEBUG: Shell function do_compile finished so ... what have i overlooked? did i grab an inappropriate sample recipe that does not support building out-of-tree? the build directory is empty, so i'm perusing the externalsrc.bbclass to see what i have misunderstood. rday
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#194356): https://lists.openembedded.org/g/openembedded-core/message/194356 Mute This Topic: https://lists.openembedded.org/mt/103974993/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-