From patchwork Thu Apr 16 09:30:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1271616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=ngppamnw; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492v9C4MTCz9sP7 for ; Thu, 16 Apr 2020 19:30:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F25E8047E; Thu, 16 Apr 2020 11:30:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="ngppamnw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 46DEF804EC; Thu, 16 Apr 2020 11:30:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8894C8006D for ; Thu, 16 Apr 2020 11:30:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=masahiroy@kernel.org Received: from oscar.flets-west.jp (softbank060142179096.bbtec.net [60.142.179.96]) (authenticated) by conuserg-10.nifty.com with ESMTP id 03G9UMqG002591; Thu, 16 Apr 2020 18:30:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 03G9UMqG002591 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1587029423; bh=YVngx4sgXkrJQdYDBu0Cqz16dR3h5TFuKekwSoV0Jg4=; h=From:To:Cc:Subject:Date:From; b=ngppamnw1rUn6VguoYf4QRWg3dBf758/iPyo7Db1c7Q21FCbyva/SwalUXOQAUOyI hnBMjonnM5YyFs/hK+4ihDo4Q335ffke4oKjyKV/fdH3DrMh3CvS/Onpy5fLUrk/+D 4+hjGJyUnCgeGMFIe7nf0DZLzOCO3jsgSA19qAZ7OyWVke33YJpKqZB0DllgNb4KIb 7bgWSckqYzggFqcXUkDLiiHj0p/HgiBKq6H51xhUPBnkQfFy0QCqT5bqXYwBMIBN5G bsmyv5KdoX1xandRnF5Yl5xdylN1ws8U5syIhuc7gvWB8z8SJWRDBztVS2nJWp6A86 1Lb0AjN4/9pbA== X-Nifty-SrcIP: [60.142.179.96] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada Subject: [PATCH v2 0/3] libfdt: make lib/libfdt/ contain only wrappers Date: Thu, 16 Apr 2020 18:30:15 +0900 Message-Id: <20200416093018.561400-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Linux DT community follows the strict rule that they never locally modify libfdt. In Linux, lib/fdt_*.c are wrapper files to scripts/dtc/libfdt/fdt_*.c and scripts/dtc/ is synced with upstream DTC by running scripts/dtc/update-dtc-source.sh The local code in Linux is separated in drivers/of/. On the other hand, U-Boot originally had own copies in lib/libfdt/, and people locally modified them. The code diverged, and made it difficult to re-sync with upstream. In 2018, I worked on migrating them to wrapper files, just like Linux does. 50a327ded68b7e675389ad284ea3f8c62e683bda 87be1e9fb4dcc130e90d497cc5ce49c715efc6c2 26e961c8cfdff00c5c9389d301d9a2eb10eb844c This series completes this work. 1/3 migrates fdt_ro.c to a wrapper. Two years ago, it diverged from the upstream, and gave up resync. Now, I do not see essential diff. 2/3 and 3/3 separate fdt_region out of the upstream code. I am resending them after two years since the previous rejection. It was unfortuate that they were rejected based on the assumption that is unlikely to happen. They should be re-evaluated. Masahiro Yamada (3): libfdt: migrate fdt_ro.c to a wrapper of scripts/dtc/libfdt/fdt_ro.c fdt_region: move fdt_region.c to common/ from lib/libfdt/ libfdt: split fdt_region declarations out to common/Makefile | 1 + {lib/libfdt => common}/fdt_region.c | 1 + common/image-fit-sig.c | 1 + include/fdt_region.h | 304 +++++++++ include/linux/libfdt.h | 299 --------- lib/libfdt/Makefile | 9 +- lib/libfdt/fdt_ro.c | 925 +--------------------------- tools/Makefile | 13 +- tools/fdtgrep.c | 1 + tools/image-host.c | 1 + tools/libfdt/fdt_ro.c | 2 + 11 files changed, 317 insertions(+), 1240 deletions(-) rename {lib/libfdt => common}/fdt_region.c (99%) create mode 100644 include/fdt_region.h create mode 100644 tools/libfdt/fdt_ro.c