Add 6.12 vmlinux.h genrules
Generate vmlinux.h from the kernel prebuilt vmlinux Bug: 421990777 Test: Manual; build bpf prog with "vmlinux_h_6_12" header Change-Id: I5647a3c2d7d1695aa42fd9636dd7f7abd4a1dc44 Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
parent
a2c132b118
commit
655664e3cd
1 changed files with 61 additions and 0 deletions
61
include/vmlinux/Android.bp
Normal file
61
include/vmlinux/Android.bp
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// Copyright (C) 2025 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
genrule {
|
||||
name: "vmlinux_h_6_12_arm64",
|
||||
cmd: "mkdir -p $(genDir)/6.12/arm64 && $(location bpftool) btf dump file $(location :vmlinux_6_12_arm64) format c > $(genDir)/6.12/arm64/vmlinux.h",
|
||||
srcs: [
|
||||
":vmlinux_6_12_arm64",
|
||||
],
|
||||
tools: ["bpftool"],
|
||||
out: [
|
||||
"6.12/arm64/vmlinux.h",
|
||||
],
|
||||
export_include_dirs: ["6.12/arm64"],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "vmlinux_h_6_12_x86_64",
|
||||
cmd: "mkdir -p $(genDir)/6.12/x86_64 && $(location bpftool) btf dump file $(location :vmlinux_6_12_x86_64) format c > $(genDir)/6.12/x86_64/vmlinux.h",
|
||||
srcs: [
|
||||
":vmlinux_6_12_x86_64",
|
||||
],
|
||||
tools: ["bpftool"],
|
||||
out: [
|
||||
"6.12/x86_64/vmlinux.h",
|
||||
],
|
||||
export_include_dirs: ["6.12/x86_64"],
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
name: "vmlinux_h_6_12",
|
||||
arch: {
|
||||
arm: {
|
||||
generated_headers: ["vmlinux_h_6_12_arm64"],
|
||||
export_generated_headers: ["vmlinux_h_6_12_arm64"],
|
||||
},
|
||||
arm64: {
|
||||
generated_headers: ["vmlinux_h_6_12_arm64"],
|
||||
export_generated_headers: ["vmlinux_h_6_12_arm64"],
|
||||
},
|
||||
x86: {
|
||||
generated_headers: ["vmlinux_h_6_12_x86_64"],
|
||||
export_generated_headers: ["vmlinux_h_6_12_x86_64"],
|
||||
},
|
||||
x86_64: {
|
||||
generated_headers: ["vmlinux_h_6_12_x86_64"],
|
||||
export_generated_headers: ["vmlinux_h_6_12_x86_64"],
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Reference in a new issue