Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E0CDC433F5 for ; Tue, 8 Feb 2022 19:40:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BBDA383D43; Tue, 8 Feb 2022 20:40:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="l+U5sXCw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D3D083D8C; Tue, 8 Feb 2022 19:50:32 +0100 (CET) Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A50CF83D82 for ; Tue, 8 Feb 2022 19:50:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2a.google.com with SMTP id m185so190282iof.10 for ; Tue, 08 Feb 2022 10:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AOLAZN/cU/a8qfLipUryQkSfvquh74H1Lfrgb4FVBwo=; b=l+U5sXCwW5lHHKY8CGzKhBQd7WsOAqOgVUtATBwrnktlie6CSaIOW+7DJQAvIhWZfd fLE5w6deUinECYDdW1meYzWBqFUDxr1nuDGtHZy4iv/PorX5vAz9xECcna2NJKfzxjak lHEYvh+JdVjOZDZi+SgwV2HRYtYMJNnWk84jw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AOLAZN/cU/a8qfLipUryQkSfvquh74H1Lfrgb4FVBwo=; b=Ntmfaw6h/9HpJ8qhTuQHx8WcAdHNPkeFsFcxFR5jY1hGL6ZO8iUqndhaB+QtOXPL/N mpdD/JbvY+omouSPj30mWu4YplzA2l0Mlb7Du48VdiLDJ+F6OiOmt4oryU2421kf9EQf RgN8mS/78Bk1H1FXwMkYRarCPgFkO/utNdZBtbHdEkXm0FXa75AYqByMinv49Ksiaxfe ihjb7XrJeBLwNgBd8Epo7DJhuenZgs7gIUieU/5CR678G1cUrd7+gwmpCjSYmGmCSMYQ agxXlZUKKjcJic4uCQJ4XFX/Mzm/Mq7sXN8apRa/LwLxoae8fyFBQxbnuYSDvSeLgNoA zSFQ== X-Gm-Message-State: AOAM530CbMULM8cnjnP/IYJ63uzd/Mbs0kYNYQm8wZIY1Btgt+BKRrRL wng5REZTgs1xshWU9Z5d8S/WrXbkTaVvZw== X-Google-Smtp-Source: ABdhPJzHBuUP4+m7rKkRYoC8Ypmq1n+yApkMtKhYZRE9H9RIDCfvIqDdwfHh01XlqKf0ehqm40za+w== X-Received: by 2002:a05:6602:492:: with SMTP id y18mr2634131iov.95.1644346224107; Tue, 08 Feb 2022 10:50:24 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id q2sm2911844ilt.33.2022.02.08.10.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 10:50:23 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Alper Nebi Yasak , Tom Rini , Roger Quadros , Philippe Reynes , Ivan Mikhaylov , Alexandru Gagniuc , Andre Przywara , Bin Meng , Chris Morgan , Heiko Schocher , Heiko Stuebner , Heiko Thiery , Heinrich Schuchardt , Jaehoon Chung , Jagan Teki , Jan Kiszka , Jon Lin , Joseph Chen , Klaus Heinrich Kiwi , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Marek Vasut , Masahisa Kojima , Michal Simek , Nico Cheng , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Philipp Tomsich , Ricardo Salveti , Stefan Roese , Steffen Jaeckel , Trevor Woerner , Walter Lozano Subject: [PATCH 00/24] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script Date: Tue, 8 Feb 2022 11:49:44 -0700 Message-Id: <20220208185008.35843-1-sjg@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 08 Feb 2022 20:40:15 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean At present rockchip 64-bit boards make use of a FIT-generator script written in Python. The script supports splitting an ELF file into several 'loadable' nodes in the FIT. Binman does not current support this feature. This series adds binman support for ELF splitting. This works by adding a new 'fit,operation' property to the FIT subnodes, allowing this new way of generating nodes. Some other fixes and improvements are needed along the way. A new, common binman description is added for 64-bit boards which includes the required u-boot.itb file. The existing script is removed, so that only a few zynq boards are now using a SPL_FIT_GENERATOR script: avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0 xilinx_zynqmp_virt Migration of those is hopefully in progress. Note however that tools/k3_fit_atf.sh remains, used by a few boards that enable CONFIG_TI_SECURE_DEVICE so this series is copied there too: am335x_hs_evm am335x_hs_evm_uart am43xx_hs_evm am57xx_hs_evm am57xx_hs_evm_usb am65x_hs_evm_a53 am65x_hs_evm_r5 dra7xx_hs_evm dra7xx_hs_evm_usb j721e_hs_evm_a72 j721e_hs_evm_r5 k2e_hs_evm k2g_hs_evm k2hk_hs_evm k2l_hs_evm Ivan Mikhaylov has sent a patch to help with these, but I need to take a look at the testing side. In any case they should really be using binman for the image generation. This series also includes some moveconfig improvements that were used to create board lists in this cover letter. Simon Glass (24): moveconfig: Show the config name rather than the defconfig moveconfig: Allow regex matches when finding combinations spl: x86: Correct the binman symbols for SPL spl: Allow disabling binman symbols in SPL rockchip: evb-rk3288: Drop raw-image support dtoc: Support adding a string list to a device tree dtoc: Support deleting a node dtoc: Allow deleting nodes and adding them in the same sync dtoc: Support reading a list of arguments binman: Update docs to indicate mkimage is supported elf: Add a way to read segment information from an ELF file WIP: binman: Add support for OP-TEE binman: Add to the TODO binman: Support a list of strings with the mkimage etype binman: Add a ELF test file with disjoint text sections binman: Move entry-data collection into a Entry method binman: fit: Refactor to reduce function size binman: Tidy up the docs a little with fit binman: Allow different operations in FIT generator nodes binman: Support splitting an ELF file into multiple nodes rockchip: Include binman script in 64-bit boards rockchip: Support building the all output files in binman rockchip: Convert all boards to use binman rockchip: Drop the FIT generator script Makefile | 43 +- arch/arm/dts/px30-u-boot.dtsi | 2 + arch/arm/dts/rk3308-u-boot.dtsi | 2 + arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi | 2 + arch/arm/dts/rk3328-u-boot.dtsi | 2 + arch/arm/dts/rk3368-u-boot.dtsi | 1 + arch/arm/dts/rk3399-u-boot.dtsi | 5 +- arch/arm/dts/rk3568-u-boot.dtsi | 2 + arch/arm/dts/rockchip-u-boot.dtsi | 84 +++- arch/arm/mach-rockchip/Kconfig | 6 + arch/arm/mach-rockchip/make_fit_atf.py | 240 --------- arch/x86/dts/u-boot.dtsi | 2 +- boot/Kconfig | 3 +- common/spl/Kconfig | 24 + common/spl/spl.c | 12 +- configs/evb-rk3288_defconfig | 1 + include/spl.h | 4 +- tools/binman/binman.rst | 98 +++- tools/binman/elf.py | 37 ++ tools/binman/elf_test.py | 31 +- tools/binman/entries.rst | 260 +++++++++- tools/binman/entry.py | 28 ++ tools/binman/etype/fit.py | 490 ++++++++++++++++--- tools/binman/etype/mkimage.py | 27 +- tools/binman/etype/op_tee.py | 23 + tools/binman/ftest.py | 123 +++++ tools/binman/missing-blob-help | 4 + tools/binman/test/220_fit_bad_oper.dts | 27 + tools/binman/test/221_fit_split_elf.dts | 67 +++ tools/binman/test/222_fit_bad_dir.dts | 9 + tools/binman/test/223_fit_bad_dir_config.dts | 9 + tools/binman/test/Makefile | 6 +- tools/binman/test/elf_sections.c | 20 + tools/binman/test/elf_sections.lds | 31 ++ tools/dtoc/fdt.py | 37 ++ tools/dtoc/fdt_util.py | 12 + tools/dtoc/test/dtoc_test_simple.dts | 1 + tools/dtoc/test_fdt.py | 43 ++ tools/moveconfig.py | 39 +- 39 files changed, 1450 insertions(+), 407 deletions(-) delete mode 100755 arch/arm/mach-rockchip/make_fit_atf.py create mode 100644 tools/binman/etype/op_tee.py create mode 100644 tools/binman/test/220_fit_bad_oper.dts create mode 100644 tools/binman/test/221_fit_split_elf.dts create mode 100644 tools/binman/test/222_fit_bad_dir.dts create mode 100644 tools/binman/test/223_fit_bad_dir_config.dts create mode 100644 tools/binman/test/elf_sections.c create mode 100644 tools/binman/test/elf_sections.lds -- 2.35.0.263.gb82422642f-goog