Merge "Add a new file for the boot image." am: 4a8dd372f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149660 Change-Id: I92e5069a76db18e21d555d0c72505be3240b8ba6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
9d63346c18
1 changed files with 10 additions and 8 deletions
|
@ -785,24 +785,26 @@ func bootImageProfileRule(ctx android.ModuleContext, image *bootImageConfig) and
|
|||
}
|
||||
|
||||
defaultProfile := "frameworks/base/config/boot-image-profile.txt"
|
||||
extraProfile := "frameworks/base/config/boot-image-profile-extra.txt"
|
||||
|
||||
rule := android.NewRuleBuilder(pctx, ctx)
|
||||
|
||||
var bootImageProfile android.Path
|
||||
if len(global.BootImageProfiles) > 1 {
|
||||
combinedBootImageProfile := image.dir.Join(ctx, "boot-image-profile.txt")
|
||||
rule.Command().Text("cat").Inputs(global.BootImageProfiles).Text(">").Output(combinedBootImageProfile)
|
||||
bootImageProfile = combinedBootImageProfile
|
||||
} else if len(global.BootImageProfiles) == 1 {
|
||||
bootImageProfile = global.BootImageProfiles[0]
|
||||
var profiles android.Paths
|
||||
if len(global.BootImageProfiles) > 0 {
|
||||
profiles = append(profiles, global.BootImageProfiles...)
|
||||
} else if path := android.ExistentPathForSource(ctx, defaultProfile); path.Valid() {
|
||||
bootImageProfile = path.Path()
|
||||
profiles = append(profiles, path.Path())
|
||||
} else {
|
||||
// No profile (not even a default one, which is the case on some branches
|
||||
// like master-art-host that don't have frameworks/base).
|
||||
// Return nil and continue without profile.
|
||||
return nil
|
||||
}
|
||||
if path := android.ExistentPathForSource(ctx, extraProfile); path.Valid() {
|
||||
profiles = append(profiles, path.Path())
|
||||
}
|
||||
bootImageProfile := image.dir.Join(ctx, "boot-image-profile.txt")
|
||||
rule.Command().Text("cat").Inputs(profiles).Text(">").Output(bootImageProfile)
|
||||
|
||||
profile := image.dir.Join(ctx, "boot.prof")
|
||||
|
||||
|
|
Loading…
Reference in a new issue