diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-11-06 16:49:58 +0100 |
---|---|---|
committer | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2020-06-25 07:56:59 -0400 |
commit | ebb8aee3f5ba5bb0ee0d1fef78d740f567d1586f (patch) | |
tree | 5bcd5a4d54c653914a679fb9a34e4fb3b7ad8e95 | |
parent | 87467210f3a4508f6bf9ed81fe37476f0c03ad3a (diff) | |
download | vendor_lineage-ebb8aee3f5ba5bb0ee0d1fef78d740f567d1586f.tar.gz vendor_lineage-ebb8aee3f5ba5bb0ee0d1fef78d740f567d1586f.tar.bz2 vendor_lineage-ebb8aee3f5ba5bb0ee0d1fef78d740f567d1586f.zip |
WIP: Add BOARD_DTB_IMAGE_NAME to share kernel configurations accross devices
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>
Rebased and adapted for Replicant 10
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
-rw-r--r-- | build/tasks/kernel.mk | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk index 92f51874..771e33c8 100644 --- a/build/tasks/kernel.mk +++ b/build/tasks/kernel.mk @@ -248,13 +248,35 @@ $(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 + $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) @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) || exit "$$?"; \ |