From patchwork Thu Jan 7 06:25:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 358156 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp55505ejs; Wed, 6 Jan 2021 22:26:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJynKJacLW1IMDXJjZXoFDPvYwiqheC0B2x/m1p95rkRTE4NnxGNd9MJNdLTnoKs/00/urjF X-Received: by 2002:a17:906:451:: with SMTP id e17mr5107747eja.228.1610000777292; Wed, 06 Jan 2021 22:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610000777; cv=none; d=google.com; s=arc-20160816; b=FAg0Zh7WgKMxEhT3DzJK7sim/C0tmw6LpXBs6R0AKc7Rwsl+xgPD6MJeCDPFnYnaaX L6ISSFf9uQt7DJyfdjQthhy/NYZS45oByD8Kbn6Px0a1jiAHroPdPcSGR7fiXCIRylk5 MnsOJe/B5Kj0pBZgqdwgRDY9uyuTV3z7QuYJaeDq3s/hPiYU/LDeQf37+f67oKIPYaBL WDOoPOXN+uqDPmxhXlTb2zBTL7TM9F/uvTtcdngWIe7d57nbKmPGw0O7RXR2PL31Audu 9xjhC0lBjQhozVEhTkQ4xlfk1eLDtUwPIX+27KTQ8D1/LS6Qm6awpTiuHaEm28b30/go on5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=v2Yn25XHl+ymzY6Sqqp8UyYBl8VsyNvH90saFA5KVqE=; b=KRftu1HzVeDXnU/ah8Y/farEwd0EZUrI/LH4uyOiSwtNrS5FxTp75n3OaMrwjy7KQM SwWJmUmNGlwoje30js2WpBzwHUd4UnNjZRNuvtkWP0wYts6bx7El1hOAQnXDg0vY3DGH LuHDoBy4VgfPQbQMMp7SPO6+lcouXE/oNz04JYkoBAZHUetDbP/JMfIsi/xP0cgmdHnQ DkFoRti8/wKKpg+QRuDPkQXygME35a+dE0g5cKcj2PTCV2eL8ZESSkHjfTjxwnRTMckz /q3PAvtS40DP+Ia/hPMZq8lgO/CHtzJRwDf15Qkrn870TurgNM2rY2x9yg/6GwmR/CWp lZxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CFWiH0vH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp33si1873512ejc.250.2021.01.06.22.26.17; Wed, 06 Jan 2021 22:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CFWiH0vH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbhAGG0Q (ORCPT + 6 others); Thu, 7 Jan 2021 01:26:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbhAGG0P (ORCPT ); Thu, 7 Jan 2021 01:26:15 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6ADAC0612F5 for ; Wed, 6 Jan 2021 22:25:35 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id s21so3225203pfu.13 for ; Wed, 06 Jan 2021 22:25:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v2Yn25XHl+ymzY6Sqqp8UyYBl8VsyNvH90saFA5KVqE=; b=CFWiH0vHlQlCWzZ6uoudGfqkjTG6FuRGE+oehRL8JLVPg5kEFaayNmKPJDaKYSepwx asWdl+k4sLZZUf40Llz/JCQQbEIZVILztGZmUoEPJRvHLGIYlulJg3hv1GdYzibEYH3+ OL8cdUaVgPMbhN/hBw+MDKfIgOPdsVzbOCeuuPMPpxRCcyqr3hAGRsVesIs1HYQ8gP8p dZz7FsHBlYNDXRuARxZNoRr4lznWhNGrTPuhbBAHugkyY4IwOPZO+LJh8qzCFusu39eD XcDUUvVWe2uiJ52FRDUv8/T0Hurmx+uAHKsQU3s5RMbVBpCP3vOUQGtxMNFrDRf9yCXL dBVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v2Yn25XHl+ymzY6Sqqp8UyYBl8VsyNvH90saFA5KVqE=; b=XtJh5mJjSd1ayO7R7UJHQzzUa2w915rtQjeIfi7IG6pASMreNMJQDKrbiApkNsh2PL ybEfRlHJG9mtAxLRqtNsTq+wTkmusOMtAULgeWKe8ogrS5GmMFSyhshjzGCSk1Qlsrfq z5LKh1q+gKIv9gkJTz7ewPjjOHMt3BzzhCp5rF67U41iWSZBXmL6HypGv57oUYzqQNBd D/GBn+VKJC97N16EgKcKE40Z4l8bjrPwFk0/I5wkVwJPIuxps+I7/Z7XxmaZDVp09y0p RYL8UWLdvdXZHkxkeS34XQ4qBvLzbQ7wx4JnldWU+wHwO499JQRrKeDw1lMHWBtch7qV 5PRA== X-Gm-Message-State: AOAM533hmDQQJyA7uheT9Av2LviRjS/psU/9lQ2AIuQezyVuHJVFWaCk H/+vcstpGci4PrMhild/lzC0/g== X-Received: by 2002:a63:8c15:: with SMTP id m21mr355344pgd.396.1610000735086; Wed, 06 Jan 2021 22:25:35 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id n4sm4326020pfu.150.2021.01.06.22.25.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jan 2021 22:25:34 -0800 (PST) From: Viresh Kumar To: Pantelis Antoniou , Frank Rowand , Rob Herring Cc: Viresh Kumar , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Vincent Guittot , Bill Mills , anmar.oueja@linaro.org, Masahiro Yamada Subject: [PATCH V3 2/2] scripts: dtc: Build fdtoverlay and fdtdump tools Date: Thu, 7 Jan 2021 11:55:10 +0530 Message-Id: <72c3a4f63dde3c172c11153e9a5b19fb6cdb4498.1610000585.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org We will start building overlays for platforms soon in the kernel and would need these tools going forward. Lets start building them. The fdtoverlay program applies (or merges) one ore more overlay dtb blobs to a base dtb blob. The kernel build system would later use fdtoverlay to generate the overlaid blobs based on platform specific configurations. The fdtdump program prints a readable version of a flat device-tree file. This is a very useful tool to analyze the details of the overlay's dtb and the final dtb produced by fdtoverlay after applying the overlay's dtb to a base dtb. Signed-off-by: Viresh Kumar --- V3: - Updated log - Remove libfdt_dir scripts/dtc/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 4852bf44e913..472ab8cd590c 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -1,12 +1,17 @@ # SPDX-License-Identifier: GPL-2.0 # scripts/dtc makefile -hostprogs-always-$(CONFIG_DTC) += dtc +hostprogs-always-$(CONFIG_DTC) += dtc fdtdump fdtoverlay hostprogs-always-$(CHECK_DT_BINDING) += dtc dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ srcpos.o checks.o util.o dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o +fdtdump-objs := fdtdump.o util.o + +libfdt-objs := fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o +libfdt = $(addprefix libfdt/,$(libfdt-objs)) +fdtoverlay-objs := $(libfdt) fdtoverlay.o util.o # Source files need to get at the userspace version of libfdt_env.h to compile HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt