Merge "bootimg supports v4 header" am: ca5e611e0a
am: d279ff2313
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620744 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9d909a9b7b195d6cc0fc3c6157f741b1912cc7e5
This commit is contained in:
commit
291df17d28
|
@ -62,6 +62,10 @@ type bootimgProperties struct {
|
|||
// Optional kernel commandline
|
||||
Cmdline *string
|
||||
|
||||
// File that contains bootconfig parameters. This can be set only when `vendor_boot` is true
|
||||
// and `header_version` is greater than or equal to 4.
|
||||
Bootconfig *string `android:"arch_variant,path"`
|
||||
|
||||
// When set to true, sign the image with avbtool. Default is false.
|
||||
Use_avb *bool
|
||||
|
||||
|
@ -189,6 +193,19 @@ func (b *bootimg) buildBootImage(ctx android.ModuleContext, vendor bool) android
|
|||
return output
|
||||
}
|
||||
|
||||
bootconfig := proptools.String(b.properties.Bootconfig)
|
||||
if bootconfig != "" {
|
||||
if !vendor {
|
||||
ctx.PropertyErrorf("bootconfig", "requires vendor_boot: true")
|
||||
return output
|
||||
}
|
||||
if verNum < 4 {
|
||||
ctx.PropertyErrorf("bootconfig", "requires header_version: 4 or later")
|
||||
return output
|
||||
}
|
||||
cmd.FlagWithInput("--vendor_bootconfig ", android.PathForModuleSrc(ctx, bootconfig))
|
||||
}
|
||||
|
||||
flag := "--output "
|
||||
if vendor {
|
||||
flag = "--vendor_boot "
|
||||
|
|
Loading…
Reference in New Issue