aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-11-06 16:49:58 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-11-06 17:17:50 +0100
commit61039170cc23013997b50d2c028e12a55b4df55b (patch)
tree855b4464865c2cdb1075fbf0e23264cd93c5df80
parent4aaabb89c9f7d918e9ea2c7adfa52167594c52c3 (diff)
downloadvendor_lineage-replicant-9.tar.gz
vendor_lineage-replicant-9.tar.bz2
vendor_lineage-replicant-9.zip
WIP: Add BOARD_DTB_IMAGE_NAME to share kernel configurations accross devicesreplicant-9
Using LineageOS's support for TARGET_KERNEL_CONFIG := zImage-dtb requires: - The following patches: - bae023b691e6 ANDROID: ARM: add config option to build zImage/dtb combo - ffdf07d14253 ANDROID: ARM: convert build of appended dtb zImage to list of dtbs - To add the kernel configuration : - CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y - CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos4412-i9300" While the kernel change is minimal, it has the side effect of requiring one kernel configuration per device. Before this change, the devices using the exynos4412-midas dtsi kept their configuration in sync, with the only difference being the value of CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES. This meant that at each configuration change you needed to port it too other devices using the exynos4412-midas as well which was time consuming. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--build/tasks/kernel.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 88573043..3c925225 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -229,14 +229,36 @@ $(KERNEL_CONFIG): $(KERNEL_DEFCONFIG_SRC) $(KERNEL_ADDITIONAL_CONFIG_OUT)
$(call make-kernel-target,KCONFIG_ALLCONFIG=$(KERNEL_OUT)/.config alldefconfig); \
fi
+# TODO
+# For now this creates some issue because of ifneq ($(BOARD_KERNEL_IMAGE_NAME),zImage-dtb)
+# ifneq ($(BOARD_DTB_IMAGE_NAME),)
+# ifneq ($(BOARD_KERNEL_IMAGE_NAME),zImage-dtb)
+# $(warning **********************************************************)
+# $(warning * DTB image found, but ${BOARD_KERNEL_IMAGE_NAME} is not *)
+# $(warning * supported with BOARD_DTB_IMAGE_NAME. Please use *)
+# $(warning * TARGET_KERNEL_CONFIG="zImage-dtb" instead in your your *)
+# $(warning * BoardConfig.mk file *)
+# $(warning **********************************************************)
+# $(error "WRONG BOARD_KERNEL_IMAGE_NAME")
+# endif
+# endif
+
.PHONY: TARGET_KERNEL_BINARIES
TARGET_KERNEL_BINARIES: $(KERNEL_CONFIG)
@echo "Building Kernel"
+ifneq ($(BOARD_DTB_IMAGE_NAME),)
+ $(call make-kernel-target,zImage)
+ $(call make-kernel-target,$(BOARD_DTB_IMAGE_NAME))
+ cat $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/zImage \
+ $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/$(BOARD_DTB_IMAGE_NAME) \
+ > $(KERNEL_BIN)
+else
$(call make-kernel-target,$(BOARD_KERNEL_IMAGE_NAME))
$(hide) if grep -q '^CONFIG_OF=y' $(KERNEL_CONFIG); then \
echo "Building DTBs"; \
$(call make-kernel-target,dtbs); \
fi
+endif
$(hide) if grep -q '=m' $(KERNEL_CONFIG); then \
echo "Building Kernel Modules"; \
$(call make-kernel-target,modules); \