Merge "Build ramdisk's build.prop with soong" into main am: 51778812b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3343347 Change-Id: Ieb04e7b6efaaa3574a7b73869122c42b8eb4aa2a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
9211804267
3 changed files with 14 additions and 16 deletions
|
|
@ -234,3 +234,12 @@ build_prop {
|
|||
relative_install_path: "etc", // odm_dlkm/etc/build.prop
|
||||
visibility: ["//visibility:private"],
|
||||
}
|
||||
|
||||
build_prop {
|
||||
name: "ramdisk-build.prop",
|
||||
stem: "build.prop",
|
||||
ramdisk: true,
|
||||
product_config: ":product_config",
|
||||
relative_install_path: "etc/ramdisk", // ramdisk/system/etc/ramdisk/build.prop
|
||||
visibility: ["//visibility:private"],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,21 +115,14 @@ func (p *buildPropModule) partition(config DeviceConfig) string {
|
|||
return "vendor_dlkm"
|
||||
} else if p.InstallInOdmDlkm() {
|
||||
return "odm_dlkm"
|
||||
} else if p.InstallInRamdisk() {
|
||||
// From this hardcoding in make:
|
||||
// https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/sysprop.mk;l=311;drc=274435657e4682e5cee3fffd11fb301ab32a828d
|
||||
return "bootimage"
|
||||
}
|
||||
return "system"
|
||||
}
|
||||
|
||||
var validPartitions = []string{
|
||||
"system",
|
||||
"system_ext",
|
||||
"product",
|
||||
"odm",
|
||||
"vendor",
|
||||
"system_dlkm",
|
||||
"vendor_dlkm",
|
||||
"odm_dlkm",
|
||||
}
|
||||
|
||||
func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
||||
if !p.SocSpecific() && p.properties.Android_info != nil {
|
||||
ctx.ModuleErrorf("Android_info cannot be set if build.prop is not installed in vendor partition")
|
||||
|
|
@ -138,10 +131,6 @@ func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) {
|
|||
p.outputFilePath = PathForModuleOut(ctx, "build.prop").OutputPath
|
||||
|
||||
partition := p.partition(ctx.DeviceConfig())
|
||||
if !InList(partition, validPartitions) {
|
||||
ctx.PropertyErrorf("partition", "unsupported partition %q: only %q are supported", partition, validPartitions)
|
||||
return
|
||||
}
|
||||
|
||||
rule := NewRuleBuilder(pctx, ctx)
|
||||
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ def main():
|
|||
build_product_prop(args)
|
||||
case "vendor":
|
||||
build_vendor_prop(args)
|
||||
case "system_dlkm" | "vendor_dlkm" | "odm_dlkm":
|
||||
case "system_dlkm" | "vendor_dlkm" | "odm_dlkm" | "bootimage":
|
||||
build_prop(args, gen_build_info=False, gen_common_build_props=True, variables=[])
|
||||
case _:
|
||||
sys.exit(f"not supported partition {args.partition}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue