Merge "Support adding AVB properties into vbmeta module" into main am: 55edc0cd2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2842913 Change-Id: I6d5608c94856f1202ed8aa4a3ede2a70d7a90b4b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -63,6 +63,17 @@ type vbmetaProperties struct {
|
|||||||
|
|
||||||
// List of chained partitions that this vbmeta deletages the verification.
|
// List of chained partitions that this vbmeta deletages the verification.
|
||||||
Chained_partitions []chainedPartitionProperties
|
Chained_partitions []chainedPartitionProperties
|
||||||
|
|
||||||
|
// List of key-value pair of avb properties
|
||||||
|
Avb_properties []avbProperty
|
||||||
|
}
|
||||||
|
|
||||||
|
type avbProperty struct {
|
||||||
|
// Key of given avb property
|
||||||
|
Key *string
|
||||||
|
|
||||||
|
// Value of given avb property
|
||||||
|
Value *string
|
||||||
}
|
}
|
||||||
|
|
||||||
type chainedPartitionProperties struct {
|
type chainedPartitionProperties struct {
|
||||||
@@ -135,6 +146,20 @@ func (v *vbmeta) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
}
|
}
|
||||||
cmd.FlagWithArg("--rollback_index_location ", strconv.Itoa(ril))
|
cmd.FlagWithArg("--rollback_index_location ", strconv.Itoa(ril))
|
||||||
|
|
||||||
|
for _, avb_prop := range v.properties.Avb_properties {
|
||||||
|
key := proptools.String(avb_prop.Key)
|
||||||
|
if key == "" {
|
||||||
|
ctx.PropertyErrorf("avb_properties", "key must be specified")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
value := proptools.String(avb_prop.Value)
|
||||||
|
if value == "" {
|
||||||
|
ctx.PropertyErrorf("avb_properties", "value must be specified")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
cmd.FlagWithArg("--prop ", key+":"+value)
|
||||||
|
}
|
||||||
|
|
||||||
for _, p := range ctx.GetDirectDepsWithTag(vbmetaPartitionDep) {
|
for _, p := range ctx.GetDirectDepsWithTag(vbmetaPartitionDep) {
|
||||||
f, ok := p.(Filesystem)
|
f, ok := p.(Filesystem)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Reference in New Issue
Block a user