]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: mkimage: add support for verify_header/print_header
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 30 May 2017 21:32:08 +0000 (23:32 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 7 Jun 2017 13:29:22 +0000 (07:29 -0600)
commitf307e04fbd6b6f115919cc87e4003469294f7d37
tree1364eeacfb8f0c3e01601f6837195e00c74ff1f9
parent5b020431cb2f42efc5d8556423c2023503a2e1e1
rockchip: mkimage: add support for verify_header/print_header

The rockchip image generation was previously missing the ability to
verify the generated header (and dump the image-type) without having
to resort to hexdump or od. Experience in our testing has showed it
to be very easy to get the rkspi and rksd images mixed up and the
lab... so we add the necessary support to have dumpimage tell us
what image type we're dealing with.

This change set adds the verify_header and print_header capability
to the rksd/rkspi image drivers (through shared code in rkcommon).

As of now, we only support images fully that are not RC4-encoded for
the SPL payload (i.e. header1 and payload). For RC4-encoded payloads,
the outer header (header0) is checked, but no detection of whether
this is a SD/MMC or SPI formatted payload takes place.

The output of dumpsys now prints the image type (spl_hdr), whether it
is a SD/MMC or SPI image, and the (padded) size of the image:
  $ ./tools/dumpimage -l ./spl.img
  Image Type:   Rockchip RK33 (SD/MMC) boot image
                               ^^^^^^ SD/MMC vs. SPI indication
                         ^^^^ spl_hdr indicated by the image
  Data Size:    79872 bytes

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
tools/rkcommon.c
tools/rkcommon.h
tools/rksd.c
tools/rkspi.c