blob: aee10f374b85f8c519ccfc1ab5423e54ec489b6a [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001inherit workonsrc
2inherit pkgconfig
3inherit systemd
4
5DESCRIPTION = "Encrypted RW Partition Init"
6LICENSE = "MediaTekProprietary"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
8APPS_SRC = "${TOPDIR}/../meta/meta-mediatek/recipes-support/encrwpart-init"
9WORKONSRC = "${APPS_SRC}"
10
11#####Customization Start#####
12RWPART_DEVNAME = "/dev/mmcblk0p10"
13RWPART_MOUNT_DIR = "/data"
14RWPART_FILESYSTEM_SIZE = "100"
15RWPART_KEYSTR = "rwpart@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
16#####Customization End#####
17
18SYSTEMD_PACKAGES = "${PN}"
19SYSTEMD_SERVICE_${PN} = "encrwpart-init.service"
20FILES_${PN} += "${systemd_unitdir}/system/encrwpart-init.service"
21FILES_${PN} += "etc/encrwpart-init.sh"
22
23do_install() {
24 install -d ${D}/etc
25 install -m 755 ${S}files/encrwpart-init.sh ${D}/etc/encrwpart-init.sh
26
27 install -d ${D}${systemd_system_unitdir}
28 install -m 0644 ${S}files/encrwpart-init.service ${D}${systemd_system_unitdir}
29
30 sed -e 's%#RWPART_DEVNAME#%${RWPART_DEVNAME}%g' \
31 -e 's%#RWPART_MOUNT_DIR#%${RWPART_MOUNT_DIR}%g' \
32 -e 's%#RWPART_FILESYSTEM_SIZE#%${RWPART_FILESYSTEM_SIZE}%g' \
33 -e 's%#RWPART_KEYSTR#%${RWPART_KEYSTR}%g' \
34 -i ${D}/etc/encrwpart-init.sh
35}
36
37