| SUMMARY = "Load eMMC image at runtime" |
| PR = "r1" |
| LICENSE = "Apache-2.0" |
| LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| |
| inherit systemd |
| |
| S = "${WORKDIR}" |
| |
| SRC_URI:append = " \ |
| file://emmc-image-setup.sh \ |
| file://emmc-image-setup.service \ |
| file://emmc-image.target \ |
| file://emmc-image-verify.sh \ |
| " |
| |
| SYSTEMD_SERVICE:${PN}:append = " \ |
| emmc-image-setup.service \ |
| emmc-image.target \ |
| " |
| |
| FILES:${PN}:append = " \ |
| ${libexecdir}/emmc-image-setup.sh \ |
| ${bindir}/emmc-image-verify.sh \ |
| " |
| |
| RDEPENDS:${PN}:append = " \ |
| bash \ |
| " |
| |
| GBMC_IMAGE ?= "false" |
| |
| do_install() { |
| install -d -m0755 ${D}${systemd_system_unitdir} |
| install -m0644 ${WORKDIR}/emmc-image-setup.service ${D}${systemd_system_unitdir}/ |
| install -m0644 ${WORKDIR}/emmc-image.target ${D}${systemd_system_unitdir}/ |
| |
| sed -i "s,@GBMC_IMAGE@,${GBMC_IMAGE},g" ${WORKDIR}/emmc-image-setup.sh |
| sed -i "s,@MACHINE@,${MACHINE},g" ${WORKDIR}/emmc-image-setup.sh |
| |
| install -d -m0755 ${D}${libexecdir} |
| install -m0755 ${WORKDIR}/emmc-image-setup.sh ${D}${libexecdir}/ |
| |
| sed -i "s,@MACHINE@,${MACHINE},g" ${WORKDIR}/emmc-image-verify.sh |
| install -d ${D}${bindir} |
| install -m 0755 ${S}/emmc-image-verify.sh ${D}${bindir}/ |
| } |