From: Johan Jonker <jbx6244@gmail.com>
To: u-boot@0leil.net
Cc: kever.yang@rock-chips.com, sjg@chromium.org, trini@konsulko.com,
u-boot@lists.u-boot-project.org, eddie.cai.linux@gmail.com
Subject: [PATCH v3 08/12] rockchip: tools: add comment section to rksd.c
Date: Thu, 30 Jul 2026 15:35:10 +0200 [thread overview]
Message-ID: <b6f80fe1-f0ee-4750-a74a-97398a91dc08@gmail.com> (raw)
In-Reply-To: <5aed2a27-bd7d-4b71-a6c1-0b46b41f3462@gmail.com>
README.rockchip must be removed.
Move the rksd comment section to rksd.c
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
tools/rksd.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
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 <sjg@chromium.org>
*
- * 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.
*/
#include "imagetool.h"
--
2.39.5
next prev parent reply other threads:[~2026-07-30 13:35 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 13:29 [PATCH v3 00/12] doc: clean up README.rockchip Johan Jonker
2026-07-30 13:32 ` [PATCH v3 01/12] rockchip: scripts: remove rkmux.py Johan Jonker
2026-07-30 15:43 ` Quentin Schulz
2026-07-30 13:33 ` [PATCH v3 02/12] rockchip: doc: change TPL phrase Johan Jonker
2026-07-30 15:54 ` Quentin Schulz via U-Boot
2026-07-30 13:33 ` [PATCH v3 03/12] rockchip: doc: add BootROM mode text Johan Jonker
2026-07-31 7:47 ` Jonas Karlman
2026-07-30 13:33 ` [PATCH v3 04/12] rockchip: doc: remove TODO Johan Jonker
2026-07-30 13:34 ` [PATCH v3 05/12] rockchip: doc: add more building instructions Johan Jonker
2026-07-30 13:34 ` [PATCH v3 06/12] rockchip: doc: add more eMMC program examples Johan Jonker
2026-07-31 8:20 ` Jonas Karlman
2026-07-30 13:34 ` [PATCH v3 07/12] rockchip: doc: add boot medium layout text Johan Jonker
2026-07-31 8:32 ` Jonas Karlman
[not found] ` <jonas@kwiboo.se>
2026-07-31 15:10 ` Stefan Monnier
2026-07-31 18:01 ` Jonas Karlman
2026-08-04 15:38 ` [PATCH 1/9] ram: rockchip: rk3568: Simplify get_info() ops Stefan Monnier
2026-08-04 18:53 ` Jonas Karlman
2026-07-30 13:35 ` Johan Jonker [this message]
2026-07-31 8:41 ` [PATCH v3 08/12] rockchip: tools: add comment section to rksd.c Jonas Karlman
2026-07-30 13:35 ` [PATCH v3 09/12] rockchip: tools: add comment section to rkspi.c Johan Jonker
2026-07-31 8:51 ` Jonas Karlman
2026-07-30 13:35 ` [PATCH v3 10/12] rockchip: tools: add comment section to rkimage.c Johan Jonker
2026-07-30 13:36 ` [PATCH v3 11/12] rockchip: doc: rockusb: remove refer to README.rockchip Johan Jonker
2026-07-30 13:36 ` [PATCH v3 12/12] rockchip: doc: remove README.rockchip Johan Jonker
-- strict thread matches above, loose matches on Subject: below --
2026-08-04 10:57 [PATCH 0/9] rockchip: Remove unneeded syscon driver for RK35xx Jonas Karlman
2026-08-04 10:57 ` [PATCH 1/9] ram: rockchip: rk3568: Simplify get_info() ops Jonas Karlman
2026-08-04 10:57 ` [PATCH 2/9] ram: rockchip: rk3588: " Jonas Karlman
2026-08-04 10:57 ` [PATCH 3/9] video: rockchip: dw_mipi_dsi: Get GRF base address from phandle Jonas Karlman
2026-08-04 10:57 ` [PATCH 4/9] rockchip: rk3568: Remove unneeded syscon driver Jonas Karlman
2026-08-04 10:57 ` [PATCH 5/9] rockchip: rk3588: " Jonas Karlman
2026-08-04 10:57 ` [PATCH 6/9] rockchip: rk3576: " Jonas Karlman
2026-08-04 10:57 ` [PATCH 7/9] rockchip: rk3528: " Jonas Karlman
2026-08-04 10:57 ` [PATCH 8/9] rockchip: rk3506: " Jonas Karlman
2026-08-04 10:57 ` [PATCH 9/9] rockchip: include: Remove unused ROCKCHIP_SYSCON_x enum values Jonas Karlman
2026-08-04 19:19 ` [PATCH 0/9] rockchip: Remove unneeded syscon driver for RK35xx Simon Glass
2026-08-04 19:57 ` Jonas Karlman
2026-08-07 19:46 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6f80fe1-f0ee-4750-a74a-97398a91dc08@gmail.com \
--to=jbx6244@gmail.com \
--cc=eddie.cai.linux@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@0leil.net \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox