Skip to content

Commit

Permalink
mounts from fp4
Browse files Browse the repository at this point in the history
  • Loading branch information
b100dian committed Mar 26, 2023
1 parent 2462ebd commit 40d0ab8
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sparse/usr/bin/droid/dmsetup.sh
@@ -0,0 +1,2 @@
#!/bin/sh
dmsetup create --concise "$(/usr/bin/parse-android-dynparts /dev/sda10)"
12 changes: 12 additions & 0 deletions sparse/usr/lib/systemd/system/dmsetup.service
@@ -0,0 +1,12 @@
[Unit]
Description=Setup dynamic partitions
Before=system.mount system_ext.mount vendor.mount product.mount local-fs.target systemd-modules-load.service droid-hal-init.service
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash /usr/bin/droid/dmsetup.sh

[Install]
WantedBy=droid-hal-init.service
20 changes: 20 additions & 0 deletions sparse/usr/lib/systemd/system/odm_root.mount
@@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /odm_root
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/dev/mapper/dynpart-odm_a
Where=/odm_root
Type=ext4
Options=ro,barrier=1,discard
# Options had SELinux context option:

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# odm /odm ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
20 changes: 20 additions & 0 deletions sparse/usr/lib/systemd/system/product.mount
@@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /product
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/dev/mapper/dynpart-product_a
Where=/product
Type=ext4
Options=ro,barrier=1,discard
# Options had SELinux context option:

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# product /product ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
19 changes: 19 additions & 0 deletions sparse/usr/lib/systemd/system/system.mount
@@ -0,0 +1,19 @@
[Unit]
Description=Droid mount for /system
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/system_root/system
Where=/system
Type=none
Options=bind

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
20 changes: 20 additions & 0 deletions sparse/usr/lib/systemd/system/system_ext.mount
@@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /system_ext
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/dev/mapper/dynpart-system_ext_a
Where=/system_ext
Type=ext4
Options=ro,barrier=1
# Options had SELinux context option:

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# system_ext /system_ext ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
20 changes: 20 additions & 0 deletions sparse/usr/lib/systemd/system/system_root.mount
@@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /system
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/dev/mapper/dynpart-system_a
Where=/system_root
Type=ext4
Options=ro,barrier=1
# Options had SELinux context option:

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
20 changes: 20 additions & 0 deletions sparse/usr/lib/systemd/system/vendor.mount
@@ -0,0 +1,20 @@
[Unit]
Description=Droid mount for /vendor
Before=local-fs.target systemd-modules-load.service

[Mount]
What=/dev/mapper/dynpart-vendor_a
Where=/vendor
Type=ext4
Options=ro,barrier=1,discard
# Options had SELinux context option:

# Default is 90 which makes mount period too long in case of
# errors so drop it down a notch.
TimeoutSec=10

[Install]
WantedBy=local-fs.target

# From ./out/target/product/FP4/vendor/etc/fstab.default :
# vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount

0 comments on commit 40d0ab8

Please sign in to comment.