[U-Boot] [U-Boot, v4, 11/19] rockchip: mkimage: add support for rockchip nand boot image

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Mon Aug 21 12:01:27 UTC 2017


> The Rockchip boot ROM requires a particular file format for booting from NAND:
> 
> * It starts with 512-byte, rc4 encoded header and is aligned to nand page size
> 
> * Then first 2KB of first stage loader (tpl) aligned to nand page size
> * n empty pages
> 
> * second 2KB of first stage loader (tpl) aligned to nand page size
> * n empty pages
> 
> * ...
> 
> * first 2KB of second stage loader (spl) aligned to nand page size
> * n empty pages
> 
> * second 2KB of first stage loader (spl) aligned to nand page size
> * n empty pages
> 
> * ...
> 
> Size of spl and tpl must be aligned to 2KB.
> 
> example usage for nand with page size 16384 and one empty page in iteration:
> 
>     # mkimage -n rk3066 -T rknand -d ./u-boot/tpl/u-boot-tpl.bin:./u-boot/spl/u-boot-spl.bin -X 16384,1 out
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3691 at gmail.com>
> ---
> Changes since v1:
> - none
> 
> Changes since v2:
> - none
> 
> Changes since v3:
> - none
> 
>  common/image.c    |   1 +
>  include/image.h   |   1 +
>  tools/Makefile    |   2 +-
>  tools/imagetool.h |   1 +
>  tools/mkimage.c   |   8 ++-
>  tools/rkcommon.c  |  10 ++--
>  tools/rkcommon.h  |  10 +++-
>  tools/rknand.c    | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tools/rksd.c      |   2 +-
>  tools/rkspi.c     |   2 +-
>  10 files changed, 183 insertions(+), 10 deletions(-)
>  create mode 100644 tools/rknand.c
> 

Acked-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>


More information about the U-Boot mailing list