kernel: Fix the check for official builds

The check for official builds now only affects the case where a prebuilt
kernel was actually used, not the case where a device builds a kernel
from source as normal.

The check has also been turned around so that it only fails the build if
it's actually an official build, not an unofficial one.

Change-Id: I1280b16b90589742c2abe7f3f6f5975a3aaeea03
This commit is contained in:
Tim Schumacher
2021-06-27 11:27:27 +02:00
committed by Nebrassy
parent a811a5bd19
commit 0e721b6a4e
+7 -7
View File
@@ -150,10 +150,10 @@ else
$(warning **********************************************************)
$(error "NO KERNEL CONFIG")
else
ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
$(error "PREBUILT KERNEL IS NOT ALLOWED ON OFFICIAL BUILDS!")
else
ifneq ($(TARGET_FORCE_PREBUILT_KERNEL),)
ifneq ($(TARGET_FORCE_PREBUILT_KERNEL),)
ifneq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
$(error "PREBUILT KERNEL IS NOT ALLOWED ON OFFICIAL BUILDS!")
else
$(warning **********************************************************)
$(warning * Kernel source found and configuration was defined, *)
$(warning * but prebuilt kernel is being forced. *)
@@ -166,10 +166,10 @@ else
$(warning **********************************************************)
FULL_KERNEL_BUILD := false
KERNEL_BIN := $(TARGET_PREBUILT_KERNEL)
else
FULL_KERNEL_BUILD := true
KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL)
endif
else
FULL_KERNEL_BUILD := true
KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL)
endif
endif
endif