From: Jeffy Chen Date: Fri, 27 Dec 2019 10:03:24 +0800 Subject: [PATCH v3 0/3] mkimage/rockchip: support packing optional second level boot-loader Message-ID: <20191227020327.23868-1-jeffy.chen@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When enabling back-to-bootrom, the bootrom would continue to load the second level boot-loader. And currently we are packing it by appending the generated image manually (with a predefined max size): ./firefly-rk3288/tools/mkimage -n rk3288 -T rksd -d \ firefly-rk3288/spl/u-boot-spl-dtb.bin out && \ cat firefly-rk3288/u-boot-dtb.bin >> out This series add support of packing optional second level loader with mkimage tool: ./tools/mkimage -n rk3399 -T rksd -d \ rk3399_ddr_800MHz_v1.24.bin:rk3399_miniloader_v1.19.bin out Changes in v3: Rule out hdr when checking spl size. (The bootrom would put hdr on stack.) Changes in v2: Do rc4 encode for boot data when needed as well. Jeffy Chen (3): rockchip: mkimage: support packing optional second level boot-loader doc: rockchip: document packing second level loader with mkimage rockchip: mkimage: fix wrong range of rc4 encoding for boot image doc/README.rockchip | 11 +++ tools/imagetool.h | 1 + tools/mkimage.c | 8 ++ tools/rkcommon.c | 244 +++++++++++++++++++++++++++++++++++++++++++--------- tools/rkcommon.h | 18 ++-- tools/rkimage.c | 2 +- tools/rksd.c | 35 +------- tools/rkspi.c | 42 +++------ 8 files changed, 244 insertions(+), 117 deletions(-) -- 2.11.0