All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/3] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support
@ 2017-05-30 21:32 Philipp Tomsich
  2017-05-30 21:32 ` [U-Boot] [PATCH v3 1/3] rockchip: mkimage: add support for verify_header/print_header Philipp Tomsich
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Philipp Tomsich @ 2017-05-30 21:32 UTC (permalink / raw)
  To: u-boot


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-05 21:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 21:32 [U-Boot] [PATCH v3 0/3] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support Philipp Tomsich
2017-05-30 21:32 ` [U-Boot] [PATCH v3 1/3] rockchip: mkimage: add support for verify_header/print_header Philipp Tomsich
2017-06-05 21:31   ` sjg at google.com
2017-05-30 21:32 ` [U-Boot] [PATCH v3 2/3] rockchip: mkimage: force 2KB alignment for init_size Philipp Tomsich
2017-06-01  3:11   ` Simon Glass
2017-06-05 21:31     ` sjg at google.com
2017-05-30 21:32 ` [U-Boot] [PATCH v3 3/3] rockchip: mkimage: set init_boot_size to avoid confusing the boot ROM Philipp Tomsich
2017-06-01  3:12   ` Simon Glass
2017-06-05 21:31     ` sjg at google.com
2017-05-31  9:44 ` [U-Boot] [PATCH v3 0/3] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support Andy Yan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.