[U-Boot] [PATCH v3 0/3] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support
Andy Yan
andyshrk at gmail.com
Wed May 31 09:44:51 UTC 2017
Hi Philipp:
2017-05-31 5:32 GMT+08:00 Philipp Tomsich <
philipp.tomsich at theobroma-systems.com>:
>
> We support booting both from SD/MMC images and SPI images on the
> RK3399-Q7 for different use-cases (e.g. external boot in development
> from the SD card, internal boot from MMC or SPI depending on whether
> the SPI flash is populated on any given configuration option).
>
> In getting the SPI image support ready for production, we found a
> few areas that warranted improvements:
> - we had broken SPI bootstrap earlier in the changes introducting
> boot0-style images for the RK3399 (this needed fixing)
> - in fixing the broken SPI padding calculation, it became apparent
> that it's best to refactor and document things before we make
> the same mistake again in the future
> - with both SD/MMC and SPI images being used for various purposes
> by various people, the wrong image style was inadvertendly used
> in some tests... so we support for 'dumpimage' (i.e. verify_header
> and print_header) had to be added to quickly check the image
> type being handled
>
> With v3, we pad the images to 2KB again, as this is required by the
> BootROM (see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html).
>
> Changes in v3:
> - (added patch) forces the alignment/padding to 2KB for SD images, as
> this would otherwise break the back-to-bootrom functionality
> - added in v3
>
> Changes in v2:
> - (in rkcommon_verify_header): changed to use a standard error
> (i.e. from errno.h) to convey 'header0 signature does not match'
> [squash of: "rockchip: mkimage: don't mix standard errors and FDT"]
>
> Philipp Tomsich (3):
> rockchip: mkimage: add support for verify_header/print_header
> rockchip: mkimage: force 2KB alignment for init_size
> rockchip: mkimage: set init_boot_size to avoid confusing the boot ROM
>
> tools/rkcommon.c | 130 ++++++++++++++++++++++++++++++
> ++++++++++++++++++++++---
> tools/rkcommon.h | 20 +++++++++
> tools/rksd.c | 35 ++++-----------
> tools/rkspi.c | 23 ++--------
> 4 files changed, 158 insertions(+), 50 deletions(-)
>
> --
> 1.9.1
>
> For patch (2)(3): Tested-by: Andy Yan <andy.yan at rock-chips.com> on
RV1108 evb board.
More information about the U-Boot
mailing list