diff options
| -rw-r--r-- | filesystem/avb_add_hash_footer.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/filesystem/avb_add_hash_footer.go b/filesystem/avb_add_hash_footer.go index 9d4ba3e95..f32993c4b 100644 --- a/filesystem/avb_add_hash_footer.go +++ b/filesystem/avb_add_hash_footer.go @@ -46,7 +46,7 @@ type avbProp struct { type avbAddHashFooterProperties struct { // Source file of this image. Can reference a genrule type module with the ":module" syntax. - Src *string `android:"path,arch_variant"` + Src proptools.Configurable[string] `android:"path,arch_variant,replace_instead_of_append"` // Set the name of the output. Defaults to <module_name>.img. Filename *string @@ -91,12 +91,13 @@ func (a *avbAddHashFooter) installFileName() string { func (a *avbAddHashFooter) GenerateAndroidBuildActions(ctx android.ModuleContext) { builder := android.NewRuleBuilder(pctx, ctx) + src := a.properties.Src.GetOrDefault(ctx, "") - if a.properties.Src == nil { + if src == "" { ctx.PropertyErrorf("src", "missing source file") return } - input := android.PathForModuleSrc(ctx, proptools.String(a.properties.Src)) + input := android.PathForModuleSrc(ctx, src) output := android.PathForModuleOut(ctx, a.installFileName()) builder.Command().Text("cp").Input(input).Output(output) |