From 5dd480ae5897f802efb328fe8c50db47e54e47ed Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sun, 26 Sep 2021 00:26:44 +0200 Subject: kernel.mk: remove kernel prebuilt support to simplify the code Signed-off-by: Denis 'GNUtoo' Carikli --- build/tasks/kernel.mk | 61 ++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index afe7725d..750b142c 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -78,57 +78,18 @@ $(error BOARD_KERNEL_IMAGE_NAME not defined.) endif TARGET_PREBUILT_INT_KERNEL := $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/$(BOARD_KERNEL_IMAGE_NAME) -ifeq "$(wildcard $(KERNEL_SRC) )" "" - ifneq ($(TARGET_PREBUILT_KERNEL),) - HAS_PREBUILT_KERNEL := true - NEEDS_KERNEL_COPY := true - else - $(foreach cf,$(PRODUCT_COPY_FILES), \ - $(eval _src := $(call word-colon,1,$(cf))) \ - $(eval _dest := $(call word-colon,2,$(cf))) \ - $(ifeq kernel,$(_dest), \ - $(eval HAS_PREBUILT_KERNEL := true))) - endif - - ifneq ($(HAS_PREBUILT_KERNEL),) - $(warning ***************************************************************) - $(warning * Using prebuilt kernel binary instead of source *) - $(warning * THIS IS DEPRECATED, AND IS NOT ADVISED. *) - $(warning * Please configure your device to download the kernel *) - $(warning * source repository to $(KERNEL_SRC)) - $(warning * for more information *) - $(warning ***************************************************************) - FULL_KERNEL_BUILD := false - KERNEL_BIN := $(TARGET_PREBUILT_KERNEL) - else - $(warning ***************************************************************) - $(warning * *) - $(warning * No kernel source found, and no fallback prebuilt defined. *) - $(warning * Please make sure your device is properly configured to *) - $(warning * download the kernel repository to $(KERNEL_SRC)) - $(warning * and add the TARGET_KERNEL_CONFIG variable to BoardConfig.mk *) - $(warning * *) - $(warning * As an alternative, define the TARGET_PREBUILT_KERNEL *) - $(warning * variable with the path to the prebuilt binary kernel image *) - $(warning * in your BoardConfig.mk file *) - $(warning * *) - $(warning ***************************************************************) - $(error "NO KERNEL") - endif +NEEDS_KERNEL_COPY := true +ifeq ($(TARGET_KERNEL_CONFIG),) + $(warning **********************************************************) + $(warning * Kernel source found, but no configuration was defined *) + $(warning * Please add the TARGET_KERNEL_CONFIG variable to your *) + $(warning * BoardConfig.mk file *) + $(warning **********************************************************) + # $(error "NO KERNEL CONFIG") else - NEEDS_KERNEL_COPY := true - ifeq ($(TARGET_KERNEL_CONFIG),) - $(warning **********************************************************) - $(warning * Kernel source found, but no configuration was defined *) - $(warning * Please add the TARGET_KERNEL_CONFIG variable to your *) - $(warning * BoardConfig.mk file *) - $(warning **********************************************************) - # $(error "NO KERNEL CONFIG") - else - #$(info Kernel source found, building it) - FULL_KERNEL_BUILD := true - KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL) - endif + #$(info Kernel source found, building it) + FULL_KERNEL_BUILD := true + KERNEL_BIN := $(TARGET_PREBUILT_INT_KERNEL) endif ifeq ($(FULL_KERNEL_BUILD),true) -- cgit v1.2.3