Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39143a94 authored by Yifan Hong's avatar Yifan Hong
Browse files

Fix path conflict for vendor_ramdisk_available

... and ramdisk_available modules. If a module is both
vendor_ramdisk_available and ramdisk_available, on a device
that mark recovery_as_boot and move_recovery_resources_to_vendor_boot
simultaneously (and incorrectly),
both will be installed to recovery/root/first_stage_ramdisk. Fix the
path conflict of the two variants by moving the vendor_ramdisk variant
to vendor-ramdisk/first_stage_ramdisk instead.

Also update comments for Vendor_ramdisk_available.

Test: m nothing -j
Bug: 156098440

Change-Id: I2b776b6fd8f5a2c361c0f6a89231e3cebc2646f0
parent 93d8c644
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1378,8 +1378,12 @@ func modulePartition(ctx ModuleInstallPathContext, os OsType) string {
				partition += "/system"
			}
		} else if ctx.InstallInVendorRamdisk() {
			// The module is only available after switching root into
			// /first_stage_ramdisk. To expose the module before switching root
			// on a device without a dedicated recovery partition, install the
			// recovery variant.
			if ctx.DeviceConfig().BoardMoveRecoveryResourcesToVendorBoot() {
				partition = "recovery/root/first_stage_ramdisk"
				partition = "vendor-ramdisk/first_stage_ramdisk"
			} else {
				partition = "vendor-ramdisk"
			}
+10 −2
Original line number Diff line number Diff line
@@ -255,10 +255,18 @@ type BaseProperties struct {
	// file
	Logtags []string

	// Make this module available when building for ramdisk
	// Make this module available when building for ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Ramdisk_available *bool

	// Make this module available when building for vendor ramdisk
	// Make this module available when building for vendor ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Vendor_ramdisk_available *bool

	// Make this module available when building for recovery
+8 −0
Original line number Diff line number Diff line
@@ -59,9 +59,17 @@ type prebuiltEtcProperties struct {
	Filename_from_src *bool `android:"arch_variant"`

	// Make this module available when building for ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Ramdisk_available *bool

	// Make this module available when building for vendor ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Vendor_ramdisk_available *bool

	// Make this module available when building for recovery.
+8 −0
Original line number Diff line number Diff line
@@ -66,9 +66,17 @@ type shBinaryProperties struct {
	Symlinks []string `android:"arch_variant"`

	// Make this module available when building for ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Ramdisk_available *bool

	// Make this module available when building for vendor ramdisk.
	// On device without a dedicated recovery partition, the module is only
	// available after switching root into
	// /first_stage_ramdisk. To expose the module before switching root, install
	// the recovery variant instead.
	Vendor_ramdisk_available *bool

	// Make this module available when building for recovery.