Add <partition>/gpu support to fsgen
Test: m on qualcomm device with
PRODUCT_COPY_FILES += \
sequence_manifest.bin:$(TARGET_COPY_OUT_VENDOR)/gpu/kbc/sequence_manifest.bin
Change-Id: I9367c745862970c82bbc099dbe020dabb785ccb4
diff --git a/android/neverallow.go b/android/neverallow.go
index 8a3129f..e67619a 100644
--- a/android/neverallow.go
+++ b/android/neverallow.go
@@ -379,6 +379,7 @@
"prebuilt_system",
"prebuilt_first_stage_ramdisk",
"prebuilt_radio",
+ "prebuilt_gpu",
).
DefinedInBpFile().
Because("module type not allowed to be defined in bp file")
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index a54b8bd..d0da728 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -65,6 +65,7 @@
ctx.RegisterModuleType("prebuilt_font", PrebuiltFontFactory)
ctx.RegisterModuleType("prebuilt_overlay", PrebuiltOverlayFactory)
ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory)
+ ctx.RegisterModuleType("prebuilt_gpu", PrebuiltGPUFactory)
ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory)
ctx.RegisterModuleType("prebuilt_rfsa", PrebuiltRFSAFactory)
ctx.RegisterModuleType("prebuilt_renderscript_bitcode", PrebuiltRenderScriptBitcodeFactory)
@@ -832,6 +833,15 @@
return module
}
+// prebuilt_gpu is for a prebuilt artifact in <partition>/gpu directory.
+func PrebuiltGPUFactory() android.Module {
+ module := &PrebuiltEtc{}
+ InitPrebuiltEtcModule(module, "gpu")
+ // This module is device-only
+ android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst)
+ return module
+}
+
// prebuilt_dsp installs a DSP related file to <partition>/etc/dsp directory for system image.
// If soc_specific property is set to true, the DSP related file is installed to the
// vendor <partition>/dsp directory for vendor image.
diff --git a/fsgen/prebuilt_etc_modules_gen.go b/fsgen/prebuilt_etc_modules_gen.go
index 4f4365e..2025c91 100644
--- a/fsgen/prebuilt_etc_modules_gen.go
+++ b/fsgen/prebuilt_etc_modules_gen.go
@@ -199,6 +199,7 @@
"etc/dsp": etc.PrebuiltDSPFactory,
"etc/firmware": etc.PrebuiltFirmwareFactory,
"firmware": etc.PrebuiltFirmwareFactory,
+ "gpu": etc.PrebuiltGPUFactory,
"first_stage_ramdisk": etc.PrebuiltFirstStageRamdiskFactory,
"fonts": etc.PrebuiltFontFactory,
"framework": etc.PrebuiltFrameworkFactory,