> 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 <paweljarosz3...@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.toms...@theobroma-systems.com>
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to