rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | inherit externalsrc |
| 2 | |
| 3 | DESCRIPTION = "mediatek update image demo" |
| 4 | LICENSE = "MediaTekProprietary" |
| 5 | DEPENDS += "libdrm curl android-tools-fsutils zlib" |
| 6 | MTK_SRC = "${TOPDIR}/../src/multimedia/mtk-demo-app/upgrade_app" |
| 7 | #LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 8 | PN='upgrade_app' |
| 9 | |
| 10 | INSANE_SKIP_${PN} +="installed-vs-shipped" |
| 11 | |
| 12 | S="${WORKDIR}" |
| 13 | |
| 14 | inherit workonsrc |
| 15 | WORKONSRC = "${TOPDIR}/../src/multimedia/mtk-demo-app/upgrade_app" |
| 16 | |
| 17 | inherit pkgconfig |
| 18 | inherit systemd |
| 19 | |
| 20 | SYSTEMD_PACKAGES = "${PN}" |
| 21 | SYSTEMD_SERVICE_${PN} = "upgrade_app.service" |
| 22 | FILES_${PN} += "${systemd_unitdir}/system/upgrade_app.service" |
| 23 | |
| 24 | do_compile() { |
| 25 | oe_runmake \ |
| 26 | CFLAGS=" -lpthread ${CFLAGS}" \ |
| 27 | LDFLAGS="-Wl,--whole-archive -lsparse -Wl,--no-whole-archive -lz -ldrm -lstdc++ -lpthread -lm -lcurl ${LDFLAGS}" \ |
| 28 | BOOTDEV_TYPE=${BOOTDEV_TYPE} |
| 29 | } |
| 30 | |
| 31 | do_install(){ |
| 32 | oe_runmake \ |
| 33 | PREFIX="${PREFIX}" DESTDIR="${D}" install |
| 34 | } |
| 35 | |
| 36 | do_install_append() { |
| 37 | install -d ${D}${systemd_unitdir}/system |
| 38 | install -m 0755 ${TOPDIR}/../meta/meta-mediatek/recipes-bsp/upgrade_app/upgrade_app.service ${D}${systemd_unitdir}/system |
| 39 | } |