Skip to contentSkip to conversation

linux: fix appended dtb handling of pre/post v3.8-rc1

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Jan 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux: fix appended dtb handling of pre/post v3.8-rc1

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

Also factor the common part out.

---
v2: remove fix of duplication of 'define LINUX_APPEND_DTB' line

---
 linux/linux.mk |   27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)
linux/linux.mk +12 -15
index fe5f738..61d4267 100644
@@ -201,23 +201,20 @@ endef
 endif
 endif
 
-ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
-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
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 linux: fix appended dtb handling of pre/post v3.8-rc1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Arnout> Also factor the common part out.

Committed, thanks. It wasn't clear exactly what you were fixing as the commit message doesn't explain it and I hadn't seen Johan's mail, so I extended it a bit.

Sorry, I missed this issue as I had already done a kernel build (which generated the dtbs).

Signature · 1 line
Bye, Peter Korsgaard