firmware/br-ext-chip-goke/board/gk7205v200/kernel/patches/00_arch-arm-boot-Makefile.p...

46 lines
1.2 KiB
Diff

--- linux-4.9.37/arch/arm/boot/Makefile 2017-07-12 16:42:41.000000000 +0300
+++ linux-4.9.y/arch/arm/boot/Makefile 2021-06-07 13:01:32.000000000 +0300
@@ -16,6 +16,8 @@
ifneq ($(MACHINE),)
include $(MACHINE)/Makefile.boot
endif
+include $(srctree)/arch/arm/mach-goke/Makefile.boot
+include $(srctree)/arch/arm/boot/dts/Makefile
# Note: the following conditions must always be true:
# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
@@ -24,10 +26,12 @@
ZRELADDR := $(zreladdr-y)
PARAMS_PHYS := $(params_phys-y)
INITRD_PHYS := $(initrd_phys-y)
+DTB_OBJS ?= $(dtb-y)
+DTB_OBJS_FULL := $(addprefix $(obj)/dts/,$(DTB_OBJS))
export ZRELADDR INITRD_PHYS PARAMS_PHYS
-targets := Image zImage xipImage bootpImage uImage
+targets := Image zImage xipImage bootpImage uImage zImage-dtb
ifeq ($(CONFIG_XIP_KERNEL),y)
@@ -55,6 +59,10 @@
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
+$(obj)/zImage-dtb: $(obj)/zImage $(DTB_OBJS_FULL) FORCE
+ @cat $(obj)/zImage $(DTB_OBJS_FULL) > $@
+ @$(kecho) ' Kernel: $@ is ready'
+
endif
ifneq ($(LOADADDR),)
@@ -75,7 +83,7 @@
false; \
fi
-$(obj)/uImage: $(obj)/zImage FORCE
+$(obj)/uImage: $(obj)/zImage-dtb FORCE
@$(check_for_multiple_loadaddr)
$(call if_changed,uimage)