Merge "[NETD-BPF#34] Add a tag for bpf to specify the install folder"
This commit is contained in:
@@ -1612,8 +1612,8 @@ func apexFileForRuntimeResourceOverlay(ctx android.BaseModuleContext, rro java.R
|
||||
return af
|
||||
}
|
||||
|
||||
func apexFileForBpfProgram(ctx android.BaseModuleContext, builtFile android.Path, bpfProgram bpf.BpfModule) apexFile {
|
||||
dirInApex := filepath.Join("etc", "bpf")
|
||||
func apexFileForBpfProgram(ctx android.BaseModuleContext, builtFile android.Path, apex_sub_dir string, bpfProgram bpf.BpfModule) apexFile {
|
||||
dirInApex := filepath.Join("etc", "bpf", apex_sub_dir)
|
||||
return newApexFile(ctx, builtFile, builtFile.Base(), dirInApex, etc, bpfProgram)
|
||||
}
|
||||
|
||||
@@ -1831,8 +1831,9 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
case bpfTag:
|
||||
if bpfProgram, ok := child.(bpf.BpfModule); ok {
|
||||
filesToCopy, _ := bpfProgram.OutputFiles("")
|
||||
apex_sub_dir := bpfProgram.SubDir()
|
||||
for _, bpfFile := range filesToCopy {
|
||||
filesInfo = append(filesInfo, apexFileForBpfProgram(ctx, bpfFile, bpfProgram))
|
||||
filesInfo = append(filesInfo, apexFileForBpfProgram(ctx, bpfFile, apex_sub_dir, bpfProgram))
|
||||
}
|
||||
} else {
|
||||
ctx.PropertyErrorf("bpfs", "%q is not a bpf module", depName)
|
||||
|
Reference in New Issue
Block a user