From patchwork Tue Jan 8 21:23:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 210539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B97B92C008D for ; Wed, 9 Jan 2013 08:24:12 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B11CCA0115; Tue, 8 Jan 2013 21:24:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jdpp8HbfnHo0; Tue, 8 Jan 2013 21:24:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EC3C7A010B; Tue, 8 Jan 2013 21:24:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E16D58F753 for ; Tue, 8 Jan 2013 21:24:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ACC208C7B7 for ; Tue, 8 Jan 2013 21:24:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Witu9EwYmhYn for ; Tue, 8 Jan 2013 21:24:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id F38318C7C2 for ; Tue, 8 Jan 2013 21:24:02 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1TsgeO-0007WH-Lb; Tue, 08 Jan 2013 22:24:01 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.80) (envelope-from ) id 1TsgeL-0005Ux-2Q; Tue, 08 Jan 2013 22:23:57 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Tue, 8 Jan 2013 22:23:56 +0100 Message-Id: <1357680237-21101-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.7.10.4 Subject: [Buildroot] [PATCH v2] linux: fix appended dtb handling of pre/post v3.8-rc1 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Arnout Vandecappelle (Essensium/Mind)" Also factor the common part out. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- v2: remove fix of duplication of 'define LINUX_APPEND_DTB' line --- linux/linux.mk | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index fe5f738..61d4267 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -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