Skip to content

Commit

Permalink
fix: do_install simple hello external app
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaRigoni committed Aug 21, 2020
1 parent 47e95fd commit d12acae
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion yocto/meta-anacleto-example/recipes-example/hello/hello_0.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,31 @@ INHERIT += "externalsrc"
EXTERNALSRC = "${abs_top_srcdir}/src/hello_cpp"
EXTERNALSRC_BUILD = "${abs_top_builddir}/src/hello_cpp"


## SOURCES ##
SRC_URI += "file://${EXTERNALSRC}/hello.cpp"

## PACKAGE ##
FILES_${PN} += "${libdir}/* /usr/bin/hello"
FILES_${PN}-dev = "${libdir}/* ${includedir} /tmp/*"


## not needed if we use Anacleto one
## LIC_FILES_CHKSUM = "file://${EXTERNALSRC}/hello.cpp;md5=d28a48395f80a24b0bd75519192addb9"

## Always keep the same project revision so bitbake checks for src changes
PR = "0"

# bitbake is trying to be helpful by stripping unneeded symbols from the binary, but runs into this problem because of it.
INHIBIT_PACKAGE_STRIP = "1"

# Skip error "No GNU_HASH in the elf binary"
INSANE_SKIP_${PN} = "ldflags"
INSANE_SKIP_${PN}-dev = "ldflags"




do_clean() {
make -C ${EXTERNALSRC_BUILD} clean
}
Expand All @@ -38,7 +55,9 @@ do_install() {
bbplain " INSTALL: hello ";
# make -C ${EXTERNALSRC_BUILD} install
mkdir -p ${D}/usr/bin
cp -av ${EXTERNALSRC_BUILD}/hello ${D}/usr/bin
cp -a ${EXTERNALSRC_BUILD}/hello ${D}/usr/bin
mkdir -p ${D}/tmp/
cp -a ${EXTERNALSRC_BUILD}/Makefile ${D}/tmp
}


Expand Down

0 comments on commit d12acae

Please sign in to comment.