From patchwork Wed Mar 18 12:39:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 6038581 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8BEE39F399 for ; Wed, 18 Mar 2015 12:39:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2673204EB for ; Wed, 18 Mar 2015 12:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA81C204FB for ; Wed, 18 Mar 2015 12:39:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755911AbbCRMjS (ORCPT ); Wed, 18 Mar 2015 08:39:18 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:37402 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755590AbbCRMjR (ORCPT ); Wed, 18 Mar 2015 08:39:17 -0400 Received: by wixw10 with SMTP id w10so38625455wix.0 for ; Wed, 18 Mar 2015 05:39:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=DmmgTGwB9nCYJczJBiEgrVxFWu4VRp+5MgEuUkwzTxs=; b=XhNHDb8umMXhQE+lQ0LbO9RBGppEWV75m+dkMWtszbbAujDNgQ/Mrp4G5C8kaAKKFT eoRLwu6vfDGSDr3sjqnkduWdse6fS2MQoHJKgFEXskoEM4R1H2vAPBYqoD8NUXiNFYy6 08baIby5JmAF/FvGzVGs9BOWUjOh15H1SQHrJdsThmcKRAo2OnxUKXJNTRbhZcZA2GVI kfpP0elTCzmv2gsLCr8fAqhsbPyUHhODmxPzGDA13MQNQ/vTvvGohiKsubv5alG+0f7T meL/Pa3+krHOFQaZ9ri5uogNgI6W1KzAG0feEmowhYJsAye8mFXJPpWWvgWYcXrBLtRl jLKw== X-Gm-Message-State: ALoCoQkSzOJnB6bgq+SpmTbZT60JOkGNPMoeIu6l7yIpdmTbnzcW8TTq5cbfbhdSfopF7ET5c51R X-Received: by 10.194.200.166 with SMTP id jt6mr96324814wjc.66.1426682356046; Wed, 18 Mar 2015 05:39:16 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by mx.google.com with ESMTPSA id lx10sm24331538wjb.17.2015.03.18.05.39.14 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 18 Mar 2015 05:39:15 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Cc: Zach Pfeffer , Nathan Rossi , Arnd Bergmann , catalin.marinas@arm.com, will.deacon@arm.com, Nathan Rossi , Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH v2] kbuild: Create directory for target DTB Date: Wed, 18 Mar 2015 13:39:07 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.3 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nathan Rossi When building specific DTBs out of the kernel tree the vendor subdirs (boot/dts/) are not created, ensure that they are before building the DTB. Signed-off-by: Nathan Rossi Signed-off-by: Michal Simek --- Changes in v2: - Use $(dir ${dtc-tmp}) instead of `dirname ${dtc-tmp}` Reported-by: Will Deacon Problem is visible with arm64 for out of tree builds. make O=/tmp/kkk/ defconfig make O=/tmp/kkk/ cavium/thunder-88xx.dtb DTC arch/arm64/boot/dts/cavium/thunder-88xx.dtb cc1: fatal error: opening output file arch/arm64/boot/dts/cavium/.thunder-88xx.dtb.dts.tmp: No such file or directory compilation terminated. make[2]: *** [arch/arm64/boot/dts/cavium/thunder-88xx.dtb] Error 1 make[1]: *** [cavium/thunder-88xx.dtb] Error 2 Building specific dtb target on arm32 is working fine make O=/tmp/kkk4/ multi_v7_defconfig make O=/tmp/kkk4/ zynq-zc702.dtb This is the way how Yocto is building dtb for specific target. --- scripts/Makefile.lib | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 044eb4f..79e8661 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -282,7 +282,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) quiet_cmd_dtc = DTC $@ -cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ +cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \