From patchwork Fri Jan 29 07:24:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 373278 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1953307jam; Thu, 28 Jan 2021 23:29:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSxkuGhXkHFEIETTNBM+wDMEhIrw/rQ/l0CXCqTNQmfG7eTQMePML6CTgz7LXz010zEh7x X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr3738346edb.259.1611905373350; Thu, 28 Jan 2021 23:29:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611905373; cv=none; d=google.com; s=arc-20160816; b=vGG88sQtsHfv8+Oof2DhynWl+JUP+i8fPIgAkuUCiQtzE8xp1pvn4ZJAMzqqfTHRon R/7qFUViVuJ42cn47ZEgL6EAbdi7HiadlsWHvoCczAltjlbTWRfeYi55/sJvJHcyFuhu VK9oQ0m0D/YQn6DqEdzXKmP6wk/jplaouha4Cj66o8YLK3sTKz9T/bhOlahe+nH8fmWs A9GRMMWB3l0RMJV+aE8X3r9x7clNfx/xb+2596g4eywI4wc/d/vTyzCsFzs5s2eYMKC1 Pf44DFfSWP5yL7yKjtWBaRQbKdVXhGb6r1O+oJPMKat4h5NxtzWMfBc/i6iA6szgKmsv GgLA== 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=U4EFgQ7I00Ei5qlctgx/4ixFzpZ8teS/RNG2tXeaWJN+xUxUEu/GQReFhnHhUZH1vX fC+IVZzMTGEyKSyKwUh4aSxKSGuyA7x2vK9LhWHeA14yvgJ3kcVP/5T9V+s74ak1WsAJ QjhU2rfoXRUQVV0TTkoWA9d6I1wKaK/plTE3Mc3gl/lQT+oNHNmSKuriCG2d5vBbkpOv QOO8Gek1hPifrPJ+rOcAPvUxiUkxBZRZ7v/TYQiiI3/G4RXIf1synm8795ipCrLx2nSw JEPW48kUDLBR0nlbEONfpTq2AOTlOcWtAKh2I/Of3aFiPDhVOdZkMkds4vywGe/cKo5F hV/A== 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 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 v5si4670712eda.107.2021.01.28.23.29.33; Thu, 28 Jan 2021 23:29:33 -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=cpWA9C59; 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 S232091AbhA2H2O (ORCPT + 6 others); Fri, 29 Jan 2021 02:28:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232019AbhA2H2N (ORCPT ); Fri, 29 Jan 2021 02:28:13 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28DCDC061574 for ; Thu, 28 Jan 2021 23:27:33 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id my11so6037124pjb.1 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=ujPo7KjBfgZbczXFbS21E44lojXW73aJaK629nA7QNhHKTJ3DJM5Tv2V3w94F5fdRA CoEtO7u3bkTsRhe2ugcX74tpzoomM6EcVPOuCQt7GNmcbzzjbEeQHmHvzjb+kQ4JLEKv uXljkLR9o1P40YLCMuGEeriyD7lUCMHhcqLc6EUiefZLX5cOYb8i4JjzSzF4tUQrjCfc EvoYo1LA5dFPE4EEx6jUlT72jrvfHt52b65C9a4n1NTve8E+ZrvYXcBGieDytfNIEwnk 6tsRd8uSfA5vvOhJHXO231M05e6dbHqSligG9laAEvCJILCj+4r1Z7ToCtYjOPNjQIQB xyZQ== X-Gm-Message-State: AOAM531U9FK83lLcV5oA10nW5USeCThRPZcCQyoFH/fataKFjBGODwmV g8GqBayfml4yHoU3e+1PxHwCDw== 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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