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
diff --git a/android/module.go b/android/module.go
index 70a343e..d677406 100644
--- a/android/module.go
+++ b/android/module.go
@@ -348,6 +348,7 @@
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRamdisk() bool
+ InstallInVendorRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -403,6 +404,7 @@
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRamdisk() bool
+ InstallInVendorRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -623,6 +625,9 @@
// Whether this module is installed to ramdisk
Ramdisk *bool
+ // Whether this module is installed to vendor ramdisk
+ Vendor_ramdisk *bool
+
// Whether this module is built for non-native architecures (also known as native bridge binary)
Native_bridge_supported *bool `android:"arch_variant"`
@@ -1274,6 +1279,10 @@
return Bool(m.commonProperties.Ramdisk)
}
+func (m *ModuleBase) InstallInVendorRamdisk() bool {
+ return Bool(m.commonProperties.Vendor_ramdisk)
+}
+
func (m *ModuleBase) InstallInRecovery() bool {
return Bool(m.commonProperties.Recovery)
}
@@ -1323,6 +1332,10 @@
return m.base().commonProperties.ImageVariation == RamdiskVariation
}
+func (m *ModuleBase) InVendorRamdisk() bool {
+ return m.base().commonProperties.ImageVariation == VendorRamdiskVariation
+}
+
func (m *ModuleBase) InRecovery() bool {
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
@@ -2224,6 +2237,10 @@
return m.module.InstallInRamdisk()
}
+func (m *moduleContext) InstallInVendorRamdisk() bool {
+ return m.module.InstallInVendorRamdisk()
+}
+
func (m *moduleContext) InstallInRecovery() bool {
return m.module.InstallInRecovery()
}