Bug: 140330870
Test: use bpf{} to install bpf program to vendor and have it
successfully loaded and installed by Android's bpfloader.
Change-Id: If0aac3098e39498f0238516ec839b6ac910cc61e
Add "btf" option that generates BTF debug info to support easier map
inspection. This is accomplished by passing the "-g" flag to clang
when compiling the BPF program.
The "-g" option also generates a number of DWARF debug sections which
are not necessary for loading BTF information, so strip these to avoid
increasing file size unnecessarily. bpfloader currently only supports
BTF info for maps, not programs, so we also strip the .BTF.ext section
containing program BTF info.
Bug: 203823368
Test: libbpf_load_test
Test: verify time_in_state.o includes .BTF section iff "btf: true" is
set
Test: verify time_in_state.o still loads if BTF is enabled
Change-Id: Ica25b253bace59d04130b0210350188399889bbe
Signed-off-by: Connor O'Brien <connoro@google.com>
Currently, the bpf module netd.o (source system/netd/bpf_progs/netd.c)
will be built to /system/etc/bpf/netd.o. In Android T, it will be moved
to mainline module com.android.tethering.
The expected behavior is:
- In T device, it uses the netd.o in mainline module.
- In pre-T devices, it uses the original netd, built from platform.
However, netd.o will be double loaded if the tethering module is
installed in Pre-T devices. Because:
1. bpf in apex is packed into /apex/MAINLINE_MODULE/etc/bpf/
2. bpf in platform is packed into /system/etc/bpf/
3. bpfloader in pre-T loads ANY bpf modules under
/apex/com.android.tethering/etc/bpf/ and /system/etc/bpf/.
We can't change the behavior of bpfloader in pre-T devices. We can't
delete the /system/etc/bpf/netd.o from pre-T devices. Both of them are
not mainline modules. So the mainlined netd.o needs to be packed into a
folder other than /apex/com.android.tethering/etc/bpf/ or
/system/etc/bpf/.
This commit adds a tag 'sub_dir' for bpf module. The installation path
of bpf modules will be:
- /system/etc/bpf/SUB_DIR/ (for platform code)
- /apex/MAINLINE_MODULE/etc/bpf/SUB_DIR/ (for mainline module)
Bug: 202086915
Test: add test in apex_test.go and build
Change-Id: Icc6619768ab006de9f86620a7df1bb2853eaba13
Delete it because there is only one user left
(system/bpfprogs/time_in_state.c). It can be specified locally.
Bug: 202086915
Test: build and boot
Change-Id: I1cb0ceb7b8e3fb63af34e11e5fece11fa038b24e
BPF headers used by both platform and mainline modules should be in
frameworks/libs/net.
Bug: 202086915
Test: build and boot
Test: cd packages/modules/Connectivity/netd; atest
Change-Id: I5a86ccd44a673a18138201f186b104f5214fd449
Restructures the bpf package test setup code to create FixturePreparer
instances for setting up a test fixture and converts the test to use
it.
Bug: 181070625
Test: m nothing
Change-Id: I7c76ed6dc292ca92d76ef95c4167f7ca2d68e1af
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: I51799c94a274eadab414abd80a07b5cda4584be9
bpf program is put to an APEX via 'bpfs' property. It is
placed under etc/bpf directory in it.
Fix: 167530625
Test: m
Change-Id: Ia36b486f0cffb619ecc4f7a318cde881abc5baf4
Test: Ran "m out/soong/.intermediates/system/netd/bpf_progs/clatd.o/android_common/obj/system/netd/bpf_progs/clatd.o"
and verified that the output .d file did NOT contain absolute paths.
Change-Id: I2d187638eb7a6db8de057b83312cba3116985ac8
This CL adds RBE support to javac, r8, and d8 rules which is only
enabled if respective environment variables are set.
Test: an aosp_crosshatch build with and without the new variables.
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output. For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files. Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).
Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
bpf_test.go was not listed in testSrcs, which meant it was not run
during the build, but ran and failed with go test android/soong/...
Don't redeclare the cc module types and mutators, use exported
functions from cc/testing.go instead, which contain a new
dependency needed by cc modules.
This reapplies I4542640e8ff08e71565ed50617dbe67d86b29b69 after
fixes for mac tests.
Test: m
Test: go test android/soong/...
Change-Id: I3dc3fdedbd7063df4a2e0cadf2a4e0711b1823ad
Using bpf as test data installs the module into a strange
subdirectory, clear the Rel() value before exporting it as
a SourceFileProducer.
Bug: 130206035
Test: m vts_test_binary_bpf_module
Change-Id: Ifdae90d11b15d65c097562d7d6985a8a1dca2bfd
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them. When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.
Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.
Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
All BPF programs need helper header files. These end up being
duplicated. Let us add a path to the common BPF helper to the search
path so that it can be used across projects.
No functional change to the final system image, only a build change.
Bug: 122665156
Change-Id: Ieee838df98258213efa24d74a12e069f056c66c1
Signed-off-by: Joel Fernandes <joelaf@google.com>
This allows other modules depend on bpf object outputs via the data
property.
Bug: 120246361
Test: bpf_test.go
Change-Id: I2ba9b9fea4d60f896d16f34053eb04513eae30ea
Add a module type for compiling .c to .o using clang --target=bpf.
Bug: 72981744
Test: m
Change-Id: Ie5712bfabe34901a84ed33737053306ca56ebeb4
Merged-In: Ie5712bfabe34901a84ed33737053306ca56ebeb4
(cherry picked from commit 3ba736a7e1)