From patchwork Wed Jan 20 07:06:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366960 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204375jam; Tue, 19 Jan 2021 23:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5Vi7l9vpveFlPNJ7Tj688itg8ORgbbGMy4ikxJZpXkkSnXEGszLGhx0ye7gZBNW+6th47 X-Received: by 2002:a17:906:578e:: with SMTP id k14mr1272008ejq.243.1611126584655; Tue, 19 Jan 2021 23:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126584; cv=none; d=google.com; s=arc-20160816; b=ETXJs98US92jEh8uzHqycdDLqVhxWT1rLUX9rh1sYwgYN8xMPPhDvnTdU0y+CVLzMG JJuClzajHVmS539bpr5fL00oLrv25Qn1Vtm1bjJ1VK5QSU/lzmvd8DUDgn0ab2RKTDgU sYNfgds/h4Y3OQmSdT1CDNeVyKpDiL8XzYUyJVZ+0Am/qvXA2QNSHeAdUK0y7e/jXLtA CfU3vdzHq1iL8URuhTnOlTky/l16rhkQ1ItqTR4wZwyXeyelImyfEE26CEBLfINcii/c ++1BnKLbC1v+jr2LI7qLEb9cIHEQ3JHqQg2cN3NLK69Ig8uxniWWpQm95mSAhGlWNz3x vpaA== 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=PYJHN29z38YJQy9+aRfXhxK7SVaDLVhX0WgONtRAors=; b=cQDiymYMWhFNbh+sIBbZtTtguLQgUUq7JHqt22wVYR4RpEwxex/DfZBwzobGeb+AjT bxRRJa2FZfwS6/9OEzBQqQTQNCftYLYCrFrXLr+kIO2KmBMjSd9NvkS0/ekSPhy6fXeT SGMwDyTe7IFK7EkH04C5AGkig4fN3rfqk55CCoy6s0gvgh4N1lTgYmvKoLJ+4udveMbm y6WRroGkov5BgMPrXbUtSy8mTUyXkJz2c3BE2/NawUL6imkm2iA9mrUB89B2gZlevwEo mvVtThcULPvXTMgNDDc7xfNVZ+av3zjiY5/hWgKqXI6+RsZt5THxJTQIpPWe7jAZcvFE zEdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c2S19u75; 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 hh2si401429ejb.627.2021.01.19.23.09.44; Tue, 19 Jan 2021 23:09:44 -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=c2S19u75; 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 S1728093AbhATHJJ (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728030AbhATHJC (ORCPT ); Wed, 20 Jan 2021 02:09:02 -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 17972C0613D6 for ; Tue, 19 Jan 2021 23:07:43 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id p18so14573985pgm.11 for ; Tue, 19 Jan 2021 23:07:43 -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=PYJHN29z38YJQy9+aRfXhxK7SVaDLVhX0WgONtRAors=; b=c2S19u75v9Chts0QzKMx+ZayKXIoNAlL8ZNL3dQyLlx3STuOpzebHm8DZqg1ADQi4X tQkAJpsSFnVkiU4O3W+lIDUNH4+ZgZg2jaIJl4iRr4C+6Z0nioL/8zVyD8moRU+Xkeaj NH76BrNCubz6XhRsPzTfuMZhfhipO1MoZQditsYpd7ppALsgjGALC33iMDONcHYylAWd e/y/VKma9J2vHDBeX7dg1C2R1ej9u3P4G2eVZfLkkytSd3N5UC5vo2lDvo0LQ+oL/I+k YNvRgEh9+i6XVkmBZXeCajH1xfaJSNxTLfozDVNzG6P4ZPjbcW4Rp7hre7l3AdtORYOI X3VA== 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=PYJHN29z38YJQy9+aRfXhxK7SVaDLVhX0WgONtRAors=; b=hmnUXGBloJLHFuBBTyW8f1zXfOc0yDT8pCpRj32x7GjWpbCjfTct8pWnNwjX88quZc xKgy5xrzCEEgSIOjyxu75thaoTpI0Hc2+IyQMdBjUAPx3sSLeMiDeHVfOE3+7ToRibdu 5gsuXzemf6Picn5/QDfmfT/ttzG3YPIBYOPW4MyZcregZMNpNpAAcOX+sXCpUSMnpvlb 5yI3n4AwCPgml8CJIsIiSN8D20wyV49MecnZ3CjlaAodOLT+Q3+qfkOvEGi/kPpPDniW CmaG28nDrtBjGP4IxCr8yRVdWr357icX2U4S80MqJKxLjeSoC2A1BvwSrvhsu0gTpU9x j8sg== X-Gm-Message-State: AOAM533BJRhISxclsIyH8T2Y5R8XmZEnEZI6Pbv4q9orpbhjjU/KuBV5 qvsAE7eQNVB4GjcJsnF/mYDYLQ== X-Received: by 2002:a63:1401:: with SMTP id u1mr7879221pgl.229.1611126462652; Tue, 19 Jan 2021 23:07:42 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id 17sm1146822pgy.53.2021.01.19.23.07.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:42 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou Cc: Viresh Kumar , Vincent Guittot , Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org Subject: [PATCH V5 1/5] scripts: dtc: Fetch fdtoverlay.c from external DTC project Date: Wed, 20 Jan 2021 12:36:43 +0530 Message-Id: <41f7158a707f20980e71a8d254c1d7aed84ad371.1611124778.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 fdtoverlay tool going forward. Lets start fetching it. Signed-off-by: Viresh Kumar --- scripts/dtc/update-dtc-source.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh index bc704e2a6a4a..32ff17ffd089 100755 --- a/scripts/dtc/update-dtc-source.sh +++ b/scripts/dtc/update-dtc-source.sh @@ -37,6 +37,7 @@ DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c 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" +FDTOVERLAY_SOURCE=fdtoverlay.c get_last_dtc_version() { git log --oneline scripts/dtc/ | grep 'upstream' | head -1 | sed -e 's/^.* \(.*\)/\1/' @@ -54,7 +55,7 @@ dtc_log=$(git log --oneline ${last_dtc_ver}..) # Copy the files into the Linux tree cd $DTC_LINUX_PATH -for f in $DTC_SOURCE; do +for f in $DTC_SOURCE $FDTOVERLAY_SOURCE; do cp ${DTC_UPSTREAM_PATH}/${f} ${f} git add ${f} done From patchwork Wed Jan 20 07:06:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366961 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204355jam; Tue, 19 Jan 2021 23:09:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzd2MnvI5rcn/0WCilHnAuGMlaPIhxnN9L28NC0UpIpvMYyDcBSi0qWIP6x7OKTw+HSo2gv X-Received: by 2002:a05:6402:134b:: with SMTP id y11mr6151859edw.88.1611126583084; Tue, 19 Jan 2021 23:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126583; cv=none; d=google.com; s=arc-20160816; b=pTT2ljDo8A+CYAnmpaxvegCT0onIx6mwPyqRn5d2QG+eQ4bhNdDxDKvrcrJ2o5N0Cv pqaA8yUYLPBcyzyVD9auQKf6xGZJL5ROZuiGB3epirRg97E8aafIgtLtx/jzluYPTUjF bM3EGSZ3fTbFcAahLeUVFjNrNMPjXUgoxmC0Qbj64kUH46cwBRmM+C03jpdkxsOzjJb+ m89YaTXuIgWfkGGj4F8Scl/WAyXSNcSOClkY+UeCMnfTANFMq7j4bRAaxz9a/EnekxRd 6+t4KjwF15DZWolVbKWXjxAh2018HqnPWDta6u8Ha9I157+itf7EZKLQlc6fg3l4qSLB eGhg== 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=Mj8NkcRMiBcX8enUu0QdAFt4QvkXJ54u28VgjHZrnr8=; b=w4/PFRxz3gp4fp1DgK55L8nLAqnmgn1bazhT1vNy5X6d68HqbgF4BCC361uYOz7gF4 wWQ1ZK0m0QPpasIKyN1zduQQ6uWs0irt0Q9HktfN8MQpT4l1xGSSAwSd3yK28nRsF+/r I7679/J1Q+OWcWG+CbFg0iYjOdp4QWWtkU80dmgZscpew+nauGQuYfWr/DNuf/ZcZH5t bdrIz5yFYYAWZuBWvUnpFnujqXh0MdxQcAP1iNFSUfwX+EuZwU3rf7K0JrZsSm/PtRWb IbXsxdLyRhJ2d8/6Q1H5OSSQ+WNOTW7GmcXD0nYmeF36G1k2Dc0KD2ZmTbK86YVZo6nH tPEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RCNvvfTp; 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 hh2si401429ejb.627.2021.01.19.23.09.42; Tue, 19 Jan 2021 23:09:43 -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=RCNvvfTp; 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 S1728181AbhATHJH (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbhATHJC (ORCPT ); Wed, 20 Jan 2021 02:09:02 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46FDCC0613ED for ; Tue, 19 Jan 2021 23:07:46 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id c132so14616685pga.3 for ; Tue, 19 Jan 2021 23:07:46 -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=Mj8NkcRMiBcX8enUu0QdAFt4QvkXJ54u28VgjHZrnr8=; b=RCNvvfTpxIdN/nNDfGHT1EcShTnBb7HFMbpIVOvEPPfcuiAHYkrYTnuq7rBrspS2gc PvxboNcM9aHa/GE7yejLB/Wr4HMsWKHzLvfFXD99uuMRqI9BxCU64HAehQ5AKT2l8/Nv ZZKXO35K9jIvLuLIUp5Dx2a2EkE0h74ujyg4fUSQ6kKL0AG0t6RxaPsYO9/xFcG4iOn5 d7u1rUGnow9POp8IBN9rOisee6bfnSrT37a9ft/fPBF+WZt5/y2AgoEBtqZdQOkBzCED vXoDy2QWo/bo+ws6aq+xe4uSpEzJOdanRA7WpSt3wRL5BuR/4njVAq5Uc7inIIOwESt/ Ku7w== 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=Mj8NkcRMiBcX8enUu0QdAFt4QvkXJ54u28VgjHZrnr8=; b=RlSqY7FmgISVRiCz6UgHw4crHaCK7g7tMlDWLZGGv69DXZRIAR1e2VDOqs064lOiet F535BBSL9UNagqWojxs3/8zcaFe863dy2BiIDnQmK2LhN23OpYrNMFNJ6EknrB8Dv77a Az1vaKDv7QGqQU4atbWJM5mbUAobIqDlWTHJ5j57YZEVbjzoaaE+7daugIGznWTMmAvH ILaJYOXh1xZkJKZpS96UBFrL+S7aIo5M1jdtvfGuT8JTehv/HjIWeALoMejYlq7I0u8C abi31dXq02AiYNAF5u2a5hGFSj4MH3n4SA0cblCKJsZGAJ3KGC/+kh2iidnIpxHU+igt W9jA== X-Gm-Message-State: AOAM533l5/CYF8DLxSCpdI52kyfmfiI2qg7eYBUGT3dFvY0vDZojk/sr XE7DtdLIpdGs8mG6rFWJOcft+A== X-Received: by 2002:a05:6a00:8d4:b029:1b7:7ad9:4864 with SMTP id s20-20020a056a0008d4b02901b77ad94864mr7762488pfu.34.1611126465763; Tue, 19 Jan 2021 23:07:45 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id x81sm1188873pfc.46.2021.01.19.23.07.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:45 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou Cc: Viresh Kumar , Vincent Guittot , Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org Subject: [PATCH V5 2/5] scripts: dtc: Build fdtoverlay tool Date: Wed, 20 Jan 2021 12:36:44 +0530 Message-Id: <2dfec4acb1bfbab08b431908ace0a77cc3279434.1611124778.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 fdtoverlay going forward. Lets start building it. The fdtoverlay program applies (or merges) one or 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 Wed Jan 20 07:06:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366962 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204433jam; Tue, 19 Jan 2021 23:09:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRENZ8aGp36oXaT7JGDHgbk1ghYaRmIQmSwBu2dERKAxF1dlaNszL2fUL9AoS+0EUHsR1W X-Received: by 2002:a17:907:da9:: with SMTP id go41mr5330367ejc.326.1611126588993; Tue, 19 Jan 2021 23:09:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126588; cv=none; d=google.com; s=arc-20160816; b=c4lSfI9O2EByoBNUSOMGEQLnh443MNEezqcAptMb9Ef2Re+9ZEBnVUR4kVzekeO98l WoyK6Rv/PPALnxgHNKZ4Je84RRO1vpQDF5/x384/0btjNY62rX/4CGU5gfqQdz0cJk4q dpQ17sZd9j1mURQjaao0p90f+LXfwsgDhfhvFQlR2e3fOi8y3mf3ALPyg3F0MPpQRzTN XsGUvSh32DuIA/2LvuWDtjFUX5VfjNYEt7CUwtShh2eTUYCIAyJrzblGsFnuJa5CBQQ5 v3+rbFal9l1+B3B0Q3cIua2NFVUD63VylFnlbsnvazhIQIyY4aTHHQ+DrvdN0ci30+wY mRhw== 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=yI9wyH+kjz5h6qj9/bPTTL9o3+EG/3nVgEeHiEiLkc83P4n0XG0DnkvvCxmVnZV4l3 mmg6K93d7DzZr4R59iiZFYdLAfW3cmc91vqR2nxwM84ny9McGy4hQGkJJm6zRj81zKFv tK2S+YDbFtat4kGJfENiqYcs2c6Elu+lsij3ypAvwE08nnA4EGmlKM8GHOUgAqaqsqcM FP0adcQxOjVJJM9aiW2mtiwwsPHB5BmyKhEF9UmYnUpIl8I7V+KRUvayne4eEfAfQI// MeYttumG3SgZs/N9NXp1cLL1s6+z7JkL7q7xJph234izcnpGUrULscRoIyrIE3Sx/BFt Hviw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="p121J/5G"; 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 hh2si401429ejb.627.2021.01.19.23.09.48; Tue, 19 Jan 2021 23:09:48 -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="p121J/5G"; 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 S1728275AbhATHJN (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728120AbhATHJC (ORCPT ); Wed, 20 Jan 2021 02:09:02 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E88DC061793 for ; Tue, 19 Jan 2021 23:07:49 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id l23so1617441pjg.1 for ; Tue, 19 Jan 2021 23:07:49 -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=p121J/5GsWmVdei7cT5XCaB6DnT64K+rfFzJkY39ir4WPYYzyq7KIO+Ugk7wQBADoB /4iIz9ubKkAsoSDacb7idNt0mGXFoXywGrxtHOJgGQZb1+9eEODzZHSDS6w2HsIKJ/2G ZJNYnAqTWppIIEFDD4WpVl63Ib0GoXFFxfRSxadg+h/oJ2pIG7QrKlcTGqLz4xXQ4rwE MiG4iR5jL4eyqFlKlI9ucth8ysBqSN+VLpTnwlbzfiFCb/tgnZJng/F1ywROa9Byou4a zN9d4/FFKwnFf6SyEJdKSgaORetLdCB3ixACy0uBcpIjBnL/+Krwbk8h4FZw3rQTI2hr BSaw== 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=LvQMDADSqRYi619jvQ//+qNAPJBrI7joNWHD+y9HCxqgx8mwZWdAv3V+w84aHU2qnl Rnx06pLVzVC47HTBJZAVxTsrGseuvA8rITJNygpV+MK2Umbxx7S+DyHEdgDaFN+GWlWU t4rb9Gd5XhlAPrFwZu1GWj3ldRY2/+NyZMNdXPQTdPn8Px+1LVh36j0SG9nWb7Zrc0M1 zn9Vjmgz5jb5rgX2XU2+Z3LZopbC28hql+s5L5fjykAMxfCMnyBxRwWsNfTLimB3k4Ie 1IwlvIOxQbwnnj+K9PHAvAPlBEzSEokhkTS1ykSQ+qD5A9Z+1I/88f2EF8znlcjwxoa4 TObA== X-Gm-Message-State: AOAM530XM8tXD7/UDFQ4iFGVVqFD8YARSTtmR9cuAj/+PeEqb+52JcJf TIvICBrJlvuIPlZjeDphQF56VA== X-Received: by 2002:a17:90a:d255:: with SMTP id o21mr4113781pjw.151.1611126468885; Tue, 19 Jan 2021 23:07:48 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id f29sm1128623pgm.76.2021.01.19.23.07.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:48 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou Cc: Viresh Kumar , Vincent Guittot , Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org Subject: [PATCH V5 3/5] scripts: dtc: Remove the unused fdtdump.c file Date: Wed, 20 Jan 2021 12:36:45 +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 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; -} From patchwork Wed Jan 20 07:06:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366963 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204467jam; Tue, 19 Jan 2021 23:09:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwznsacEdcNyWbvjWJXcQwAXEc/VH4cHeqew9vbfzHGG6ixolGohnGY9T3qZKGwoSi2zrFi X-Received: by 2002:a05:6402:1e5:: with SMTP id i5mr6491371edy.86.1611126592573; Tue, 19 Jan 2021 23:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126592; cv=none; d=google.com; s=arc-20160816; b=xsaARDybEWyB+H5lZpe1oL5d+7kChPLECCtInpvykHB/kazFIzNViOCOpfYqhEhPLz wNY4r24opc6+uV4AQ/IzxZUv7c5LbOYPLLobs+IvwfbD1tnThLPrR1/pWww0VvgqaOac DpdUCblMoROaj8BFHYFswxdDj4mYNOTSgi97ry2AcbNvmDaQ2zcr+takna/2QKa0qG1s x+e6aXg5zT+YtUp8N2tkzphQnwxdYPOFziHxGeJnaUBwGi3F8eDFejRM0Tueth81x0fx 8WihR7OozornYbf1MlOx2kLGWfRb461GF324cqj1D+GG9uELv5WavMOTfiKcPV8G3xPP AnZw== 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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=LkTjsHaUICwFa8aksdESVqpH4him9rTkEgQZ3fvu0r7pldGCe6xW1nZkSNnTGzCrzz tY19NZvE418lPBtTviBfx75viVafvcqF0t1iVi3vdK2QuIOQMnRe/2E8pLSzYdXwXoWx lSQTbhGDLoj4HXrotpwImWqkyL/lQFzgC9OeMQ2FPgUtEabKGRW9LnkV8LgPIfhsWqIh m4/RVbD3JNU5IUfrazM91KIW7PPx/5wFjbS4lihRGKnfQQTzip8cZh088rthOlpValHh F+kopIUXl5LM6LigH+53CxCHrjgqgdDI09df08eWh0jm8tC5utFiO1mZhtOhDi/m5KJY 1cpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u1UT6UUP; 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 hh2si401429ejb.627.2021.01.19.23.09.52; Tue, 19 Jan 2021 23:09:52 -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=u1UT6UUP; 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 S1728329AbhATHJU (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728240AbhATHJI (ORCPT ); Wed, 20 Jan 2021 02:09:08 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4233C061798 for ; Tue, 19 Jan 2021 23:07:52 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id g3so12024074plp.2 for ; Tue, 19 Jan 2021 23:07:52 -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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=u1UT6UUP4J+geMR4J7VLUSlL515tanP+PW1crkyEINjzX5/U3FJzPMKlUMsTMjThHO yWZk+i6yCayN7NPcNHMu4P0+cwmsyZFtLwDowjkd5ithO7yx+Eu6CbG2p2piMVrS5nzm 3JCzF9hhmZjRGnO06w0MtjKB4YIu2+P6Am73hcYmfAOsNkLgOPPFOMv47v09X2w+HH0X An2R6fdSe05RuPnYI1xYwUjhpKqdBfkm0zFWONQU3bnmcdKOqmPgRgHkCnaZm2p1ewoy ADIm3Io4b5TI+2Mx7eqjZlFU8AZ1PZcr1eJd6NOIGn7xMgBY+3zV4O6zSN9OV0xcIGLV NpvA== 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=iL/6d9CA7Mlv7x2jkzmEch3eouj1dsWSO4tRpX3owdI=; b=JiS2qYqgxsppF3nKckBXWlK3lX7ksniiiByzcY1IoEYMAeb/9vNVtz8xdwo1gIGHo7 B9dDiFjgbWWDiBaWdKICtOKWjC2EaWG8utIfP2A63sZgL1Os0tI+0rdjbpaYxXxsYhn+ 9maD2EMNZeATANMN+cBQFfxulA+/4I0NZykXotDmIIk/74dINl8pklhYdCbVoY5CgLJ/ 0iK750hJaD73kj88aKCj1sqlddKyLyshxzy97Ac24ZS6i0/unBzz8GEzxw8Y25CDzUGC bPjLEhfhc1n7fbf8TgTooou1wyuN0XtAJvQRIqQB9KRxOiW43mTpEi/j25cI3XWaPCQY 7/Bg== X-Gm-Message-State: AOAM530GFZ4eJjFW/u87uOQkc9/nihWw0VBrdkGKz27z7MKfn3vgobSA 4AwQigvsRaIujeP1BUDeyKnxqQ== X-Received: by 2002:a17:90a:9918:: with SMTP id b24mr4135202pjp.108.1611126472151; Tue, 19 Jan 2021 23:07:52 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id u12sm1098882pgi.91.2021.01.19.23.07.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:51 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou , Masahiro Yamada , Michal Marek Cc: Viresh Kumar , Vincent Guittot , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org, linux-kbuild@vger.kernel.org Subject: [PATCH V5 4/5] kbuild: Add support to build overlays (%.dtbo) Date: Wed, 20 Jan 2021 12:36:46 +0530 Message-Id: <6e57e9c84429416c628f1f4235c42a5809747c4c.1611124778.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 Add support for building DT overlays (%.dtbo). The overlay's source file will have the usual extension, i.e. .dts, though the blob will have .dtbo extension to distinguish it from normal blobs. Signed-off-by: Viresh Kumar --- .gitignore | 3 +-- Makefile | 4 ++-- scripts/Makefile.dtbinst | 3 +++ scripts/Makefile.lib | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/.gitignore b/.gitignore index d01cda8e1177..0458c36f3cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,7 @@ *.bz2 *.c.[012]*.* *.dt.yaml -*.dtb -*.dtb.S +*.dtb* *.dwo *.elf *.gcno diff --git a/Makefile b/Makefile index 9e73f82e0d86..b84f5e0b46ab 100644 --- a/Makefile +++ b/Makefile @@ -1334,7 +1334,7 @@ endif ifneq ($(dtstree),) -%.dtb: include/config/kernel.release scripts_dtc +%.dtb %.dtbo: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_install dtbs_check @@ -1816,7 +1816,7 @@ clean: $(clean-dirs) @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ \( -name '*.[aios]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '*.ko.*' \ - -o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \ + -o -name '*.dtb' -o -name '*.dtbo' -o -name '*.dtb.S' -o -name '*.dt.yaml' \ -o -name '*.dwo' -o -name '*.lst' \ -o -name '*.su' -o -name '*.mod' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst index 50d580d77ae9..ba01f5ba2517 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -29,6 +29,9 @@ quiet_cmd_dtb_install = INSTALL $@ $(dst)/%.dtb: $(obj)/%.dtb $(call cmd,dtb_install) +$(dst)/%.dtbo: $(obj)/%.dtbo + $(call cmd,dtb_install) + PHONY += $(subdirs) $(subdirs): $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 213677a5ed33..30bc0a8e0087 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -86,7 +86,9 @@ extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-) ifneq ($(CHECK_DTBS),) extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y)) +extra-y += $(patsubst %.dtbo,%.dt.yaml, $(dtb-y)) extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) +extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-)) endif # Add subdir path @@ -324,7 +326,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE +$(obj)/%.dtb $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE $(call if_changed_dep,dtc) DT_CHECKER ?= dt-validate From patchwork Wed Jan 20 07:06:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366964 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204483jam; Tue, 19 Jan 2021 23:09:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYmYlZ3Lvk7lKZ1MIovDIbtHDniKABGtRdks2CVi+u2ZZBcQgb05QvTc8zZHlq+B63W/F1 X-Received: by 2002:a17:906:a94:: with SMTP id y20mr5000154ejf.525.1611126594554; Tue, 19 Jan 2021 23:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126594; cv=none; d=google.com; s=arc-20160816; b=usv+TVi6Lxa0JmepwBSHxl2JdzJCi8UWD61JxIFq8hiq/nZV7MC/D7dD3CpLlN1hkz 6tB6n2ndzCLk03U6SpFa37CGpwsVaEQgGh6+5Rw5xEy5wnybQtVjPhvyS/2bj3hDWLOr yEhPJaFljmCgCl0HRuKdclQmHiX/NVpPWsA3XJhBgK+aTG2sFvtVT89B20MGMC5Ciel1 JPkPOOwtMdz8EZWbswtS2YuChzxpnNYz4pBVHRrBmAoibP2mtEkSR+vr9KRdcvC1KKqJ rgmITzYiz2Y/SB0k54FijXijv4u7WPfeyYk0+K5CV91G0SnVtgPWj71FF+BbzwkZjXJz +Sew== 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=k/Mp9fOS78Y/0IRdvug0VEaslDq+2Dzu5+PGexsJRwk=; b=YXX4KyPk0F5OjcSRD5bMDoURGlUZqjw5G3sbeRpFQ6MTEDvNi7f9y3O3EAstkKFaLr xbwTHMTXKsolGsoqv3K4B4/Cfs1ngpFQCMeBhyE0JqE0TwAMCGTTDTKe+25EvShCqSfU Yd6oTu3QpKHifNberVd86An4pmW32D6gXjppfadN28fvBgPou/UVI6P0xtlTx6UM092e migzBQ2mN8NknLMx+gdms2N+K/6yS1imKJ86JSUm0DKydf2y+CW+/xf/a9rXmqZGTdgR JlprKetAtlF1k/FE8USdQlBEzlSFK8kc1SvCMqbbYepjHTJCc/oSxIQ0AxCa+BNlwKEU glJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="t4z/jvbj"; 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 hh2si401429ejb.627.2021.01.19.23.09.54; Tue, 19 Jan 2021 23:09:54 -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="t4z/jvbj"; 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 S1728429AbhATHJp (ORCPT + 6 others); Wed, 20 Jan 2021 02:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728165AbhATHJE (ORCPT ); Wed, 20 Jan 2021 02:09:04 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFC49C06179B for ; Tue, 19 Jan 2021 23:07:55 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id t29so8816250pfg.11 for ; Tue, 19 Jan 2021 23:07:55 -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=k/Mp9fOS78Y/0IRdvug0VEaslDq+2Dzu5+PGexsJRwk=; b=t4z/jvbja90P87o9pl6tpF1ugjD+IDqHYndMLfkVDGqCv2rZ5AShl24QrtsPayujL3 gdrUufyj7xYAIVXOms+rIoPuJotKin8Pok1fyA79RMtI0QgJn1mHnPMTQeQymzylTjfJ ITWmWeM/jAY+T2Uq+wwybk/WTS5cIjqnq4b25KAEiu5TyTIuhX3Rf/gz1ZpPEiPGMuD6 mrghefXPS/SnkD56s+1FIu1Gq1mTRo6QvQqguCOjn0EZIW+VkwDyvZNlYNophSX6hVHL LPgl7QVnBViGsEYvGgh7jU4S8QkxlkKbQ6ygkAxsap92LQtoDHqngiSxzEPRf5ftPPeJ lf+w== 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=k/Mp9fOS78Y/0IRdvug0VEaslDq+2Dzu5+PGexsJRwk=; b=Z5IrvFXoVY9ebu11pOBSu4uySF2d1YdRSfaOo2wsUnA5FOmy0PNX6AjvsshS7i/UDy 9Wew5OaWu7CtkxpZtwRlOuIg0DHbfJ8YDQKOVq1WgRN/jgs9ms8SUz4cCPzWbpTth/gJ ThZm2kT9SR4YLR8kQyT/CAzjuYaO3+GQ5BGm57G6OSVifkbPJU9FFH8m1HbyjXV+CnoJ Mw+d+8VNunhEQOcUZGciw70PbFylyjpuxkeSKZuGS8Q6lPMt1cs90QeOVa9xj2u+NNMT QgEiWFt5zEflkOr6C3WyPd1VgKjaPWK9RXcdUAE+jA0rrOPX+W0P+Pk5OLa2MsjRWlSt iG0w== X-Gm-Message-State: AOAM533cdfu4pmkwdq6eliZR0YQPs1jaibnHhI9ClK6sMzkcX1GcXUXY PPG0pQvIErwTTIhthrVF/uTxyg== X-Received: by 2002:a63:d42:: with SMTP id 2mr2129450pgn.236.1611126475217; Tue, 19 Jan 2021 23:07:55 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id i62sm1154296pfc.150.2021.01.19.23.07.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:54 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou Cc: Viresh Kumar , Vincent Guittot , Masahiro Yamada , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, David Gibson , Bill Mills , anmar.oueja@linaro.org Subject: [PATCH V5 5/5] of: unittest: Statically apply overlays using fdtoverlay Date: Wed, 20 Jan 2021 12:36:47 +0530 Message-Id: <696c137461be8ec4395c733c559c269bb4ad586e.1611124778.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 Now that fdtoverlay is part of the kernel build, start using it to test the unitest overlays we have by applying them statically. Some unittest overlays deliberately contain errors that unittest checks for. These overlays will cause fdtoverlay to fail, and are thus not included in the static_test.dtb. Signed-off-by: Viresh Kumar --- drivers/of/unittest-data/Makefile | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile index 009f4045c8e4..ece7dfd5cafa 100644 --- a/drivers/of/unittest-data/Makefile +++ b/drivers/of/unittest-data/Makefile @@ -38,3 +38,53 @@ DTC_FLAGS_testcases += -@ # suppress warnings about intentional errors DTC_FLAGS_testcases += -Wno-interrupts_property + +# Apply overlays statically with fdtoverlay. This is a build time test that +# the overlays can be applied successfully by fdtoverlay. This does not +# guarantee that the overlays can be applied successfully at run time by +# unittest, but it provides a bit of build time test coverage for those +# who do not execute unittest. +# +# The overlays are applied on top of testcases.dtb to create static_test.dtb +# If fdtoverlay detects an error than the kernel build will fail. +# static_test.dtb is not consumed by unittest. +# +# Some unittest overlays deliberately contain errors that unittest checks for. +# These overlays will cause fdtoverlay to fail, and are thus not included +# in the static test: +# overlay.dtb \ +# overlay_bad_add_dup_node.dtb \ +# overlay_bad_add_dup_prop.dtb \ +# overlay_bad_phandle.dtb \ +# overlay_bad_symbol.dtb \ +# overlay_base.dtb \ + +apply_static_overlay := overlay_0.dtb \ + overlay_1.dtb \ + overlay_2.dtb \ + overlay_3.dtb \ + overlay_4.dtb \ + overlay_5.dtb \ + overlay_6.dtb \ + overlay_7.dtb \ + overlay_8.dtb \ + overlay_9.dtb \ + overlay_10.dtb \ + overlay_11.dtb \ + overlay_12.dtb \ + overlay_13.dtb \ + overlay_15.dtb \ + overlay_gpio_01.dtb \ + overlay_gpio_02a.dtb \ + overlay_gpio_02b.dtb \ + overlay_gpio_03.dtb \ + overlay_gpio_04a.dtb \ + overlay_gpio_04b.dtb + +quiet_cmd_fdtoverlay = FDTOVERLAY $@ + cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $^ + +$(obj)/static_test.dtb: $(obj)/testcases.dtb $(addprefix $(obj)/,$(apply_static_overlay)) + $(call if_changed,fdtoverlay) + +always-$(CONFIG_OF_OVERLAY) += static_test.dtb