From patchwork Tue Jan 12 08:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 361148 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp159907jap; Tue, 12 Jan 2021 00:30:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxCvt7j7G+rPMPO0Q2fuuAUjR6Sz2DM3zU0JSfsKAFnvIv91AcsaLhhU8VP9ZZ0w8IEbGk X-Received: by 2002:a50:e882:: with SMTP id f2mr2437125edn.76.1610440246105; Tue, 12 Jan 2021 00:30:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610440246; cv=none; d=google.com; s=arc-20160816; b=wTsHXB8968vg0IWiZSXlHZFXJLXC0BKIFj8Gti5g+TTLUbtXykSZ5MlKHyV1fpNwDU sYA4gDM2Ncaen5XcZqqhJIyXAM8JA17KD/AcZIB0gSzAhEOehV/6E9oy6fSSjdIH6DyL I7hplcOTK+KQUpfKku3uS18P2G96IXOSUfYzZt+bB0wVgmkEsoDFrrjGJmQT8dwdkM3h ferm20WDw8rd6XoiYGn6p9tn/F9LlEiOXDsSVS+l1bPyrWKZibb4qR/a3871r6YcUCrr HlwCXCPusWL7HvlR9+jttoinBbG6XfjfPA2u86JFr1bOBdzQRmPAMbe56nmEOU3+Xkpm 1jqw== 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=SfqrhXJQaqJjV61wcgC7ZOTiZJR50oZXFU0ulC256Rg=; b=STbO3dhSq6Kdwsh/XjkgHEYdrcqpjM/uE38yO0P8hfE8aq98K6HRf6vigEBP59Y0gw UTr4A1vCNx7L0awIQB5paxy6DWCnBeNGIrp8LTfrMVLasQffmUyGi+dymzdVBaEv4Rt0 4rejkzLDwTqTy7FstDdngxDQFWxJYPO1QMSAYLDb+mPimLs57/Gr2G8BzW940qDUwZsE E+meNAYyxOVbTSZgiyOg8nRQAYTNqFF06gqO59gCBmG6i+zgI26mlvs6XSeuK/gI9syc /kmS3oD34ezPAoq6oqTVOM2zlEqY5ngasFJkvj4NSf/P/hiIuLKgxRtGWOPCuQ9E1aqg 3PLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SSeKiG1+; 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 n8si808356eju.315.2021.01.12.00.30.45; Tue, 12 Jan 2021 00:30:46 -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=SSeKiG1+; 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 S2405122AbhALIaG (ORCPT + 6 others); Tue, 12 Jan 2021 03:30:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405109AbhALIaG (ORCPT ); Tue, 12 Jan 2021 03:30:06 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AACC9C0617A2 for ; Tue, 12 Jan 2021 00:29:12 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id c79so967649pfc.2 for ; Tue, 12 Jan 2021 00:29:12 -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=SfqrhXJQaqJjV61wcgC7ZOTiZJR50oZXFU0ulC256Rg=; b=SSeKiG1+oGN18d1S1UvrOUNw2yc6VlsVtOpm9dV6u77sKiqJRN6MtpyEKvFQ91QWJL VSWO9fxox36y9noWQm4jBkR2wlVkE72NXF1Sj45u0PJ/QLXcNyjRu5IeZWhsW1PZeQHG YxwOhVc3+j79pyiiUhhPM3fL0EA2rubMm+3ff6PkJWTEv+dzC7dbisYrRF4d2lL4h+fY rIm7X7BGkuywk+CNe+3jtWnEHslHChb4HFq9qJV3zEXEWtgrEjErf5OpOm7h8ltimaIR jvgkLAIUuK6MiLiNrleVFOJTmGuxjI+zkIKeX1tRdtAWcO7PxZAMKcl/cCvLZhfmPUJt 2JZg== 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=SfqrhXJQaqJjV61wcgC7ZOTiZJR50oZXFU0ulC256Rg=; b=rZyP1e1bjuA3Fci9ri/ECIIMJZ551w3F2CHcYg+SdVcs0CvqIYo0hUVCFf6Im0xF2+ sMgB8qIuedcx21T3/Q3J/oyCcyY+wIcFfBlZaBOD+3HSi0cIN//9ZBXjx7Y6eMsythhZ KfNRtX0xrtRlkQBhfJMAFfSwVvCv1+2f/MQz3dB/5eSTkj8n32Hk+dpSMmBi04DuYbkW ihRf4ETUbbeVa3Iwel/9jG6w1aNpwsK7sg/hR3nCD/BOA93D913sPwcwIzXOnViPV7lB /FXVOdNCTPFkqWGpVDub+yIOjEjSbjcFOmFqedtS0VYQVYA1gL3MkzOw1ujn3194VkFW mndw== X-Gm-Message-State: AOAM532ATXpvaf/rMRspVOCBryyDtP8Cl2StBUEmIu0/gedxu+dzEG7b fUqMKhUxw+yb5i+ghLh8KJXg2A== X-Received: by 2002:a63:1f18:: with SMTP id f24mr3684261pgf.133.1610440152283; Tue, 12 Jan 2021 00:29:12 -0800 (PST) Received: from localhost ([122.172.85.111]) by smtp.gmail.com with ESMTPSA id i2sm2244541pjd.21.2021.01.12.00.29.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2021 00:29:11 -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 V4 1/3] scripts: dtc: Add fdtoverlay.c to DTC_SOURCE Date: Tue, 12 Jan 2021 13:59:00 +0530 Message-Id: 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 fdtoverlay tool going forward. Lets start fetching it. Signed-off-by: Viresh Kumar --- scripts/dtc/update-dtc-source.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh index bc704e2a6a4a..f1c802011e1e 100755 --- a/scripts/dtc/update-dtc-source.sh +++ b/scripts/dtc/update-dtc-source.sh @@ -31,9 +31,9 @@ set -ev DTC_UPSTREAM_PATH=`pwd`/../dtc DTC_LINUX_PATH=`pwd`/scripts/dtc -DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \ - srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \ - dtc-lexer.l dtc-parser.y" +DTC_SOURCE="checks.c data.c dtc.c dtc.h fdtoverlay.c flattree.c fstree.c \ + livetree.c srcpos.c srcpos.h treesource.c util.c \ + util.h version_gen.h yamltree.c dtc-lexer.l dtc-parser.y" LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \ fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \ fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h" From patchwork Tue Jan 12 08:29:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 361149 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp159913jap; Tue, 12 Jan 2021 00:30:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJympC1ADkgnnGmSchSPdRzlwEeWq++lCDd1cgRwTqmgBy6kgOcbfOt/ExQPZW8AfqfQmkrS X-Received: by 2002:a05:6402:30ac:: with SMTP id df12mr2614796edb.175.1610440246857; Tue, 12 Jan 2021 00:30:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610440246; cv=none; d=google.com; s=arc-20160816; b=Qt3BxZVejRmFB3qV0sQpH82yDhBIZ9/S+i+2fNs3Oznei+5jh6sIuOO/mhculxiCRC OCn9LKew5G2H041lHGCT8ZwK80Q7I6ZB4cA/gb+yhHgyX7z3qFq/a2Pt0T3p+pbF+DZ2 /TLdxsT1PHogBqNzWRc0Tk0lsAHuWNYwon2AkMyvL3TnZteo9FkaH5XXsjuABhmRsZT6 zoJ/oyJYpn0Y+uqxdOnymYZCwBqcrPKpUBu9Hbur/AFyD/5zy4xq1VZYbQH71fP4caBx iGb9obcEiDxGFnDoqo4r8lrazu7Vm2DQxz6iu7axtE9uIYaEzGqSu4Ih/OZDEmA6AxfK VPfg== 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=R5AyTeEPJ4vRX5PQgPjGJ2ekXngPExcnmW5K8mA9ndI=; b=WNfxiQyv/MH4gztHnDt1kblDF7JX6GfZ6rELmFH1895CS72SLi/ZBhoyyEh+Y3gdM5 HFrSQomU588luWUp5nK9loBIH7R4R9cV0GmmWtKgx1RD0SISVbnSugqDNU+3qDsvoG3F fo2Po3odoieRDvJHTXQkZ4akhy3+XuaUDMd+WXn0tw4G4jGDWcHUK93UfojANqAItK0A PdwtqiyxS8NqI3hla3/FtS7B12Yy4tt/zMqi0H1eQS/HsEIvVitWAz6TxPfwKacYPfcr CE35bCdjfyohEVi3K0Zw6PoBOSOuSfoYW8C9TXJVnPMaENiJOeZD6L+Qnsc21Wh6mcDP sPFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HNBCP45u; 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 n8si808356eju.315.2021.01.12.00.30.46; Tue, 12 Jan 2021 00:30:46 -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=HNBCP45u; 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 S2405121AbhALIaa (ORCPT + 6 others); Tue, 12 Jan 2021 03:30:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731604AbhALIaa (ORCPT ); Tue, 12 Jan 2021 03:30:30 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C67C0617A4 for ; Tue, 12 Jan 2021 00:29:15 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id h10so948294pfo.9 for ; Tue, 12 Jan 2021 00:29:15 -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=R5AyTeEPJ4vRX5PQgPjGJ2ekXngPExcnmW5K8mA9ndI=; b=HNBCP45uMqAb3GYX1SPufcwilF/tFsFtyhEhjE2evQiVwZHQVWsYY7AZB49MMLxX6t hXp28EO9FPODeKvgpZZz8PvkjlWAm+0vkLRcXaGORIxWkkDxKl5JXWsOZaLXvG2gg01n /joKtPPF29ImmwZTNpGV5sHM5GZDGw9SLNiSwg5/habd551C13NN0huKn39AP7ckdjFB DKexvzeSRf9iYBGpYbXiRFEXbfeh1UzfvZab0P1gBdLCSVqoQWjNFpDsFa6rPqYI+0w1 W+GyYmeAUickV3otbA6csurB1Cht5sncN58JPYGsRG0nLf+wTbeEf0tinMuwF3iKXpqu 3y6g== 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=R5AyTeEPJ4vRX5PQgPjGJ2ekXngPExcnmW5K8mA9ndI=; b=DA8X3KvMabWr3cBvniPq5l+IqeQa/op/SJB7sWhPMJ+/IDazV3dw+5mMYNiE6tK9M7 KHIbnMEm32AIcmlE7qvtTde5t9nfQ6rjqFWjQORwtej1g3uA9ykrlWhyOss5t8pgkz16 stWNimcNvE5ntvRCFR0yPF5bdESsz40oVbQ60b8yZ3aM0AJiUEQETxgha31k6KR2fpym pBVyL1MWgw5hyLPbZdL+Jya5INWE32PQxmJles9yf4+6NoHODoLTn2QaJEPhJCI6WxV8 h0fxTJPxeG9WT0ISnVd6jN2fqB0nSLdL/VKz5Z8xBIuEU7uzAFGzxQHF44o1NUFQgaic hESg== X-Gm-Message-State: AOAM533yA9GxII9gXcU3LtT/v52XdipRXvIyf/yICA6VMkYFw7pcUpfM kmdD/46tjCpshhUQxVDtc8Gg3g== X-Received: by 2002:a62:7b86:0:b029:19d:f996:44f3 with SMTP id w128-20020a627b860000b029019df99644f3mr3562196pfc.65.1610440155263; Tue, 12 Jan 2021 00:29:15 -0800 (PST) Received: from localhost ([122.172.85.111]) by smtp.gmail.com with ESMTPSA id i67sm2258873pfc.153.2021.01.12.00.29.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2021 00:29:14 -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 V4 2/3] scripts: dtc: Build fdtoverlay tool Date: Tue, 12 Jan 2021 13:59:01 +0530 Message-Id: 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 fdtoverlay going forward. Lets start building it. 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. Signed-off-by: Viresh Kumar --- scripts/dtc/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 4852bf44e913..5f19386a49eb 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -1,13 +1,17 @@ # SPDX-License-Identifier: GPL-2.0 # scripts/dtc makefile -hostprogs-always-$(CONFIG_DTC) += dtc +hostprogs-always-$(CONFIG_DTC) += dtc 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 +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 From patchwork Tue Jan 12 08:29:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 361150 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp159917jap; Tue, 12 Jan 2021 00:30:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyegHL3H57uzh6T0a5ZD5AXyLPuoApKMJZ1S1Cdap2ymeZiFiAYzild12TlXbkfFJ5+8W00 X-Received: by 2002:a50:ed04:: with SMTP id j4mr2593817eds.84.1610440247218; Tue, 12 Jan 2021 00:30:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610440247; cv=none; d=google.com; s=arc-20160816; b=RRM4aKdYGEscOauUu6woXGl/wjPwmzhRIq2vUFEA59Y93CmwKaECd0iL5wtolnK1uq MWPGS0itrPU7jeBtUnNAJRtq2DgXpXjrjP4GGn3zJGFcCsgukwQIPscpeOsSwYrYWBsu ARSWHDj80PyzUjB42G9PeQrow+x/i81gWAOYolukr4gXDKyrqEcTbpXM9Kv8HdCf/2MR tOg57WaSrcZHcuEMS69ojEwUmBOyUlex08oHgoHZHuc4VDs5GwEQusJCkFzeP75wjAzN oqd6sgbFflWZsI4q/aNLgIWVto1U24lI1z1KBaXB6y1EhAA+d4mTquKC05ZZPvQ+3MYO By1Q== 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=9FnCdmEEGSQX+RKqefc8hvZ3CGNJpcGjSObBIm4DdhU=; b=Mtt1GUKWWqbOFQuUbbs1ITTthSnQjr2xO48uQIgOOA++puAw0RYc+SlaodrMfiMlgB /Qxy+kpzVXXD5Pospi9rMlk7oD+o+VPBYIjDR/HQVNMNlPpBebVb76vUd4eYbNnLFJtt LOPubaklIhu1YKUj8b1aQakVVE1oJJhrFfwFUmxYJDb39/i7/mS7odr8EILI+J8/vPcP FylBkCgt0NLUVlhOqYvYiCG3G8bj7iYabjMS4EFxN5CuXpRFWlwUAdypqpHz4XIeOxfW KGNBkVf+i1V/Ef36J7SNM9yNYUwNVDqonszNOAa5UY/nbUsQMjyuuBPDpAKLEDo75uvs jIiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hrulJ76T; 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 n8si808356eju.315.2021.01.12.00.30.47; Tue, 12 Jan 2021 00:30:47 -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=hrulJ76T; 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 S2405242AbhALIab (ORCPT + 6 others); Tue, 12 Jan 2021 03:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405109AbhALIaa (ORCPT ); Tue, 12 Jan 2021 03:30:30 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E5AC0617AA for ; Tue, 12 Jan 2021 00:29:18 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id i7so955220pgc.8 for ; Tue, 12 Jan 2021 00:29:18 -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=9FnCdmEEGSQX+RKqefc8hvZ3CGNJpcGjSObBIm4DdhU=; b=hrulJ76Tv91s7SpdhYOy9jmlFw1Fhw/qiYTAMrHBR79CBwvq6sAzjtxv5hEnUF1yXq Vn+MH/2OzfXdLH4R5B1XZsBVJ0NF9pFu4OqX5CCiPhTgaxCnUygFwsq6cQb8M69Z2dyK pD/Lzt2kiEq0cmqq31x5zlDCPAzScU/o7M6hec8Aw2HP2CX98MfZStjEgwGw+Ly7W0IU CPle+X0NZ6EvnErCZiFMbIneBrc1cWVTjm5Q7QflQ0bGrMRX8nbv5UcU812AzKU6r9DB idwrnlwnDMOYRaKg9IqNcNJuMCcT0M54mgFiZECjX7MzThKAJwsDMQU/xzBhUrkscUMS GU4A== 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=9FnCdmEEGSQX+RKqefc8hvZ3CGNJpcGjSObBIm4DdhU=; b=jVQnp4IWe757Svh5KWGIOJk3NM2P6sikHkVPUMpYX6q/gZdoMQxl3KD3MiebpNaRdw B/GOJfiePhhGlYxFgznoEh6Z3JB4S4yEsT46AYry4iGy1F8UQGLeF/JrhadrKvOEDePn zU+12resP3qL9d5nqiIJpFC9oYQzUMUwzJFHbOQ6k3ryxabHraxu9jwt8v7HDPfUF7BD KhDbYaVQxLu4S6fXTd6uM4YZWJMsVdm30NerqK5VxPL/NY2SIGKnFnut/ijx0n/VQnR4 0nNbxiBu8Z3i0Vyb/wmU/0yPsMpX+fxE4Ql9ayAUxWw9bAiirYwtofpvd+4FpjoKdY6r MLOg== X-Gm-Message-State: AOAM533wgRkgckSXkOXWG87vfrPNWZbQ3J9ECrT2yYyTvFE5N79WPjmv AOLU5qz3AVPMCunI4g/H6Kh2nA== X-Received: by 2002:aa7:843a:0:b029:19d:b279:73c9 with SMTP id q26-20020aa7843a0000b029019db27973c9mr3843688pfn.3.1610440158277; Tue, 12 Jan 2021 00:29:18 -0800 (PST) Received: from localhost ([122.172.85.111]) by smtp.gmail.com with ESMTPSA id t7sm2143478pfe.179.2021.01.12.00.29.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2021 00:29:17 -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 V4 3/3] scripts: dtc: Remove the unused fdtdump.c file Date: Tue, 12 Jan 2021 13:59:02 +0530 Message-Id: <25d98b2fe9bea3fe784f8392a73b88a253c8b97a.1610431620.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 This was copied from external DTC repository long back and isn't used anymore. Over that the dtc tool can be used to generate the dts source back from the dtb. Remove the unused fdtdump.c file. Signed-off-by: Viresh Kumar --- scripts/dtc/fdtdump.c | 163 ------------------------------------------ 1 file changed, 163 deletions(-) delete mode 100644 scripts/dtc/fdtdump.c -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/fdtdump.c b/scripts/dtc/fdtdump.c deleted file mode 100644 index 7d460a50b513..000000000000 --- a/scripts/dtc/fdtdump.c +++ /dev/null @@ -1,163 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * fdtdump.c - Contributed by Pantelis Antoniou - */ - -#include -#include -#include -#include -#include - -#include -#include - -#include "util.h" - -#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1)) -#define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) -#define GET_CELL(p) (p += 4, *((const uint32_t *)(p-4))) - -static void print_data(const char *data, int len) -{ - int i; - const char *p = data; - - /* no data, don't print */ - if (len == 0) - return; - - if (util_is_printable_string(data, len)) { - printf(" = \"%s\"", (const char *)data); - } else if ((len % 4) == 0) { - printf(" = <"); - for (i = 0; i < len; i += 4) - printf("0x%08x%s", fdt32_to_cpu(GET_CELL(p)), - i < (len - 4) ? " " : ""); - printf(">"); - } else { - printf(" = ["); - for (i = 0; i < len; i++) - printf("%02x%s", *p++, i < len - 1 ? " " : ""); - printf("]"); - } -} - -static void dump_blob(void *blob) -{ - struct fdt_header *bph = blob; - uint32_t off_mem_rsvmap = fdt32_to_cpu(bph->off_mem_rsvmap); - uint32_t off_dt = fdt32_to_cpu(bph->off_dt_struct); - uint32_t off_str = fdt32_to_cpu(bph->off_dt_strings); - struct fdt_reserve_entry *p_rsvmap = - (struct fdt_reserve_entry *)((char *)blob + off_mem_rsvmap); - const char *p_struct = (const char *)blob + off_dt; - const char *p_strings = (const char *)blob + off_str; - uint32_t version = fdt32_to_cpu(bph->version); - uint32_t totalsize = fdt32_to_cpu(bph->totalsize); - uint32_t tag; - const char *p, *s, *t; - int depth, sz, shift; - int i; - uint64_t addr, size; - - depth = 0; - shift = 4; - - printf("/dts-v1/;\n"); - printf("// magic:\t\t0x%x\n", fdt32_to_cpu(bph->magic)); - printf("// totalsize:\t\t0x%x (%d)\n", totalsize, totalsize); - printf("// off_dt_struct:\t0x%x\n", off_dt); - printf("// off_dt_strings:\t0x%x\n", off_str); - printf("// off_mem_rsvmap:\t0x%x\n", off_mem_rsvmap); - printf("// version:\t\t%d\n", version); - printf("// last_comp_version:\t%d\n", - fdt32_to_cpu(bph->last_comp_version)); - if (version >= 2) - printf("// boot_cpuid_phys:\t0x%x\n", - fdt32_to_cpu(bph->boot_cpuid_phys)); - - if (version >= 3) - printf("// size_dt_strings:\t0x%x\n", - fdt32_to_cpu(bph->size_dt_strings)); - if (version >= 17) - printf("// size_dt_struct:\t0x%x\n", - fdt32_to_cpu(bph->size_dt_struct)); - printf("\n"); - - for (i = 0; ; i++) { - addr = fdt64_to_cpu(p_rsvmap[i].address); - size = fdt64_to_cpu(p_rsvmap[i].size); - if (addr == 0 && size == 0) - break; - - printf("/memreserve/ %llx %llx;\n", - (unsigned long long)addr, (unsigned long long)size); - } - - p = p_struct; - while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) { - - /* printf("tag: 0x%08x (%d)\n", tag, p - p_struct); */ - - if (tag == FDT_BEGIN_NODE) { - s = p; - p = PALIGN(p + strlen(s) + 1, 4); - - if (*s == '\0') - s = "/"; - - printf("%*s%s {\n", depth * shift, "", s); - - depth++; - continue; - } - - if (tag == FDT_END_NODE) { - depth--; - - printf("%*s};\n", depth * shift, ""); - continue; - } - - if (tag == FDT_NOP) { - printf("%*s// [NOP]\n", depth * shift, ""); - continue; - } - - if (tag != FDT_PROP) { - fprintf(stderr, "%*s ** Unknown tag 0x%08x\n", depth * shift, "", tag); - break; - } - sz = fdt32_to_cpu(GET_CELL(p)); - s = p_strings + fdt32_to_cpu(GET_CELL(p)); - if (version < 16 && sz >= 8) - p = PALIGN(p, 8); - t = p; - - p = PALIGN(p + sz, 4); - - printf("%*s%s", depth * shift, "", s); - print_data(t, sz); - printf(";\n"); - } -} - - -int main(int argc, char *argv[]) -{ - char *buf; - - if (argc < 2) { - fprintf(stderr, "supply input filename\n"); - return 5; - } - - buf = utilfdt_read(argv[1]); - if (buf) - dump_blob(buf); - else - return 10; - - return 0; -}