blob: aee10f374b85f8c519ccfc1ab5423e54ec489b6a [file] [log] [blame]
inherit workonsrc
inherit pkgconfig
inherit systemd
DESCRIPTION = "Encrypted RW Partition Init"
LICENSE = "MediaTekProprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
APPS_SRC = "${TOPDIR}/../meta/meta-mediatek/recipes-support/encrwpart-init"
WORKONSRC = "${APPS_SRC}"
#####Customization Start#####
RWPART_DEVNAME = "/dev/mmcblk0p10"
RWPART_MOUNT_DIR = "/data"
RWPART_FILESYSTEM_SIZE = "100"
RWPART_KEYSTR = "rwpart@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
#####Customization End#####
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "encrwpart-init.service"
FILES_${PN} += "${systemd_unitdir}/system/encrwpart-init.service"
FILES_${PN} += "etc/encrwpart-init.sh"
do_install() {
install -d ${D}/etc
install -m 755 ${S}files/encrwpart-init.sh ${D}/etc/encrwpart-init.sh
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}files/encrwpart-init.service ${D}${systemd_system_unitdir}
sed -e 's%#RWPART_DEVNAME#%${RWPART_DEVNAME}%g' \
-e 's%#RWPART_MOUNT_DIR#%${RWPART_MOUNT_DIR}%g' \
-e 's%#RWPART_FILESYSTEM_SIZE#%${RWPART_FILESYSTEM_SIZE}%g' \
-e 's%#RWPART_KEYSTR#%${RWPART_KEYSTR}%g' \
-i ${D}/etc/encrwpart-init.sh
}