Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1600883pxb; Thu, 28 Jan 2021 23:29:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJx23qSLJ5CAC/sHW1n0nkTjNtq+/+8DDO2mjoQc8617uZPbnhA2YBihDFqDpFXEafuhlKjl X-Received: by 2002:a17:906:5ad0:: with SMTP id x16mr3269625ejs.135.1611905350259; Thu, 28 Jan 2021 23:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611905350; cv=none; d=google.com; s=arc-20160816; b=gDVUwjKxOqbg41Eo0n8bih6NJr+MjgzmYugAxYpgJtxAYPu0PumsubuA2zNpDICdXM jsQJsrFk/cOwZO7OLuMaadGN1Y6Z064bPia+uVONwUFE723HUITSVVu0GlOnlzo9hnDp C8oYIpV783aBgmYe3FL2P994gGG3kn7VVSWWBIo230YcZ6K2/8eKpUpt+UTMqRov2j1J VBNrBLygKGZ+IdAIarf3eSsLcMxuaqT1W2GDt69Hg+sfS5Dgf5QvKmp5YbR23DMyA4e7 F968Sr9qdmWDBJe0Nwd+VNWWyzJq15HfSDut78R6eM43GugBLDd3cDrHzghjPixA81ho sXOQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=XoPaMVURm5bRi8Ttr7dF9SUUqibbHGdovvNFGhRlDUo=; b=qAEIwII4S56tQ6vfVaDxKBnZ1IS1ukNmiviwlk8VFADTtRT3ugJK3n+2XOjJnTiFRN g37DafH7BRflnBtC+T2tEdUiJESGH8KjFShnVgm0ON2Yhn4iaeLXUU8EeEQ/tVxkYPmw vYJDpLZcRvycXutJ1c52yRzQwdt/Y3d18TOFwovliQT0ohj/41kOEl8Ngq94oTFsjFbi jfe+wUxOz8yH+J/rQrw46gIAhR11VWnWjTdvkioWlOkA/49sdvc8WkB1q92oGz0flaLM JWNGJygeux8JgiFjI6JEMkPO1nUvX4K2+xJCR95IJ5M0WTwyO3BCsFHT+dBScY/Tyjk3 rwJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cpWA9C59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 z22si4345926ejr.655.2021.01.28.23.28.45; Thu, 28 Jan 2021 23:29:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=cpWA9C59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S232051AbhA2H2O (ORCPT + 99 others); Fri, 29 Jan 2021 02:28:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232020AbhA2H2N (ORCPT ); Fri, 29 Jan 2021 02:28:13 -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 3C0B5C06174A for ; Thu, 28 Jan 2021 23:27:33 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id y10so518263plk.7 for ; Thu, 28 Jan 2021 23:27:33 -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:mime-version :content-transfer-encoding; bh=XoPaMVURm5bRi8Ttr7dF9SUUqibbHGdovvNFGhRlDUo=; b=cpWA9C59QBUyKAMI1fRhLyF+pmGzsfi7Lqq+UcJ1wiW+DN78Ij91odl5ALsMoIEQBN hfVInKG9FSoCSU7kEYoaz8clgP7TPkHzxxla5l4hH9EjdbS2IpqAgHiD1BiACIU7uOsu EXnfYY76OsR405imsMbuKyi6wCszHklV73Eh59xzpHvq0HHOqU+ulLs4DUqSbj1VCI6u J3AV6cyG2haHBCFjx8cDTwiD6wAoo1sPFQCmnm+TYlvHoo5h8NHwo1ezdIFnKhn5O50Y JLSLhwD19LJ1zG50IWjRbDfjWFU6u2dgNG2gtOSG9FYGXodVOPAGdeB8lfOAgXdNJV4z b2dg== 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:mime-version :content-transfer-encoding; bh=XoPaMVURm5bRi8Ttr7dF9SUUqibbHGdovvNFGhRlDUo=; b=uY/lvHxCOVfRP0P7qs5juFRN9fpQ1g7wJYezuMiufeFIYCzvUUCUFdhukovIum9uef izzDLNaM3yKFjD71fKlweHVL6hChCSZRU66XC8gzgoTt1xwfVE6WlL1vPjmGmojfP+vv AxS4hrXXKclx46t50IcH3mTkeRzD8xGg5/wj71NW2A5ikbcverv+slQO+YjUnoJg7AxM p501Qyl4bweKkUz9UV8p0ObA9leOJYuDFd+CXXaHqkJG127KvpWULR6NJdMkxXFzIhxh s7aLi4NPdkRvsXwgwC+5k9O6yBHnLZN4vnD5mV56l+xPF6qixo+97X+4/oKcekvIxrR/ gvvQ== X-Gm-Message-State: AOAM533WsRjPvzCwzmNTX/b0hpYxReVeKtQk1HSl40/Alb9gnpri56EZ NX18yDCqThDL6129pQk6dFkKRA== X-Received: by 2002:a17:902:b40c:b029:df:e75a:711b with SMTP id x12-20020a170902b40cb02900dfe75a711bmr2944772plr.75.1611905252639; Thu, 28 Jan 2021 23:27:32 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id v16sm7559737pfu.76.2021.01.28.23.27.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2021 23:27:31 -0800 (PST) From: Viresh Kumar To: Frank Rowand , Rob Herring , Pantelis Antoniou , Masahiro Yamada , Michal Marek Cc: Viresh Kumar , Vincent Guittot , linux-kernel@vger.kernel.org, anmar.oueja@linaro.org, Bill Mills , David Gibson , devicetree@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH V7 0/6] dt: build overlays Date: Fri, 29 Jan 2021 12:54:04 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This patchset makes necessary changes to the kernel to add support for building overlays (%.dtbo) and the required fdtoverlay tool. This also builds static_test.dtb using most of the existing overlay tests present in drivers/of/unittest-data/ for better test coverage. Note that in order for anyone to test this stuff, you need to manually run the ./update-dtc-source.sh script once to fetch the necessary changes from the external DTC project (i.e. fdtoverlay.c and this[1] patch). I have tested this patchset for static and runtime testing (on Hikey board) and no issues were reported. V7: - Add a comment in scripts/dtc/Makefile - Add Ack from Masahiro for patch 4/6. - Drop word "merge" from commit log of 2/6. - Split apply_static_overlay, static_test.dtb, and static_base.dts into two parts to handle overlay_base.dts and testcases.dts separately. V6: - Create separate rules for dtbo-s and separate entries in .gitignore in 4/6 (Masahiro). - A new file layout for handling all overlays for existing and new tests 5/6 (Frank). - Include overlay.dts as well now in 6/6 (Frank). V5: - Don't reuse DTC_SOURCE for fdtoverlay.c in patch 1/5 (Frank). - Update .gitignore and scripts/Makefile.dtbinst, drop dtbo-y syntax and DTC_FLAGS += -@ in patch 4/5 (Masahiro). - Remove the intermediate dtb, rename output to static_test.dtb, don't use overlay.dtb and overlay_base.dtb for static builds, improved layout/comments in Makefile for patch 5/5 (Frank). -- Viresh [1] https://github.com/dgibson/dtc/commit/163f0469bf2ed8b2fe5aa15bc796b93c70243ddc [2] https://lore.kernel.org/lkml/74f8aa8f-ffab-3b0f-186f-31fb7395ebbb@gmail.com/ Viresh Kumar (6): scripts: dtc: Fetch fdtoverlay.c from external DTC project scripts: dtc: Build fdtoverlay tool scripts: dtc: Remove the unused fdtdump.c file kbuild: Add support to build overlays (%.dtbo) of: unittest: Create overlay_common.dtsi and testcases_common.dtsi of: unittest: Statically apply overlays using fdtoverlay .gitignore | 1 + Makefile | 5 +- drivers/of/unittest-data/Makefile | 56 ++++++ drivers/of/unittest-data/overlay_base.dts | 90 +--------- drivers/of/unittest-data/overlay_common.dtsi | 91 ++++++++++ drivers/of/unittest-data/static_base_1.dts | 4 + drivers/of/unittest-data/static_base_2.dts | 4 + drivers/of/unittest-data/testcases.dts | 18 +- .../of/unittest-data/testcases_common.dtsi | 19 ++ .../of/unittest-data/tests-interrupts.dtsi | 7 - scripts/Makefile.dtbinst | 3 + scripts/Makefile.lib | 5 + scripts/dtc/Makefile | 8 +- scripts/dtc/fdtdump.c | 163 ------------------ scripts/dtc/update-dtc-source.sh | 3 +- 15 files changed, 204 insertions(+), 273 deletions(-) create mode 100644 drivers/of/unittest-data/overlay_common.dtsi create mode 100644 drivers/of/unittest-data/static_base_1.dts create mode 100644 drivers/of/unittest-data/static_base_2.dts create mode 100644 drivers/of/unittest-data/testcases_common.dtsi delete mode 100644 scripts/dtc/fdtdump.c base-commit: 6ee1d745b7c9fd573fba142a2efdad76a9f1cb04 -- 2.25.0.rc1.19.g042ed3e048af