Merge "Soong support for rollback index." into main am: 3942df00ec
am: 49738e2c23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2745458 Change-Id: Id63460084d9c7527f0bc835744d34dfc15741a6c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -68,6 +68,9 @@ type avbAddHashFooterProperties struct {
|
|||||||
// List of properties to add to the footer
|
// List of properties to add to the footer
|
||||||
Props []avbProp
|
Props []avbProp
|
||||||
|
|
||||||
|
// The index used to prevent rollback of the image on device.
|
||||||
|
Rollback_index *int64
|
||||||
|
|
||||||
// Include descriptors from images
|
// Include descriptors from images
|
||||||
Include_descriptors_from_images []string `android:"path,arch_variant"`
|
Include_descriptors_from_images []string `android:"path,arch_variant"`
|
||||||
}
|
}
|
||||||
@@ -128,6 +131,14 @@ func (a *avbAddHashFooter) GenerateAndroidBuildActions(ctx android.ModuleContext
|
|||||||
addAvbProp(ctx, cmd, prop)
|
addAvbProp(ctx, cmd, prop)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if a.properties.Rollback_index != nil {
|
||||||
|
rollbackIndex := proptools.Int(a.properties.Rollback_index)
|
||||||
|
if rollbackIndex < 0 {
|
||||||
|
ctx.PropertyErrorf("rollback_index", "Rollback index must be non-negative")
|
||||||
|
}
|
||||||
|
cmd.Flag(fmt.Sprintf(" --rollback_index %x", rollbackIndex))
|
||||||
|
}
|
||||||
|
|
||||||
cmd.FlagWithOutput("--image ", a.output)
|
cmd.FlagWithOutput("--image ", a.output)
|
||||||
|
|
||||||
builder.Build("avbAddHashFooter", fmt.Sprintf("avbAddHashFooter %s", ctx.ModuleName()))
|
builder.Build("avbAddHashFooter", fmt.Sprintf("avbAddHashFooter %s", ctx.ModuleName()))
|
||||||
|
Reference in New Issue
Block a user