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
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 6f18df8..9d03494 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -156,10 +156,10 @@
$(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. *)
@@ -172,10 +172,10 @@
$(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