From patchwork Fri Jan 22 10:50:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 368616 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1400621jam; Fri, 22 Jan 2021 02:56:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzs/ug0xS6gtGaP3MlwN7CV9yrzirwAgMf21vfy+8KJk5yyTnFenDodoovoqrWtFmTzV2V5 X-Received: by 2002:aa7:d649:: with SMTP id v9mr2665118edr.383.1611313005161; Fri, 22 Jan 2021 02:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611313005; cv=none; d=google.com; s=arc-20160816; b=jg7NoZ0H/NhFjWo3zDMQM7JrUgLSGChPoQWuDSTcSmsgxwEisXY0Tc2/IviyN6Difr x1P3ahBkVCNyJ+9aAibPPtSLNzjSnOD0I1mCXp4Fq8mBYvMTQYem9zwsZB6NxMQJBLtj 2lmsMUAWNLBe/zKMNxGljM5pMEUR5SAcE3l0lY44WkS+/ojEeovu5sL8IkiXBX4bbjy5 HiveoLjvHFeNBb80/v3WjZ7qy/3NPADxOjtXh+nJrFvnLRA5l+0F94swNS6XTLPx9T2i da4GSgEXODRbBOJJSQfs3RONbkFVkA7Tn0Vw6CHB39QW4tp5Nwk12S6fWmVY5B+KNJAs xTEQ== 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=PuwWd5eA6p3dY7AgrjavmP5cmvVmC3ijlW6z53nJI7E=; b=sK9UPA48Orl/MmtqNtlC8hFxfziTMV22ZLxx+V2y+ORIX4Iy4lm91fhRJbzlsEns7y GjnkEPFojTUdi2Rj/bho7jJTJo4PxKCN0cdnQJdx+hSWuNDOEF3DK4AHt/Ug9nGSsqCc HZ6HOc8v0/6GHJzJ3TVEHxiKpzxoxZu47rKdwip+0bWZece14sLlzwCAtvWQq/Xw+9OQ Hvh7KWpNnhHXfUCUX9+K0wb+NujKvxsZDFjXTXq1H2zbBP0WHjlicyLgIDablNJ4VzVw QbazSyiRCPFUd3y+UKsRhkpam15dq6YeSxI+R5g+MSbxyBIGGAFspb8AGPKapuRyI/Xh LfGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DUgiZdV+; 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 v1si3354421edt.548.2021.01.22.02.56.45; Fri, 22 Jan 2021 02:56:45 -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=DUgiZdV+; 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 S1726740AbhAVKzl (ORCPT + 6 others); Fri, 22 Jan 2021 05:55:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727489AbhAVKvj (ORCPT ); Fri, 22 Jan 2021 05:51:39 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 793ABC06178B for ; Fri, 22 Jan 2021 02:50:59 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id h15so478910pli.8 for ; Fri, 22 Jan 2021 02:50:59 -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=PuwWd5eA6p3dY7AgrjavmP5cmvVmC3ijlW6z53nJI7E=; b=DUgiZdV+iGgfJqja6zA0bbGFa0O/OMijUZOXcsGQ3eukmae3Un8i9t0w4ItT3H63Cv le5PyLNxsPvu9EDPmBOpLQeNJWxO5BWoGcrUKWO/hDuBUtMt+mgysSsPBDmDY1ZTRhEh R/fpAdxOXVg84jfBQ53awzLXwMMqquOKhh0S562hQLbwycf2WV0gYWjlAeDDCGE9Fom9 hNnPr5+rtVszC6eyKUy68IXMSMnVhABiWVuZPhHcLaXSxPYB97NOV5jdnPpUuU1BxR9V Y23kJlK4hxUfOh83VU2kY+47DJQmULwjyINtkMm7CWOKkDVxzvUDxLi64w0h0rPhlkd4 87lA== 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=PuwWd5eA6p3dY7AgrjavmP5cmvVmC3ijlW6z53nJI7E=; b=NGb0oSVA/Xb+45FKaAbUEYOukSEYs3PC1eZSwEi+MG+MRSQETv3evgZ7YPNaYbDmLE djdwRoarCrmxTH6ObX6q61UefvEXu9rQPvxs9iaNnLcqgJjPjLDaAf41uQ2MAisbTBAc MFHpckpBAyxfxppbtiRYM7OEKAXIv/8OfDzmwb0pAuzOHWV3hvTWQou9wrnN7eVDsTiC o/Z76+EsUqutJTldV7QRAzpjHp92horAruN4WjpNdWO0+UICiKy0Lsl0GMJUa5wE9Vi2 s3Es6uJf0x5ALzdPCpdQdm2miHNK6W0hlMKv4P8xrc+idY9ULmQE1fa/P8hU9TfSzTh9 kBWA== X-Gm-Message-State: AOAM531xg1MdeRdTXgpRvnbyBDop9LnYiugjgyBEDvP9Ko6EDXDhV/Rb udyHOYLSPgRLe/Ckm0zzcn7iUA== X-Received: by 2002:a17:90b:1046:: with SMTP id gq6mr4481021pjb.203.1611312658928; Fri, 22 Jan 2021 02:50:58 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id k128sm8613204pfd.137.2021.01.22.02.50.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 02:50:58 -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 V6 0/6] dt: build overlays Date: Fri, 22 Jan 2021 16:20:30 +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 Frank/Rob, 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). Also note that Frank has already shared his concerns towards the error reporting done by fdtoverlay tool [2], and David said it is not that straight forward to make such changes in fdtoverlay. I have still included the patch in this series for completeness. FWIW, with fdtoverlay we generate a new build warning now, not sure why though: drivers/of/unittest-data/tests-interrupts.dtsi:20.5-28: Warning (interrupts_property): /testcase-data/testcase-device2:#interrupt-cells: size is (4), expected multiple of 8 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 | 51 ++++++ drivers/of/unittest-data/overlay_base.dts | 90 +--------- drivers/of/unittest-data/overlay_common.dtsi | 91 ++++++++++ drivers/of/unittest-data/static_base.dts | 5 + drivers/of/unittest-data/testcases.dts | 17 +- .../of/unittest-data/testcases_common.dtsi | 18 ++ scripts/Makefile.dtbinst | 3 + scripts/Makefile.lib | 5 + scripts/dtc/Makefile | 6 +- scripts/dtc/fdtdump.c | 163 ------------------ scripts/dtc/update-dtc-source.sh | 3 +- 13 files changed, 187 insertions(+), 271 deletions(-) create mode 100644 drivers/of/unittest-data/overlay_common.dtsi create mode 100644 drivers/of/unittest-data/static_base.dts create mode 100644 drivers/of/unittest-data/testcases_common.dtsi delete mode 100644 scripts/dtc/fdtdump.c -- 2.25.0.rc1.19.g042ed3e048af Acked-by: Masahiro Yamada