[U-Boot] [PATCH v1 0/8] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support
Philipp Tomsich
philipp.tomsich at theobroma-systems.com
Mon Apr 17 15:47:59 UTC 2017
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
Note that with the refactored calculation of the image-size, we
don't pad the image to the maximum SPL size any longer, but pad
SD/MMC to the next 512 byte block (RK_BLK_SIZE) and SPI to the
next 2K boundary.
Philipp Tomsich (8):
rockchip: mkimage: rkspi: include the header sector in the SPI size
calculation
rockchip: mkimage: rewrite padding calculation for SD/MMC and SPI
images
rockchip: mkimage: Update comments for header size
rockchip: mkimage: rksd: pad SD/MMC images to a full blocksize
rockchip: mkimage: clarify header0 initialisation
rockchip: mkimage: play nice with dumpimage
rockchip: mkimage: remove placeholder functions from rkimage
rockchip: mkimage: add support for verify_header/print_header
tools/rkcommon.c | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
tools/rkcommon.h | 29 ++++++++-
tools/rkimage.c | 21 +-----
tools/rksd.c | 47 +++++---------
tools/rkspi.c | 62 +++++++++---------
5 files changed, 255 insertions(+), 99 deletions(-)
--
1.9.1
More information about the U-Boot
mailing list