From mboxrd@z Thu Jan 1 00:00:00 1970 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 CDCD4C433F5 for ; Wed, 23 Feb 2022 23:02:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9382483CDA; Thu, 24 Feb 2022 00:01:49 +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="eyl7lV+g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33E0F83CE8; Thu, 24 Feb 2022 00:00:57 +0100 (CET) Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) (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 2DE3E83CC8 for ; Thu, 24 Feb 2022 00:00:49 +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-oo1-xc2b.google.com with SMTP id k13-20020a4a948d000000b003172f2f6bdfso861963ooi.1 for ; Wed, 23 Feb 2022 15:00:49 -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=1v5yJlw2rz3t0GtirI4a1/TSj9Hhze4AywwH71KazqM=; b=eyl7lV+g0kXAfmgbvL00uvJv7aH/K0RV4jJXowXl15NZzblykqPuePOWHkp4ygi6ro 8cIr0DbwhXRuVV+KDetSbRfRXr1azTy2f7PKkpJvqQC02HyGhRayVVDflOK0x9LiclD2 /4yurgMsZBZDUQGPVYZuGQ5sKYj/eMQB/Mo3w= 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=1v5yJlw2rz3t0GtirI4a1/TSj9Hhze4AywwH71KazqM=; b=M46Jd5T9zEgYKl7WxzZtvPnD8wLQYsC3h+NmO9di5uFhHI37P++hIYWdi3iSGQZkt5 7qDTrlgua3kWie5e4UK7YiQBQiDnHr4yP2xGsYPkTbyGXJ61yUcTE2TvqoLxN9wWkxJf 0S4/puFrg9Ctpty495F0gDAESvVgEZf9rfB3pWSyA69A1V6a1pZRbM4kbrQc3C3aIdKe PdfnHgXHHkCNP7PuTebgAqbS8cl+K2TrCH1SutoJM4VapLo8Lss9WDlkNlZcAHe55UGD C6xx82xURKupp4RgMbi8jvBAqsC18sSUC49lUrgAnqX/S/x88MPhA2Dc+yTuxY4StJAa 50ww== X-Gm-Message-State: AOAM530pif5L/vkD2KZw4XUvkolSD585kurc/LETJFsEX2s94LX/7VM9 /COzbWna8r/umyFhj4MQc8nlp0gNGb/z9w== X-Google-Smtp-Source: ABdhPJxrKKtNLITWAdeFP2Tt/isOUfZiYzPjHwxeGcwLGnkouGZdAj67T1EvgCbC0Cyf+tJksnb4Dw== X-Received: by 2002:a05:6870:c341:b0:ce:c0c9:6f0 with SMTP id e1-20020a056870c34100b000cec0c906f0mr4879884oak.322.1645657247590; Wed, 23 Feb 2022 15:00:47 -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 o2sm427507otl.9.2022.02.23.15.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 15:00:47 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ivan Mikhaylov , Tom Rini , Philippe Reynes , Roger Quadros , Alper Nebi Yasak , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v2 00/25] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script Date: Wed, 23 Feb 2022 16:00:15 -0700 Message-Id: <20220223230040.159317-1-sjg@chromium.org> X-Mailer: git-send-email 2.35.1.574.g5d30c73bfb-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Changes in v2: - Add new patch to make GetArgs() more flexible - Add new patch to remove remove_defconfig() - Add new patch to use re.fullmatch() to avoid extra check - Add new patch to correct Kconfig help for TPL_BINMAN_SYMBOLS - Add new patch to tidy up implementaiton of AddStringList() - Add new patch to rename load_segments() and module failure - Add new patch to tweak collect_contents_to_file() and docs - Add patch to rename ExpandToLimit to extend_to_limit - Add patch to rename ExpandEntries to gen_entries - Add new patch to refactor fit to generate output at the end - Add a patch to change how faked blobs are created - Add a patch to make fake blobs zero-sized by default - Add a patch to allow mkimage to use a non-zero fake-blob size - Rewrite this to use the new FIT entry-type implementation - Rename op-tee to tee-os - Rename op-tee to tee-os - Drop use of .itb2 - Drop patches previously applied - Add various suggestions from Alper Nebi Yasak - Add patches to refactor binman's FIT support Simon Glass (25): dtoc: Make GetArgs() more flexible moveconfig: Remove remove_defconfig() moveconfig: Use re.fullmatch() to avoid extra check spl: Correct Kconfig help for TPL_BINMAN_SYMBOLS dtoc: Tidy up implementaiton of AddStringList() elf: Rename load_segments() and module failure binman: Tweak collect_contents_to_file() and docs binman: Rename ExpandToLimit to extend_to_limit binman: Rename ExpandEntries to gen_entries binman: Refactor fit to generate output at the end binman: Rename tools parameter to btools binman: Change how faked blobs are created binman: Make fake blobs zero-sized by default binman: Allow mkimage to use a non-zero fake-blob size binman: Read the fit entries only once binman: Fix some pylint warnings in fit binman: Add a consistent way to report errors with fit binman: Update fit to use node instead of subnode binman: Keep a separate list of entries for fit binman: Support splitting an ELF file into multiple nodes rockchip: evb-rk3288: Drop raw-image support 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 | 42 +- 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 --------- boot/Kconfig | 3 +- common/spl/Kconfig | 6 +- configs/evb-rk3288_defconfig | 1 + tools/binman/binman.rst | 30 +- tools/binman/control.py | 2 +- tools/binman/elf.py | 6 +- tools/binman/elf_test.py | 18 +- tools/binman/entries.rst | 146 ++++++ tools/binman/entry.py | 49 +- tools/binman/etype/_testing.py | 2 +- tools/binman/etype/blob.py | 10 +- tools/binman/etype/blob_ext_list.py | 2 +- tools/binman/etype/blob_phase.py | 2 +- tools/binman/etype/files.py | 2 +- tools/binman/etype/fit.py | 501 ++++++++++++++----- tools/binman/etype/gbb.py | 4 +- tools/binman/etype/intel_ifwi.py | 4 +- tools/binman/etype/mkimage.py | 19 +- tools/binman/etype/section.py | 22 +- tools/binman/etype/vblock.py | 4 +- tools/binman/ftest.py | 180 ++++++- tools/binman/test/088_expand_size.dts | 8 +- tools/binman/test/089_expand_size_bad.dts | 2 +- tools/binman/test/224_fit_bad_oper.dts | 2 - tools/binman/test/225_expand_size_bad.dts | 10 + tools/binman/test/226_fit_split_elf.dts | 67 +++ tools/binman/test/227_fit_bad_dir.dts | 9 + tools/binman/test/228_fit_bad_dir_config.dts | 9 + tools/binman/test/229_mkimage_missing.dts | 18 + tools/dtoc/fdt.py | 4 +- tools/dtoc/fdt_util.py | 8 +- tools/dtoc/test/dtoc_test_simple.dts | 2 + tools/dtoc/test_fdt.py | 12 +- tools/moveconfig.py | 17 +- 45 files changed, 1060 insertions(+), 509 deletions(-) delete mode 100755 arch/arm/mach-rockchip/make_fit_atf.py create mode 100644 tools/binman/test/225_expand_size_bad.dts create mode 100644 tools/binman/test/226_fit_split_elf.dts create mode 100644 tools/binman/test/227_fit_bad_dir.dts create mode 100644 tools/binman/test/228_fit_bad_dir_config.dts create mode 100644 tools/binman/test/229_mkimage_missing.dts -- 2.35.1.574.g5d30c73bfb-goog