Hi Johan, On 7/30/2026 3:35 PM, Johan Jonker wrote: > README.rockchip must be removed. > Move the rksd comment section to rksd.c > > Signed-off-by: Johan Jonker <[email protected]> > Reviewed-by: Simon Glass <[email protected]> > --- > tools/rksd.c | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > -- > 2.39.5 > > diff --git a/tools/rksd.c b/tools/rksd.c > index 7d46a1b07b3a..ea12b9cac12e 100644 > --- a/tools/rksd.c > +++ b/tools/rksd.c > @@ -3,7 +3,26 @@ > * (C) Copyright 2015 Google, Inc > * Written by Simon Glass <[email protected]> > * > - * See README.rockchip for details of the rksd format > + * rksd.c produces an image consisting of 32KB of empty space, a header and > + * u-boot-spl-dtb.bin. The header is defined by 'struct header0_info' > although > + * most of the fields are unused by U-Boot. We just need to specify the > + * signature, a flag and the block offset and size of the SPL image. > + * > + * The header occupies a single block but we pad it out to 4 blocks. The > header > + * is encoding using RC4 with the key 7c4e0304550509072d2c7b38170d1711. The > SPL > + * image can be encoded too but we don't do that. > + * > + * The maximum size of u-boot-spl-dtb.bin which the boot ROM will read is > 32KB, > + * or 0x40 blocks. This is a severe and annoying limitation. There may be a > way > + * around this limitation, since there is plenty of SRAM, but at present the > + * board refuses to boot if this limit is exceeded. > + * > + * The image produced is padded up to a block boundary (512 bytes). It > should be > + * written to the start of an SD card using dd. > + * > + * Since this image is set to load U-Boot from the SD card at block offset, > + * CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR, dd should be used to write > + * u-boot-dtb.img to the SD card at that offset.
Not sure where you got this text from, but it seem to be very outdated and not fully applicable. Some examples of incorrect information: - 32 kb size is not fixed, it is now treated as a soc specific limit defined in rkcommon.c - u-boot-spl-dtb.bin is not really used or picked anymore, the binman mkimage node in rockchip-u-boot.dtsi determines what payload is added as the secondary image. - 'struct header0_info' is only correct for v1 format, not for v2 format. - rc4 encoding is only applicable to v1 format - image should not be written to start of sd card - u-boot-dtb.img should no longer be used Most of this information is already declared inside rkcommon.c or in rockchip.rst, maybe we can just drop this? Regards, Jonas > */ > > #include "imagetool.h"
