From patchwork Mon Mar 30 12:39:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 6120581 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8A456BF4A6 for ; Mon, 30 Mar 2015 12:39:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77D932034F for ; Mon, 30 Mar 2015 12:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E4FF2034E for ; Mon, 30 Mar 2015 12:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbbC3MjR (ORCPT ); Mon, 30 Mar 2015 08:39:17 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:38469 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752705AbbC3MjQ (ORCPT ); Mon, 30 Mar 2015 08:39:16 -0400 Received: by wibgn9 with SMTP id gn9so127850619wib.1 for ; Mon, 30 Mar 2015 05:39:15 -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=hlMKO83ChKIFQCqpwsz5D89KG4jIfCKOUAClsVkHTAM=; b=LN7GNe/WKyDwYRISj92Fz2tz1JdVmdTqVNdDNaKsqaHROojnMSs2ZhCcC2awOv9jts Vs5aPyzWhe+UTZ3X5py97tBa1ALcmqVWJlJVsbBoMH4oUCPXc6S9tJp0Hpzn/4nEDFZm w8Wbu2ombWBit0xtROX5EYy8M+7KGUKxibBX6n37wVDrNxNE/9SSsddXkPBB71vUvCKt slo03N5ZokYD/ZIEVagmV9EwympO67ml5Yg/1HKyYuqT0RRP1H8mdL2ncVbvW/rCbh5+ PE85vHlsPNjnnXGmltig+gdCqXjyJ5OC3sy5dX0U4igK3hgWjVRamIHVL/V/gi3ePK7j UJWQ== X-Gm-Message-State: ALoCoQlJTtRni2IVVv3CjWbXtc/2wgiZlvVEipGxEbz93W8y8nnqCRAE/HBAiGetwLkbQwpkY5YI X-Received: by 10.180.82.9 with SMTP id e9mr22160867wiy.88.1427719155290; Mon, 30 Mar 2015 05:39:15 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by mx.google.com with ESMTPSA id ge8sm15570950wjc.32.2015.03.30.05.39.13 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 30 Mar 2015 05:39:14 -0700 (PDT) From: Michal Simek To: arm@kernel.org Cc: Zach Pfeffer , Nathan Rossi , Arnd Bergmann , catalin.marinas@arm.com, will.deacon@arm.com, Nathan Rossi , linux-kernel@vger.kernel.org, monstr@monstr.eu, Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH v3] kbuild: Create directory for target DTB Date: Mon, 30 Mar 2015 14:39:08 +0200 Message-Id: <9fdc43b280f2ad2e8887b63b341686254107f87d.1427719132.git.michal.simek@xilinx.com> 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 Acked-by: Will Deacon --- Changes in v3: - Add Will's ACK 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) ; \