From patchwork Tue Oct 17 13:30:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 116110 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4901581qgn; Tue, 17 Oct 2017 06:34:12 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S6ba6cfI083b1PHdcJi887NAC5SftSZ9ELIAFBT9v6sNatmX0e+Fvkms7wlZcAzb/G46GG X-Received: by 10.80.218.72 with SMTP id a8mr13712811edk.221.1508247252823; Tue, 17 Oct 2017 06:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508247252; cv=none; d=google.com; s=arc-20160816; b=DMLv3iEZpDlqITjwzlzRWcngsmT3/DR9Lx3wEuSDo+dFBcYZ4c3EraavfGEHVixsB1 rpoYnU+VnaBE4EBMn6U2gZ6vvcVr+u9lM8C8wXMq0ZEy5+cpYZWHXcqt49lKtJPoJ5Us DFismLrDKDmxvaqgk5xbR04AY+WgqT/taBWshVPOT/D0JpgPYy3eh9gYJFvzJZO0TP+u giJ/13HYzHQPD2RBuqu2+SJ5zYU8CzbFcZCo+GqapFvSNg56umKANPKb48CEkXrtzxiZ sHpxsh7hjQWrfxdRuGgBgw2UNVbr/H7Jio1XNeID1YhkpduArxgxBgbfWL3npGqxLfnA fG0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=XPuISMOWmWGnsBesEHISYSg93QZ2eqy8ldpQuedCTWw=; b=ahAwGAUPI1EJV/UqYt5z1YgkEzdrX0dyQe65/tbTa0DMuDazH1gJc73UpDG9EulSJz EgUVSWxzWfkrMzcXEnLZsgeBPPoxbgYw8V8GCxngxIZZU1pGkp+4f1eXguwvU2tfAIpn Gr2xMfEzxN7Qj0YKPuaUHmjkSeYmoHqpTFtUxxw0M8OfriT0NSB6CVJlM52sFUM7KV9D t8Yh89zUmhJRgcncqDs6ATlq7POC4F4hSEWv0neT+mryb816LPS9j1DyLZV6hY1r2Ho3 ATdzBV5wUN+fn5ihp0BRaBi4INJDAc2I2cMkiTV5mWt5CIL9Y/kDnLqQs7/QQeopUH6e UNfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=rl+kiB3Z; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 59si1520556edy.340.2017.10.17.06.34.12; Tue, 17 Oct 2017 06:34:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=rl+kiB3Z; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 72DCDC21E13; Tue, 17 Oct 2017 13:33:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 067B0C21E13; Tue, 17 Oct 2017 13:32:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3AE53C21E3B; Tue, 17 Oct 2017 13:31:33 +0000 (UTC) Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by lists.denx.de (Postfix) with ESMTPS id F4159C21E31 for ; Tue, 17 Oct 2017 13:31:28 +0000 (UTC) Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-10.nifty.com with ESMTP id v9HDUUVM009624; Tue, 17 Oct 2017 22:30:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v9HDUUVM009624 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1508247030; bh=1EQHtA+steBPqoSqJb4lU0h7IW/vRLZLZbChENovbxw=; h=From:To:Cc:Subject:Date:From; b=rl+kiB3ZkawRpjNhy5/Vogy8wN+2AZ7FTtIGDW+JAk0oEjb97xvLFi7qErKqPbxoW fs4OtfPHG1S4S4QgiDKT97EvQVzHkbxwWwv4VO0EHbod61t7L25HsfzEY4eoDgmUP4 eCJJgvde98e66VpE8OqnuZVOscD+6Bja+/KvuMPoLkKlj56EE5Jngf1eoPAZe/3b2U hubDWpVWkLWv9gQQM98zC8O0U6Ya1kkSfUTrIZJkwUCM2qTEwZfiNqd9Bu1HX+pjsU 3+P+I+sYpPNqQ1uHncQ2jszo7/fYz6oMo9P1FCnXNoZhaZ/ueLbs5waf/d0UiCuhEw tPBZanw8ygfdg== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 17 Oct 2017 22:30:15 +0900 Message-Id: <1508247020-28071-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Stefan Roese , Hans de Goede , "oliver@schinagl.nl" , Olliver Schinagl Subject: [U-Boot] [PATCH 0/5] libfdt: Reduce duplicated copies of libfdt X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Recently, U-Boot switched to the bundled DTC approach. This means we have two copies, lib/libfdt and scripts/dtc/libfdt. Ideally, we should change lib/libfdt to #include scripts/dtc/libfdt. One big problem is lib/libfdt is locally modified (fdt_ro.c fdt_wip.c fdt_rw.c) and makes our life difficult. For now I synced only 6 files. This series depends on "pylibfdt: compile pylibfdt in scripts/dtc/pylibfdt only when necessary" http://patchwork.ozlabs.org/project/uboot/list/?series=8554 Masahiro Yamada (5): libfdt: change fdt.h to a wrapper of scripts/dtc/libfdt/* libfdt: change libfdt_internal.h to a wrapper of scripts/dtc/libfdt/* tools: use files from scripts/dtc/libfdt where possible linux/types.h: add typedef of uintptr_t lib: libfdt: wrap scripts/dtc/libfdt/* where possible include/fdt.h | 2 +- include/libfdt_env.h | 6 - include/linux/libfdt.h | 17 + include/linux/libfdt_env.h | 22 ++ include/linux/types.h | 2 + lib/libfdt/Makefile | 17 +- lib/libfdt/fdt.c | 212 +---------- lib/libfdt/fdt.h | 67 ---- lib/libfdt/fdt_addresses.c | 57 +-- lib/libfdt/fdt_empty_tree.c | 39 +- lib/libfdt/fdt_overlay.c | 863 +----------------------------------------- lib/libfdt/fdt_strerror.c | 63 +-- lib/libfdt/fdt_sw.c | 256 +------------ lib/libfdt/libfdt_internal.h | 51 +-- tools/Makefile | 15 +- tools/libfdt/fdt.c | 2 + tools/libfdt/fdt_addresses.c | 2 + tools/libfdt/fdt_empty_tree.c | 2 + tools/libfdt/fdt_overlay.c | 2 + tools/libfdt/fdt_strerror.c | 2 + tools/libfdt/fdt_sw.c | 2 + 21 files changed, 89 insertions(+), 1612 deletions(-) create mode 100644 include/linux/libfdt.h create mode 100644 include/linux/libfdt_env.h delete mode 100644 lib/libfdt/fdt.h create mode 100644 tools/libfdt/fdt.c create mode 100644 tools/libfdt/fdt_addresses.c create mode 100644 tools/libfdt/fdt_empty_tree.c create mode 100644 tools/libfdt/fdt_overlay.c create mode 100644 tools/libfdt/fdt_strerror.c create mode 100644 tools/libfdt/fdt_sw.c