aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Strachan <astrachan@google.com>2019-04-17 10:11:36 -0700
committerAlistair Strachan <astrachan@google.com>2019-05-05 16:23:43 -0700
commit5a10544fd0ad5d4c6cdfa307f7e4be12a6deda40 (patch)
treeaf9fa6f5d2785eb21734f656c1d427e0199a7940
parent6e27a20743ece62da3a34ed85c829317f10ddb1e (diff)
downloadcuttlefish-5a10544fd0ad5d4c6cdfa307f7e4be12a6deda40.tar.gz
Reorder vendor/metadata partitions
The vendor partition will be part of the dynamic partition block in a future change; this means it won't appear as a regular block device. In an ideal world, this would leave a "hole" in the vdX assignment from Linux (i.e. vde would be skipped) but this is not possible and Linux will always compact the identifiers. To work around this problem, ensure that any future dynamic partitions are defined last, so when they do not appear any longer, the non-dynamic partition names do not change. Bug: 113175337 Change-Id: I843b92c4a806c0b70dd6f95f3803674a3c6f7b81 Merged-In: I843b92c4a806c0b70dd6f95f3803674a3c6f7b81 Signed-off-by: Alistair Strachan <astrachan@google.com>
-rw-r--r--shared/config/fstab.dtb2
-rw-r--r--shared/config/fstab.initrd4
-rw-r--r--shared/config/gsi.fstab2
-rw-r--r--shared/config/initrd-root.dtbbin670 -> 670 bytes
-rw-r--r--shared/config/initrd-root.dts2
-rw-r--r--shared/config/system-root.dtbbin522 -> 522 bytes
-rw-r--r--shared/config/system-root.dts2
-rw-r--r--shared/sepolicy/file_contexts5
8 files changed, 9 insertions, 8 deletions
diff --git a/shared/config/fstab.dtb b/shared/config/fstab.dtb
index a60180791..4920a6c5a 100644
--- a/shared/config/fstab.dtb
+++ b/shared/config/fstab.dtb
@@ -1,5 +1,5 @@
/dev/block/vdb /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts
/dev/block/vdc /cache ext4 nodev,noatime,nosuid,errors=panic wait
-/dev/block/vde /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
+/dev/block/vdd /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
/dev/block/zram0 none swap defaults zramsize=75%
/tmp /sdcard none defaults,bind recoveryonly
diff --git a/shared/config/fstab.initrd b/shared/config/fstab.initrd
index 08798dd87..5ffe8a114 100644
--- a/shared/config/fstab.initrd
+++ b/shared/config/fstab.initrd
@@ -1,8 +1,8 @@
/dev/block/vda /system ext4 noatime,ro,errors=panic wait
/dev/block/vdb /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts
/dev/block/vdc /cache ext4 nodev,noatime,nosuid,errors=panic wait
-/dev/block/vdd /vendor ext4 noatime,ro,errors=panic wait
-/dev/block/vde /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
+/dev/block/vdd /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable
+/dev/block/vde /vendor ext4 noatime,ro,errors=panic wait
/dev/block/vdf /product ext4 noatime,ro,errors=panic wait
/dev/block/zram0 none swap defaults zramsize=75%
/tmp /sdcard none defaults,bind recoveryonly
diff --git a/shared/config/gsi.fstab b/shared/config/gsi.fstab
index 4e3f31a20..76c902b1d 100644
--- a/shared/config/gsi.fstab
+++ b/shared/config/gsi.fstab
@@ -1,2 +1,2 @@
-/dev/block/vdd /vendor ext4 noatime,ro,errors=panic wait
+/dev/block/vde /vendor ext4 noatime,ro,errors=panic wait
/dev/block/vdf /product ext4 noatime,ro,errors=panic wait
diff --git a/shared/config/initrd-root.dtb b/shared/config/initrd-root.dtb
index 7962e1bed..d12be7e54 100644
--- a/shared/config/initrd-root.dtb
+++ b/shared/config/initrd-root.dtb
Binary files differ
diff --git a/shared/config/initrd-root.dts b/shared/config/initrd-root.dts
index cb9e5ecd9..d27d76a4a 100644
--- a/shared/config/initrd-root.dts
+++ b/shared/config/initrd-root.dts
@@ -32,7 +32,7 @@
vendor {
compatible = "android,vendor";
- dev = "/dev/block/vdd";
+ dev = "/dev/block/vde";
type = "ext4";
mnt_flags = "noatime,ro,errors=panic";
fsmgr_flags = "wait";
diff --git a/shared/config/system-root.dtb b/shared/config/system-root.dtb
index bae54d85b..2ebd0d77d 100644
--- a/shared/config/system-root.dtb
+++ b/shared/config/system-root.dtb
Binary files differ
diff --git a/shared/config/system-root.dts b/shared/config/system-root.dts
index 327a38cbe..db16f37e6 100644
--- a/shared/config/system-root.dts
+++ b/shared/config/system-root.dts
@@ -24,7 +24,7 @@
compatible = "android,fstab";
vendor {
compatible = "android,vendor";
- dev = "/dev/block/vdd";
+ dev = "/dev/block/vde";
type = "ext4";
mnt_flags = "noatime,ro,errors=panic";
fsmgr_flags = "wait";
diff --git a/shared/sepolicy/file_contexts b/shared/sepolicy/file_contexts
index d2edbd23b..0dfc4666d 100644
--- a/shared/sepolicy/file_contexts
+++ b/shared/sepolicy/file_contexts
@@ -4,8 +4,9 @@
/dev/block/vda u:object_r:system_block_device:s0
/dev/block/vdb u:object_r:userdata_block_device:s0
/dev/block/vdc u:object_r:cache_block_device:s0
-/dev/block/vdd u:object_r:system_block_device:s0
-/dev/block/vde u:object_r:metadata_block_device:s0
+/dev/block/vdd u:object_r:metadata_block_device:s0
+/dev/block/vde u:object_r:system_block_device:s0
+/dev/block/vdf u:object_r:system_block_device:s0
/dev/block/zram0 u:object_r:swap_block_device:s0
/dev/e2e_managed u:object_r:region_e2e_test_device:s0
/dev/e2e_manager u:object_r:region_e2e_test_device:s0