Ramdisk modules install to correct location
Install to recovery/root/first_stage_ramdisk if BOARD_USES_RECOVERY_AS_BOOT, otherwise ramdisk. In addition, append /system if not InstallInRoot(). Test: pass Bug: 147347110 Change-Id: Ie5895ac61a3d5d85f5d958a27c7980d6c79d997e
This commit is contained in:
@@ -1233,3 +1233,7 @@ func (c *deviceConfig) DeviceSecondaryArch() string {
|
||||
func (c *deviceConfig) DeviceSecondaryArchVariant() string {
|
||||
return String(c.config.productVariables.DeviceSecondaryArchVariant)
|
||||
}
|
||||
|
||||
func (c *deviceConfig) BoardUsesRecoveryAsBoot() bool {
|
||||
return Bool(c.config.productVariables.BoardUsesRecoveryAsBoot)
|
||||
}
|
||||
|
@@ -1256,8 +1256,14 @@ func modulePartition(ctx ModuleInstallPathContext) string {
|
||||
} else if ctx.InstallInTestcases() {
|
||||
partition = "testcases"
|
||||
} else if ctx.InstallInRamdisk() {
|
||||
// TODO(elsk): should be conditional on RECOVERY_AS_BOOT
|
||||
if ctx.DeviceConfig().BoardUsesRecoveryAsBoot() {
|
||||
partition = "recovery/root/first_stage_ramdisk"
|
||||
} else {
|
||||
partition = "ramdisk"
|
||||
}
|
||||
if !ctx.InstallInRoot() {
|
||||
partition += "/system"
|
||||
}
|
||||
} else if ctx.InstallInRecovery() {
|
||||
if ctx.InstallInRoot() {
|
||||
partition = "recovery/root"
|
||||
|
@@ -316,6 +316,8 @@ type productVariables struct {
|
||||
EnforceProductPartitionInterface *bool `json:",omitempty"`
|
||||
|
||||
InstallExtraFlattenedApexes *bool `json:",omitempty"`
|
||||
|
||||
BoardUsesRecoveryAsBoot *bool `json:",omitempty"`
|
||||
}
|
||||
|
||||
func boolPtr(v bool) *bool {
|
||||
|
Reference in New Issue
Block a user