From patchwork Wed Jan 20 07:06:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 366959 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp204333jam; Tue, 19 Jan 2021 23:09:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJysXzg0wSGqtIwssgfUcliHkTEEUIHjckJrCmXN6SZBuJfgimQqSTBTNeWDNtg77RvqsIZ9 X-Received: by 2002:a05:6402:3122:: with SMTP id dd2mr6179104edb.262.1611126580840; Tue, 19 Jan 2021 23:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611126580; cv=none; d=google.com; s=arc-20160816; b=mCv95nhQbpdSJZ8kOe1iT5WEFJzRclR2l3cw3glC+bmb8RWzBdGvVF/WrnAaMZu3RZ DSOcrqZqmx38nshLvEFVS4GsMRfqvIjGsfccoB3FjMXWdQYimWzi53FDz/sfVZeOHc1a y0nyheW/5knEb88D08xJYX3q3zZFP0yZYLkmN37F53u8vvKYaEFa5oEpWyxPKZBV1fdr LJQb816+2JQTqQgkXOYhP4nqWe/TSiobJDuolIQns56K08y4DA9m4YFRgu90VM3Sgimv xIxdlWmrUyCYDRWfJY0E+dUsHM2L2vH9ApuFhgXfJgrzpRonWPfUJed1TxTZE3V+PE8N pwMw== 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=9smo0xuaPm7gfHG1uvtUQgG4c1Mt5zbBVDBw98pRJd0=; b=l5EHKZvQqhdNst906nWD9UG4wk6YzBmahWWJrEAdvU1nNocM7RR50W3XaAkRlUe3Lx 3ehrM7vQJWeaPFaqGhBJVPzMdQt5kvye1OAD2bKW4PEfL27XvBhK83SVsAVAuUypkwVV nWjEgJohRr2DAK0nNvfiaq48RvjkIhu2z8Tna33JoKdDR/CVe/F35VmnSgSAiASoA30X WLDNMctAo23GC/4PrfJvra6VBKFHl+kqL/otr3whTbEN3grESo+rXT5q7SkITtIhOiRV 3EWYmc7DdF68I+PAIBtHUEM6HbmpCwu+wXjn9cKFzBs8Ydu1lbLTh7hzwhsWqgJxPLg+ n9kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XzW+00Tu; 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.40; Tue, 19 Jan 2021 23:09:40 -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=XzW+00Tu; 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 S1726790AbhATHIX (ORCPT + 6 others); Wed, 20 Jan 2021 02:08:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbhATHIV (ORCPT ); Wed, 20 Jan 2021 02:08:21 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A757C0613C1 for ; Tue, 19 Jan 2021 23:07:41 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id i63so6854838pfg.7 for ; Tue, 19 Jan 2021 23:07:41 -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=9smo0xuaPm7gfHG1uvtUQgG4c1Mt5zbBVDBw98pRJd0=; b=XzW+00TuT50HE4l265/PY4mooymj9tShL6kJ4Y59thj3dfuUohyGcUAs3VTwDS+cmW 45h64uIwLytvu890QRFBxqB9u73d1fO51lXdodCWzm45ATnQEcT1wvfo0XT1oChLQRhU E4QvgIATATDVQk9fF9J/uBxCVgdpLJSyYbMiwL3xpNzGncOORVR+4NWFO44BMv7/A+LR qhlB7RIvUyy6ZWmt+xDA6zlYXOh0yhg46EP/puldooroBUpy+PnceCTtPw5G+QG+cb1y xH76S6OKFQgc12glvV+95vm7h8pwNMuyfMoqsjydjrrmhWfW8Fz0QOULJ16wVkSOiC9E nEYA== 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=9smo0xuaPm7gfHG1uvtUQgG4c1Mt5zbBVDBw98pRJd0=; b=LHtytEUCtjwSqOMWj/AaGU77WpS6vDpHrR7G40gxv2Cx8VZPZEhvGR/+9sbuynbNc0 9h6QyBghdLSFEK1CVCyQLhJBBEoiQi9xD8P8IbVNfwr4URMdRpPUfUR647eO8DXOzQsX ChL02mVER0dcYVTwm5ShUFJpCny1ZMxmomElzgm7wKPVpVe75ZADkRK2zT23jAgrmlmI mj68bjKwrVV4sla0rNgSLQ7iE/yZNdwX50Z8tyOabZV1GA6PRWqd+sc4AsY3I/jc2D6F 2fZmEZHisCOWbkfmurMh4QtzKSGGtLNydzS3OvAmvsLfGG8g04+OCPxY+UXIZQ9RJ3EM 9osg== X-Gm-Message-State: AOAM530n09GyzTnsS55spW2YvLIjbeCFnEYJiQYe9K4OdABwrFnPfSM6 yP/OaEH/5RFvPW554BCEyori6A== X-Received: by 2002:a63:5d3:: with SMTP id 202mr8010895pgf.286.1611126459450; Tue, 19 Jan 2021 23:07:39 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id h11sm1122242pjg.46.2021.01.19.23.07.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jan 2021 23:07:38 -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 0/5] dt: build overlays Date: Wed, 20 Jan 2021 12:36:42 +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, I have picked all the related patches together into a single patchset, so they can be properly reviewed/tested. 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 some 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], I have still included the patch in this series for completeness, will see how to get that sorted out. 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 (5): 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: Statically apply overlays using fdtoverlay .gitignore | 3 +- Makefile | 4 +- drivers/of/unittest-data/Makefile | 50 +++++++++ scripts/Makefile.dtbinst | 3 + scripts/Makefile.lib | 4 +- scripts/dtc/Makefile | 6 +- scripts/dtc/fdtdump.c | 163 ------------------------------ scripts/dtc/update-dtc-source.sh | 3 +- 8 files changed, 66 insertions(+), 170 deletions(-) delete mode 100644 scripts/dtc/fdtdump.c -- 2.25.0.rc1.19.g042ed3e048af