From patchwork Tue Jul 17 19:25:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 945271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41VVcy4sy1z9s0w for ; Wed, 18 Jul 2018 05:26:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B7105C21E77; Tue, 17 Jul 2018 19:26:04 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 D0D0AC21C27; Tue, 17 Jul 2018 19:25:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1F124C21C27; Tue, 17 Jul 2018 19:25:59 +0000 (UTC) Received: from mail-qk0-f201.google.com (mail-qk0-f201.google.com [209.85.220.201]) by lists.denx.de (Postfix) with ESMTPS id 61D0DC21BE5 for ; Tue, 17 Jul 2018 19:25:58 +0000 (UTC) Received: by mail-qk0-f201.google.com with SMTP id z18-v6so1666861qki.22 for ; Tue, 17 Jul 2018 12:25:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=rBwX5amiw1n6+M+FxvleiccfOeis1mPounLJbvAAHwY=; b=qX+0473JOdq0IspGkda32Mzep47kGd4gNXcHJjbleiUZgkoU5w/401xNFA0slnUgX2 LkLk3oMgrU2ROrG460dcr++sDcTau7IhWMsMsDj1RdhnbEjfwIf8e2VTTbrpnDl6NmDc asGPS5c+/S8gqOv71U4GbbS9U27TRb0Pf4L0Hkdm9PLj5a0I+O5BjY5MXpXzdEzy1EJu 4sMBIAxVvf6Fd9CCtOp7KQaeZMRsbJzM87izG3tML8FvGcfpBrCSl2mK/A02khDoKOxt fnuI0e6OOAybUBSwtySxV3lRPJFkF2MhwExwk+65LEWGY6E+fOUyzYxVSvdpu50vIuJg P93w== X-Gm-Message-State: AOUpUlGGD8akDoOs7t02ThAxWSxp8U/WVb6ld9XxYDwpWPt0CGfqbn4R 6DSYDqVisi+t5nDZeTpM36jC6VE= X-Google-Smtp-Source: AAOMgpcEp/4+9RTWFc31+MGVP+S68bH2ZNtYJcmix39sDpcFyiXfQwfZBEAyanrs/44Dur1G+dUrB/0= MIME-Version: 1.0 X-Received: by 2002:a37:9a4c:: with SMTP id c73-v6mr1511473qke.33.1531855557314; Tue, 17 Jul 2018 12:25:57 -0700 (PDT) Date: Tue, 17 Jul 2018 13:25:23 -0600 Message-Id: <20180717192552.198496-1-sjg@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini Subject: [U-Boot] [PATCH 00/29] binman: Expand feature set and documentation 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This series adds various new features to binman to round out its capabilities. It also adds documentation of each entry type since there are quite a few now. Noteably this series changes the 'pos' property to be called 'offset'. The 'pos' name is a misnomer with hierarchical images since the position is always relative to the parent. A new 'image-pos' property (calculated by binman) is introduced instead, with a clear meaning. This is a fairy major change since all source .dts files need to be updated to accommodate it. I believe that doing this rename now (without using the old name for anything else) is the best approach. See the rename patch for motivation and more details. Changes: - Passing arguments for entries in via the command line - Entries filled with a repeated byte - Putting text in an entry - TPL - Chromium entries - Add README.entries to document entries - An 'image-pos' property which provides the position of an entry within an image Simon Glass (29): binman: Don't depend on dict order in ELF testOutsideFile() binman: Rename 'position' to 'offset' binman: Add comments to elf_test binman: Tidy up some comments in the tests binman: Enhance the map and fdt-update output binman: Update the device-tree file on exit binman: Add a new 'image-pos' property dtoc: Add missing comments to fdt_util binman: Add support for passing arguments to entries binman: Support an entry that holds text binman: Allow help to work without libfdt binman: Expand documentation for entries binman: Allow creation of entry documentation binman: Create README.entries binman: Add support for flashrom FMAP binman: Add support for a cros_ec image binman: Add an entry filled with a repeating byte dtoc: Export the _FindNode() function patman: Allow test commands to fall back to real ones patman: Add a few more helpers to the tools library binman: Add support for Chromium GBB patman: Show the current directory in GetInputFilename() dtoc: Add a function to obtain a list of phandles binman: Add an entry for a Chromium vblock binman: Add support for adding TPL binaries binman: Show the image position in the map binman: Rename ReadContents() to ReadBlobContents() binman: Add a test to catch use of the old 'pos' property binman: Adjust _GetPropTree() parameters arch/arm/dts/sunxi-u-boot.dtsi | 2 +- arch/arm/dts/tegra-u-boot.dtsi | 6 +- arch/x86/dts/u-boot.dtsi | 24 +- tools/binman/README | 135 ++-- tools/binman/README.entries | 585 ++++++++++++++++++ tools/binman/binman.py | 22 +- tools/binman/bsection.py | 151 +++-- tools/binman/cmdline.py | 6 +- tools/binman/control.py | 39 +- tools/binman/elf.py | 10 +- tools/binman/elf_test.py | 33 + tools/binman/entry.py | 267 ++++++-- tools/binman/etype/_testing.py | 47 +- tools/binman/etype/blob.py | 16 +- tools/binman/etype/blob_named_by_arg.py | 34 + tools/binman/etype/cros_ec_rw.py | 22 + tools/binman/etype/fill.py | 32 + tools/binman/etype/fmap.py | 61 ++ tools/binman/etype/gbb.py | 96 +++ tools/binman/etype/intel_cmc.py | 10 + tools/binman/etype/intel_descriptor.py | 26 +- tools/binman/etype/intel_fsp.py | 14 + tools/binman/etype/intel_me.py | 15 + tools/binman/etype/intel_mrc.py | 11 + tools/binman/etype/intel_vbt.py | 10 + tools/binman/etype/intel_vga.py | 12 + tools/binman/etype/section.py | 48 +- tools/binman/etype/text.py | 57 ++ tools/binman/etype/u_boot.py | 16 + tools/binman/etype/u_boot_dtb.py | 9 + tools/binman/etype/u_boot_dtb_with_ucode.py | 22 +- tools/binman/etype/u_boot_img.py | 11 + tools/binman/etype/u_boot_nodtb.py | 11 + tools/binman/etype/u_boot_spl.py | 21 + tools/binman/etype/u_boot_spl_bss_pad.py | 16 + tools/binman/etype/u_boot_spl_dtb.py | 11 +- tools/binman/etype/u_boot_spl_nodtb.py | 12 + tools/binman/etype/u_boot_tpl.py | 43 ++ tools/binman/etype/u_boot_tpl_dtb.py | 25 + tools/binman/etype/u_boot_ucode.py | 12 +- tools/binman/etype/u_boot_with_ucode_ptr.py | 44 +- tools/binman/etype/vblock.py | 74 +++ tools/binman/etype/x86_start16.py | 14 + tools/binman/etype/x86_start16_spl.py | 14 + tools/binman/fmap_util.py | 109 ++++ tools/binman/ftest.py | 428 +++++++++++-- tools/binman/image.py | 16 +- tools/binman/test/08_pack.dts | 2 +- tools/binman/test/12_pack_inv_align.dts | 2 +- tools/binman/test/14_pack_overlap.dts | 2 +- tools/binman/test/21_image_pad.dts | 2 +- tools/binman/test/24_sorted.dts | 6 +- tools/binman/test/25_pack_zero_size.dts | 2 +- tools/binman/test/27_pack_4gb_no_size.dts | 6 +- tools/binman/test/28_pack_4gb_outside.dts | 6 +- tools/binman/test/29_x86-rom.dts | 6 +- tools/binman/test/30_x86-rom-me-no-desc.dts | 4 +- tools/binman/test/31_x86-rom-me.dts | 4 +- tools/binman/test/34_x86_ucode.dts | 2 +- tools/binman/test/35_x86_single_ucode.dts | 2 +- tools/binman/test/37_x86_no_ucode.dts | 2 +- .../binman/test/38_x86_ucode_missing_node.dts | 2 +- .../test/39_x86_ucode_missing_node2.dts | 2 +- .../binman/test/40_x86_ucode_not_in_image.dts | 2 +- tools/binman/test/44_x86_optional_ucode.dts | 2 +- tools/binman/test/45_prop_test.dts | 4 +- tools/binman/test/49_x86_ucode_spl.dts | 2 +- tools/binman/test/53_symbols.dts | 2 +- tools/binman/test/55_sections.dts | 4 + .../test/58_x86_ucode_spl_needs_retry.dts | 2 +- tools/binman/test/62_entry_args.dts | 14 + tools/binman/test/63_entry_args_missing.dts | 13 + tools/binman/test/64_entry_args_required.dts | 14 + .../test/65_entry_args_unknown_datatype.dts | 15 + tools/binman/test/66_text.dts | 28 + tools/binman/test/67_fmap.dts | 29 + tools/binman/test/68_blob_named_by_arg.dts | 12 + tools/binman/test/69_fill.dts | 15 + tools/binman/test/70_fill_no_size.dts | 14 + tools/binman/test/71_gbb.dts | 31 + tools/binman/test/72_gbb_too_small.dts | 10 + tools/binman/test/73_gbb_no_size.dts | 9 + tools/binman/test/74_vblock.dts | 28 + tools/binman/test/75_vblock_no_content.dts | 23 + tools/binman/test/76_vblock_bad_phandle.dts | 24 + tools/binman/test/77_vblock_bad_entry.dts | 27 + tools/binman/test/78_u_boot_tpl.dts | 11 + tools/binman/test/79_uses_pos.dts | 10 + tools/binman/test/u_boot_binman_syms | Bin 4921 -> 4916 bytes tools/binman/test/u_boot_binman_syms.c | 6 +- tools/dtoc/fdt.py | 23 +- tools/dtoc/fdt_util.py | 96 +++ tools/dtoc/test_fdt.py | 49 +- tools/patman/command.py | 8 +- tools/patman/tools.py | 80 ++- 95 files changed, 3012 insertions(+), 346 deletions(-) create mode 100644 tools/binman/README.entries create mode 100644 tools/binman/etype/blob_named_by_arg.py create mode 100644 tools/binman/etype/cros_ec_rw.py create mode 100644 tools/binman/etype/fill.py create mode 100644 tools/binman/etype/fmap.py create mode 100644 tools/binman/etype/gbb.py create mode 100644 tools/binman/etype/text.py create mode 100644 tools/binman/etype/u_boot_tpl.py create mode 100644 tools/binman/etype/u_boot_tpl_dtb.py create mode 100644 tools/binman/etype/vblock.py create mode 100644 tools/binman/fmap_util.py create mode 100644 tools/binman/test/62_entry_args.dts create mode 100644 tools/binman/test/63_entry_args_missing.dts create mode 100644 tools/binman/test/64_entry_args_required.dts create mode 100644 tools/binman/test/65_entry_args_unknown_datatype.dts create mode 100644 tools/binman/test/66_text.dts create mode 100644 tools/binman/test/67_fmap.dts create mode 100644 tools/binman/test/68_blob_named_by_arg.dts create mode 100644 tools/binman/test/69_fill.dts create mode 100644 tools/binman/test/70_fill_no_size.dts create mode 100644 tools/binman/test/71_gbb.dts create mode 100644 tools/binman/test/72_gbb_too_small.dts create mode 100644 tools/binman/test/73_gbb_no_size.dts create mode 100644 tools/binman/test/74_vblock.dts create mode 100644 tools/binman/test/75_vblock_no_content.dts create mode 100644 tools/binman/test/76_vblock_bad_phandle.dts create mode 100644 tools/binman/test/77_vblock_bad_entry.dts create mode 100644 tools/binman/test/78_u_boot_tpl.dts create mode 100644 tools/binman/test/79_uses_pos.dts