summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@gmail.com>2020-11-29 21:44:33 +0200
committerIgor Opaniuk <igor.opaniuk@gmail.com>2020-11-30 15:36:08 +0200
commit2554f4eec62d2cd68dec3d043654874f3b221e63 (patch)
tree432ee5815eb307952f7b9dcb869f905c2de71548
parentf3b662ae73d5decabd1cfbe4e247f027d97c40de (diff)
systemd: add boot.mount
Mount Separate FAT Boot Partition to /boot. Testing: Mounting Boot partition... [ OK ] Mounted Boot partition. .... root@colibri-imx6:/boot# ls -lah drwxrwx--- 3 root disk 1.0K Jan 1 1970 . drwxr-xr-x 18 root root 4.0K Mar 9 2018 .. -rwxrwx--- 1 root disk 4.7K Nov 29 19:21 boot.scr -rwxrwx--- 1 root disk 69.0K Nov 29 19:21 imx6dl-colibri-aster.dtb -rwxrwx--- 1 root disk 71.2K Nov 29 19:21 imx6dl-colibri-cam-eval-v3.dtb -rwxrwx--- 1 root disk 69.6K Nov 29 19:21 imx6dl-colibri-eval-v3.dtb -rwxrwx--- 1 root disk 70.2K Nov 29 19:21 imx6dl-colibri-iris-v2.dtb -rwxrwx--- 1 root disk 69.0K Nov 29 19:21 imx6dl-colibri-iris.dtb drwxrwx--- 2 root disk 1.5K Nov 29 19:21 overlays -rwxrwx--- 1 root disk 14 Nov 29 19:21 overlays.txt -rwxrwx--- 1 root disk 6.2M Nov 29 19:21 zImage Related-to: ELB-3250 Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
-rw-r--r--recipes-core/systemd/systemd/boot.mount11
-rw-r--r--recipes-core/systemd/systemd_%.bbappend15
2 files changed, 25 insertions, 1 deletions
diff --git a/recipes-core/systemd/systemd/boot.mount b/recipes-core/systemd/systemd/boot.mount
new file mode 100644
index 0000000..25dedd5
--- /dev/null
+++ b/recipes-core/systemd/systemd/boot.mount
@@ -0,0 +1,11 @@
+[Unit]
+Description=Boot partition
+
+[Install]
+WantedBy=default.target
+
+[Mount]
+What=/dev/disk/by-label/BOOT
+Where=/boot
+Options=rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
+TimeoutSec=3
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index ea40849..00e69cd 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1,4 +1,17 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://boot.mount"
+
+do_install_append() {
+ install -m 0644 ${WORKDIR}/boot.mount ${D}${systemd_unitdir}/system/
+ install -d ${D}${sysconfdir}/systemd/system/default.target.wants
+ ln -sf ${systemd_unitdir}/system/boot.mount \
+ ${D}${sysconfdir}/systemd/system/default.target.wants/boot.mount
+}
+
# This allows for udevd automounting with mounts accessible to all.
do_configure_prepend () {
sed -i '/PrivateMounts=yes/d' ${S}/units/systemd-udevd.service.in
-} \ No newline at end of file
+}
+
+FILES_${PN} += "${sysconfdir}/systemd/system/default.target.wants/*.mount"
+FILES_${PN} += "${base_libdir}/systemd/system/*.mount"