bpf modules can be included in filesystem modules

Bug: 322246536
Test: go test ./...
Change-Id: I5f29258e45475b30cdb26014c2db147182ec52fa
This commit is contained in:
Jiyong Park
2024-02-16 15:35:03 +09:00
parent f617e18741
commit 06c4cdcf87
3 changed files with 30 additions and 0 deletions

View File

@@ -203,6 +203,15 @@ func (bpf *bpf) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
}
installDir := android.PathForModuleInstall(ctx, "etc", "bpf")
if len(bpf.properties.Sub_dir) > 0 {
installDir = installDir.Join(ctx, bpf.properties.Sub_dir)
}
for _, obj := range bpf.objs {
ctx.PackageFile(installDir, obj.Base(), obj)
}
android.SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: srcs.Strings()})
}