Support recovery and recovery_available
`recovery: true` installs a module to the recovery partition. `recovery_available: true` makes a module to be available to other `recovery:true` or `recovery_available: true` modules. These to are very similar to vendor, vendor_available properties, except for the target partition. Bug: 67916654 Bug: 64960723 Test: m -j, toybox_recovery is installed to the recovery/root/sbin Change-Id: Iaebe0593de16c69fa70de251a61f4d018a251509
This commit is contained in:
@@ -124,6 +124,7 @@ type ModuleContext interface {
|
||||
|
||||
InstallInData() bool
|
||||
InstallInSanitizerDir() bool
|
||||
InstallInRecovery() bool
|
||||
|
||||
RequiredModuleNames() []string
|
||||
|
||||
@@ -176,6 +177,7 @@ type Module interface {
|
||||
Target() Target
|
||||
InstallInData() bool
|
||||
InstallInSanitizerDir() bool
|
||||
InstallInRecovery() bool
|
||||
SkipInstall()
|
||||
ExportedToMake() bool
|
||||
|
||||
@@ -237,6 +239,9 @@ type commonProperties struct {
|
||||
// /system/product if product partition does not exist).
|
||||
Product_specific *bool
|
||||
|
||||
// Whether this module is installed to recovery partition
|
||||
Recovery *bool
|
||||
|
||||
// init.rc files to be installed if this module is installed
|
||||
Init_rc []string
|
||||
|
||||
@@ -560,6 +565,10 @@ func (p *ModuleBase) InstallInSanitizerDir() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (p *ModuleBase) InstallInRecovery() bool {
|
||||
return Bool(p.commonProperties.Recovery)
|
||||
}
|
||||
|
||||
func (a *ModuleBase) generateModuleTarget(ctx ModuleContext) {
|
||||
allInstalledFiles := Paths{}
|
||||
allCheckbuildFiles := Paths{}
|
||||
@@ -1008,6 +1017,10 @@ func (a *androidModuleContext) InstallInSanitizerDir() bool {
|
||||
return a.module.InstallInSanitizerDir()
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) InstallInRecovery() bool {
|
||||
return a.module.InstallInRecovery()
|
||||
}
|
||||
|
||||
func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool {
|
||||
if a.module.base().commonProperties.SkipInstall {
|
||||
return true
|
||||
|
Reference in New Issue
Block a user