rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | inherit workonsrc
|
| 2 | inherit pkgconfig
|
| 3 | inherit systemd
|
| 4 |
|
| 5 | DESCRIPTION = "Encrypted RW Partition Init"
|
| 6 | LICENSE = "MediaTekProprietary"
|
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
| 8 | APPS_SRC = "${TOPDIR}/../meta/meta-mediatek/recipes-support/encrwpart-init"
|
| 9 | WORKONSRC = "${APPS_SRC}"
|
| 10 |
|
| 11 | #####Customization Start#####
|
| 12 | RWPART_DEVNAME = "/dev/mmcblk0p10"
|
| 13 | RWPART_MOUNT_DIR = "/data"
|
| 14 | RWPART_FILESYSTEM_SIZE = "100"
|
| 15 | RWPART_KEYSTR = "rwpart@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
| 16 | #####Customization End#####
|
| 17 |
|
| 18 | SYSTEMD_PACKAGES = "${PN}"
|
| 19 | SYSTEMD_SERVICE_${PN} = "encrwpart-init.service"
|
| 20 | FILES_${PN} += "${systemd_unitdir}/system/encrwpart-init.service"
|
| 21 | FILES_${PN} += "etc/encrwpart-init.sh"
|
| 22 |
|
| 23 | do_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 |
|