bpfloader: Android V requires kernel 4.19+

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibd9ad9bc322388f0f5eda75f9e838590f713007c
This commit is contained in:
Maciej Żenczykowski 2023-07-13 17:12:54 +00:00
parent cd4022ef2a
commit 6002cbedb1

View file

@ -251,6 +251,11 @@ int main(int argc, char** argv) {
(void)argc;
android::base::InitLogging(argv, &android::base::KernelLogger);
if (!android::bpf::isAtLeastKernelVersion(4, 19, 0)) {
ALOGE("Android V requires kernel 4.19.");
return 1;
}
// Ensure we can determine the Android build type.
if (!android::bpf::isEng() && !android::bpf::isUser() && !android::bpf::isUserdebug()) {
ALOGE("Failed to determine the build type: got %s, want 'eng', 'user', or 'userdebug'",