Add vendor-ramdisk image to Soong.
Add vendor_ramdisk_available and vendor_ramdisk attribute to various rules. When a vendor_ramdisk variant of a module is generated, it is installed to $OUT/vendor-ramdisk. It is similar to a ramdisk image. Test: m nothing -j Change-Id: Ib2d16459f3094dbe21c3bdb7c016cb4b2bf62765
This commit is contained in:
@@ -26,6 +26,10 @@ type ImageInterface interface {
|
||||
// ramdisk partition).
|
||||
RamdiskVariantNeeded(ctx BaseModuleContext) bool
|
||||
|
||||
// VendorRamdiskVariantNeeded should return true if the module needs a vendor ramdisk variant (installed on the
|
||||
// vendor ramdisk partition).
|
||||
VendorRamdiskVariantNeeded(ctx BaseModuleContext) bool
|
||||
|
||||
// RecoveryVariantNeeded should return true if the module needs a recovery variant (installed on the
|
||||
// recovery partition).
|
||||
RecoveryVariantNeeded(ctx BaseModuleContext) bool
|
||||
@@ -53,6 +57,9 @@ const (
|
||||
|
||||
// RamdiskVariation means a module to be installed to ramdisk image.
|
||||
RamdiskVariation string = "ramdisk"
|
||||
|
||||
// VendorRamdiskVariation means a module to be installed to vendor ramdisk image.
|
||||
VendorRamdiskVariation string = "vendor_ramdisk"
|
||||
)
|
||||
|
||||
// imageMutator creates variants for modules that implement the ImageInterface that
|
||||
@@ -73,6 +80,9 @@ func imageMutator(ctx BottomUpMutatorContext) {
|
||||
if m.RamdiskVariantNeeded(ctx) {
|
||||
variations = append(variations, RamdiskVariation)
|
||||
}
|
||||
if m.VendorRamdiskVariantNeeded(ctx) {
|
||||
variations = append(variations, VendorRamdiskVariation)
|
||||
}
|
||||
if m.RecoveryVariantNeeded(ctx) {
|
||||
variations = append(variations, RecoveryVariation)
|
||||
}
|
||||
|
Reference in New Issue
Block a user