summaryrefslogtreecommitdiff
path: root/recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2020-06-15 12:01:01 -0500
committerJeff Hatch <jhatch@multitech.com>2020-06-15 12:01:01 -0500
commit612ffa7c85d856c9706064e62448a3debe5c3379 (patch)
tree7ce893519ee65180783ef3c248bd04c6f3f817c5 /recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc
parent0a3f99fc26efa34e65d0105ae18888bd750e5ab6 (diff)
parenta117c7a2ccc99c9903764658fc3640e06ffe4661 (diff)
downloadmeta-mlinux-612ffa7c85d856c9706064e62448a3debe5c3379.tar.gz
meta-mlinux-612ffa7c85d856c9706064e62448a3debe5c3379.tar.bz2
meta-mlinux-612ffa7c85d856c9706064e62448a3debe5c3379.zip
Merge branch 'udev-rules-refactoring' to better reflect architecture dependencies in architecture specific layers.
Diffstat (limited to 'recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc')
-rw-r--r--recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc b/recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc
new file mode 100644
index 0000000..d1b8104
--- /dev/null
+++ b/recipes-core/initrdscripts/readonly-rootfs-overlay-init-script.inc
@@ -0,0 +1,36 @@
+SUMMARY = "Read only rootfs with overlay init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+
+# This was derived from https://github.com/cmhe/meta-readonly-rootfs-overlay
+
+# script uses bash, findfs, busybox is problematic, so use real fsck,
+# and add ext4 utilities in case some one needs to try to recover the
+# user_data file system
+RDEPENDS_${PN} = " \
+ bash \
+ util-linux-findfs \
+ util-linux-fsck \
+ e2fsprogs \
+ e2fsprogs-mke2fs \
+ e2fsprogs-badblocks \
+ e2fsprogs-e2fsck \
+ e2fsprogs-tune2fs \
+ e2fsprogs-resize2fs \
+ "
+
+SRC_URI = "file://init-readonly-rootfs-overlay-boot.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/init-readonly-rootfs-overlay-boot.sh ${D}/init
+ install -d "${D}/run/media/rfs/ro"
+ install -d "${D}/run/media/rfs/rw"
+}
+
+FILES_${PN} += " /init /run"
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"