[PATCH RFC u-boot-mvebu 00/59] arm: mvebu: Various fixes

Tony Dinh mibodhi at gmail.com
Wed Feb 22 00:06:16 CET 2023


Hi Pali,

On Tue, Feb 21, 2023 at 12:22 PM Pali Rohár <pali at kernel.org> wrote:
>
> This patch series contains various improvements and fixes for existing
> logical errors. Boot phase was adjusted to match behavior of Armada 385
> BootROM by inspecting and disassembling of BootROM binary dump itself.
> Important information are included in documentation patch for kwboot.
> Most of the changes are untested, hence this patch series is just RFC.
> So please test changes before applying, idealy on SPI, SATA and SD/MMC.
> Nevertheless all patches on github passed CI testing in this PR:
> https://github.com/u-boot/u-boot/pull/275
>
> Pali Rohár (59):
>   tools: kwbimage: Fix generating, verifying and extracting SDIO
>     kwbimage
>   tools: kwboot: Fix parsing SDIO kwbimage
>   arm: mvebu: spl: Fix parsing SDIO kwbimage
>   cmd: mvebu/bubt: Fix parsing SDIO kwbimage
>   tools: kwbimage: Fix generating, verifying and extracting SATA
>     kwbimage
>   tools: kwboot: Fix parsing SATA kwbimage
>   arm: mvebu: spl: Fix parsing SATA kwbimage
>   cmd: mvebu/bubt: Fix parsing SATA kwbimage
>   arm: mvebu: spl: Remove checks for BOOT_DEVICE_MMC2 and
>     BOOT_DEVICE_MMC2_2
>   arm: mvebu: spl: Load proper U-Boot from selected eMMC boot partition
>   spl: mmc: Allow to disable SYS_MMCSD_FS_BOOT_PARTITION
>   arm: mvebu: spl: Fix support for loading U-Boot proper from SD card
>   tools: kwboot: Add more documentation references
>   tools: kwboot: Add image type documentation
>   tools: kwboot: Fix parsing UART image without data checksum
>   tools: kwboot: Validate optional kwbimage v1 headers
>   tools: kwboot: Add check that kwbimage contains DDR init code
>   tools: kwboot: Fix patching of SPI/NOR XIP images
>   tools: kwboot: Show image type and error parsing reasons
>   cmd: mvebu/bubt: Add support for selecting eMMC HW partition
>   cmd: mvebu/bubt: Add support for writing image to SATA disk
>   cmd: mvebu/bubt: Add support for reading image from the SATA disk
>     partition
>   cmd: mvebu/bubt: Rename variable image_size to hdr_size
>   cmd: mvebu/bubt: Mark all local symbols as static
>   cmd: mvebu/bubt: Do not modify image in A8K check_image_header()
>   cmd: mvebu/bubt: Check also A8K boot image checksum
>   cmd: mvebu/bubt: Set correct default image name for 32-bit Armada SoCs
>   cmd: mvebu/bubt: Better guess default MVEBU_*_BOOT option
>   cmd: mvebu/bubt: Fix warnings: unused variable 'secure_mode' and
>     'fuse_read_u64' defined but not used
>   cmd: mvebu/bubt: Enable command by default
>   tools: kwbimage: Fix dumping register set / DATA commands
>   tools: kwbimage: Fix endianity when dumping NAND_PAGE_SIZE
>   tools: kwbimage: Fix dumping NAND_BADBLK_LOCATION
>   tools: kwbimage: Fix dumping NAND_BLKSZ
>   tools: kwbimage: Fix generating of kwbimage v0 header checksum
>   tools: kwbimage: Fix endianity when printing kwbimage header
>   tools: kwbimage: Reject mkimage -F option
>   tools: kwbimage: Add support for dumping NAND_BLKSZ for v0 images
>   tools: kwbimage: Print binary image offset as size
>   tools: kwbimage: Print image data offset when printing kwbimage header
>   tools: kwbimage: Simplify add_secure_header_v1()
>   tools: kwbimage: Rename imagesz to dataoff
>   tools: kwbimage: Fix generating secure boot data image signature
>   tools: kwbimage: Fix invalid secure boot header signature
>   tools: mkimage: Do not fill legacy_img_hdr for non-legacy XIP images
>   tools: kwbimage: Add support for XIP SPI/NOR images
>   tools: mkimage: Print human readable error when -d is not specified
>   tools: mkimage: Do not try to open datafile when it is skipped
>   tools: kwbimage: Add support for creating an image with no data
>   arm: mvebu: Add support for generating NAND kwbimage
>   arm: mvebu: Add support for generating PEX kwbimage
>   arm: mvebu: Fix description of MVEBU_SPL_BOOT_DEVICE_(SPI|MMC) options
>   arm: mvebu: db-88f6820-amc: Add defconfig for NAND booting
>   arm: mvebu: clearfog: Add defconfig for SATA booting
>   arm: mvebu: Remove A39x relicts
>   arm: mvebu: Fix comment about CPU_ATTR_BOOTROM mapping
>   arm: mvebu: Define env_sf_get_env_addr() also for Proper U-Boot
>   arm: mvebu: Define SPL memory maps
>   doc/kwboot.1: Update example description
>
>  arch/arm/mach-mvebu/Kconfig                   |  23 +-
>  arch/arm/mach-mvebu/Makefile                  |  13 +
>  arch/arm/mach-mvebu/cpu.c                     |  11 +-
>  arch/arm/mach-mvebu/include/mach/cpu.h        |  21 ++
>  arch/arm/mach-mvebu/kwbimage.cfg.in           |   5 +
>  .../serdes/a38x/high_speed_env_spec.c         |   4 +-
>  .../serdes/a38x/high_speed_env_spec.h         |   4 +-
>  arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c |  14 +-
>  arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h |  30 --
>  arch/arm/mach-mvebu/spl.c                     |  84 +++--
>  cmd/mvebu/Kconfig                             |  18 ++
>  cmd/mvebu/bubt.c                              | 253 ++++++++++++---
>  common/spl/Kconfig                            |   9 +
>  common/spl/spl_mmc.c                          |  12 +-
>  ...rfog_defconfig => clearfog_sata_defconfig} |   2 +-
>  ...efconfig => db-88f6820-amc_nand_defconfig} |   6 +-
>  doc/kwboot.1                                  |   3 +-
>  doc/mvebu/cmd/bubt.txt                        |  25 +-
>  drivers/mtd/nand/raw/Kconfig                  |   4 +-
>  tools/kwbimage.c                              | 297 +++++++++++-------
>  tools/kwboot.c                                | 200 +++++++++++-
>  tools/mkimage.c                               |  11 +-
>  22 files changed, 768 insertions(+), 281 deletions(-)
>  copy configs/{clearfog_defconfig => clearfog_sata_defconfig} (98%)
>  copy configs/{db-88f6820-amc_defconfig => db-88f6820-amc_nand_defconfig} (92%)
>
> --
> 2.20.1
>

I went to patchwork and downloaded the series.
https://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-2-pali@kernel.org

When I applied the patches set there were some rejections.
<BEGIN LOG>
# patch -p1 < /usr/src/builds-u-boot-marvell/pali_patches/arm-mvebu-Various-fixes.patch

patching file tools/kwbimage.c
patching file tools/kwboot.c
patching file arch/arm/mach-mvebu/spl.c
patching file cmd/mvebu/bubt.c
patching file tools/kwboot.c
patching file arch/arm/mach-mvebu/spl.c
patching file cmd/mvebu/bubt.c
patching file arch/arm/mach-mvebu/spl.c
patching file arch/arm/mach-mvebu/Kconfig
Hunk #1 succeeded at 348 (offset 18 lines).
patching file arch/arm/mach-mvebu/spl.c
patching file arch/arm/mach-mvebu/Kconfig
Hunk #1 succeeded at 349 (offset 18 lines).
patching file arch/arm/mach-mvebu/spl.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file tools/kwboot.c
patching file cmd/mvebu/bubt.c
patching file doc/mvebu/cmd/bubt.txt
patching file cmd/mvebu/bubt.c
Hunk #1 FAILED at 420.
Hunk #2 FAILED at 430.
Hunk #3 FAILED at 656.
Hunk #4 FAILED at 1206.
4 out of 4 hunks FAILED -- saving rejects to file cmd/mvebu/bubt.c.rej
patching file doc/mvebu/cmd/bubt.txt
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file doc/mvebu/cmd/bubt.txt.rej
patching file cmd/mvebu/bubt.c
Hunk #1 succeeded at 765 (offset -140 lines).
Hunk #2 succeeded at 804 (offset -140 lines).
Hunk #3 succeeded at 825 (offset -140 lines).
patching file cmd/mvebu/bubt.c
Hunk #1 succeeded at 548 (offset -139 lines).
Hunk #2 succeeded at 567 (offset -140 lines).
Hunk #3 succeeded at 1000 (offset -140 lines).
Hunk #4 succeeded at 1026 (offset -142 lines).
patching file cmd/mvebu/bubt.c
Hunk #1 succeeded at 599 (offset -140 lines).
patching file cmd/mvebu/bubt.c
Hunk #1 succeeded at 585 (offset -140 lines).
Hunk #2 succeeded at 598 (offset -140 lines).
patching file cmd/mvebu/Kconfig
Hunk #1 succeeded at 15 (offset -3 lines).
patching file cmd/mvebu/bubt.c
Hunk #1 succeeded at 844 (offset -140 lines).
Hunk #2 succeeded at 873 (offset -140 lines).
patching file cmd/mvebu/Kconfig
Hunk #1 succeeded at 3 with fuzz 1.
patching file tools/kwbimage.c
Hunk #1 succeeded at 2156 (offset 8 lines).
Hunk #2 succeeded at 2241 (offset 8 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 2190 (offset 8 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 2192 with fuzz 2 (offset 8 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 1929 (offset 1 line).
patching file tools/kwbimage.c
Hunk #1 succeeded at 2449 (offset 9 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 2192 (offset 7 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 1915 (offset 1 line).
patching file tools/kwbimage.c
Hunk #1 succeeded at 1930 (offset 1 line).
patching file tools/kwbimage.c
Hunk #3 succeeded at 1529 (offset 1 line).
patching file tools/kwbimage.c
Hunk #2 succeeded at 1050 with fuzz 2.
Hunk #4 succeeded at 1533 (offset 1 line).
Hunk #5 succeeded at 1812 (offset 1 line).
Hunk #6 succeeded at 1863 (offset 1 line).
Hunk #7 succeeded at 1885 (offset 1 line).
patching file tools/kwbimage.c
patching file tools/kwbimage.c
Hunk #4 FAILED at 1014.
Hunk #5 succeeded at 1051 with fuzz 2.
Hunk #11 FAILED at 1454.
Hunk #12 succeeded at 1525 (offset 1 line).
Hunk #13 succeeded at 1877 (offset 1 line).
Hunk #14 succeeded at 2103 (offset 7 lines).
2 out of 14 hunks FAILED -- saving rejects to file tools/kwbimage.c.rej
patching file tools/mkimage.c
Hunk #1 succeeded at 860 (offset 18 lines).
patching file tools/mkimage.c
Hunk #1 succeeded at 600 (offset 32 lines).
patching file tools/mkimage.c
Hunk #1 succeeded at 599 (offset 32 lines).
patching file tools/kwbimage.c
Hunk #1 succeeded at 1809 (offset -78 lines).
Hunk #2 succeeded at 2031 (offset -77 lines).
Hunk #3 succeeded at 2051 (offset -77 lines).
Hunk #4 succeeded at 2124 (offset -77 lines).
Hunk #5 succeeded at 2460 with fuzz 2 (offset -72 lines).
patching file arch/arm/mach-mvebu/Kconfig
Hunk #1 succeeded at 339 (offset 18 lines).
Hunk #2 succeeded at 369 (offset 18 lines).
patching file arch/arm/mach-mvebu/Makefile
patching file arch/arm/mach-mvebu/kwbimage.cfg.in
patching file drivers/mtd/nand/raw/Kconfig
Hunk #1 succeeded at 628 (offset 78 lines).
Hunk #2 succeeded at 656 (offset 79 lines).
patching file arch/arm/mach-mvebu/Kconfig
Hunk #1 succeeded at 363 (offset 18 lines).
patching file arch/arm/mach-mvebu/Makefile
patching file arch/arm/mach-mvebu/Kconfig
Hunk #1 succeeded at 331 (offset 18 lines).
Hunk #2 succeeded at 345 (offset 18 lines).
patching file configs/db-88f6820-amc_nand_defconfig (copied from
configs/db-88f6820-amc_defconfig)
Hunk #1 succeeded at 8 with fuzz 2 (offset 2 lines).
patching file configs/clearfog_sata_defconfig (copied from
configs/clearfog_defconfig)
Hunk #1 succeeded at 9 with fuzz 2 (offset 2 lines).
patching file arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
patching file arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
patching file arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
patching file arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
patching file arch/arm/mach-mvebu/cpu.c
patching file arch/arm/mach-mvebu/cpu.c
patching file arch/arm/mach-mvebu/include/mach/cpu.h
patching file arch/arm/mach-mvebu/spl.c
patching file arch/arm/mach-mvebu/include/mach/cpu.h
patching file doc/kwboot.1
<END LOG>

I'm on the latest master branch (just did a git pull today). Could
some patches be out of order?

Thanks,
Tony


More information about the U-Boot mailing list