bpf modules can be included in filesystem modules
Bug: 322246536
Test: go test ./...
Change-Id: I5f29258e45475b30cdb26014c2db147182ec52fa
diff --git a/bpf/bpf.go b/bpf/bpf.go
index e1b512f..38fbd88 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -203,6 +203,15 @@
}
}
+
+ 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()})
}