[Buildroot] [PATCH] linux: fix appended dtb handling of pre/postv3.8-rc1

Sagaert Johan sagaert.johan at skynet.be
Tue Jan 8 22:21:16 UTC 2013


 
Hi Arnout;

Just did a new build with this patch and it did'nt hang on the cat when the kernel was build.

Thanks.

Johan


-----Oorspronkelijk bericht-----
Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Arnout Vandecappelle (Essensium/Mind)
Verzonden: dinsdag 8 januari 2013 0:35
Aan: buildroot at busybox.net
Onderwerp: [Buildroot] [PATCH] linux: fix appended dtb handling of pre/postv3.8-rc1

From: "Arnout Vandecappelle (Essensium/Mind)" <arnout at mind.be>

Also fix duplication of 'define LINUX_APPEND_DTB' line, and refactor the common part out.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
 linux/linux.mk |   28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk index 7ec9cd2..61d4267 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -201,24 +201,20 @@ endef
 endif
 endif
 
-ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
-define LINUX_APPEND_DTB
-define LINUX_APPEND_DTB
-	# dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1
-	cat $(wildcard $(addprefix $(KERNEL_ARCH_PATH)/boot/,\
-		$(KERNEL_DTS_NAME).dtb dts/$(KERNEL_DTS_NAME).dtb)) \
-		>> $(KERNEL_ARCH_PATH)/boot/zImage
-	# We need to generate the uImage here after that so that the uImage is
-	# generated with the right image size.
-	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) uImage
-endef
-else ifeq ($(BR2_LINUX_KERNEL_APPENDED_ZIMAGE),y)
+ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
+# dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1
 define LINUX_APPEND_DTB
-	# dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1
-	cat $(wildcard $(addprefix $(KERNEL_ARCH_PATH)/boot/,\
-		$(KERNEL_DTS_NAME).dtb dts/$(KERNEL_DTS_NAME).dtb)) \
-		>> $(KERNEL_ARCH_PATH)/boot/zImage
+	if [ -e $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb ]; then \
+		cat $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb; \
+	else \
+		cat $(KERNEL_ARCH_PATH)/boot/dts/$(KERNEL_DTS_NAME).dtb; \
+	fi >> $(KERNEL_ARCH_PATH)/boot/zImage
 endef
+ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
+# We need to generate the uImage here after that so that the uImage is 
+# generated with the right image size.
+LINUX_APPEND_DTB += $(sep)$(TARGET_MAKE_ENV) $(MAKE) 
+$(LINUX_MAKE_FLAGS) -C $(@D) uImage endif
 endif
 
 # Compilation. We make sure the kernel gets rebuilt when the
--
1.7.10.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot



More information about the buildroot mailing list