All of lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: [PATCH v2 09/11] rockchip: tools: add comment section to rksd.c
Date: Tue, 28 Jul 2026 08:56:33 +0200	[thread overview]
Message-ID: <5c9acc31-33f4-4305-8858-983595ce5607@gmail.com> (raw)
In-Reply-To: <734d54aa-6523-4c2b-ba3a-a51b063a340e@gmail.com>

README.rockchip must be removed.
Move the rksd comment section to rksd.c

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 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


  parent reply	other threads:[~2026-07-28  6:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  6:51 [PATCH v2 00/11] doc: clean up README.rockchip Johan Jonker
2026-07-28  6:53 ` [PATCH v2 01/11] rockchip: scripts: remove rkmux.py Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:53 ` [PATCH v2 02/11] rockchip: doc: change TPL phrase Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:54 ` [PATCH v2 03/11] rockchip: doc: add BootROM/MaskROM mode text Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:54 ` [PATCH v2 04/11] rockchip: doc: remove TODO Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:55 ` [PATCH v2 05/11] rockchip: doc: remove copyright lines Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:55 ` [PATCH v2 06/11] rockchip: doc: add more building instructions Johan Jonker
2026-07-29 13:40   ` Simon Glass
2026-07-28  6:56 ` [PATCH v2 07/11] rockchip: doc: add more EMMC program examples Johan Jonker
2026-07-29 13:41   ` Simon Glass
2026-07-28  6:56 ` [PATCH v2 08/11] rockchip: doc: add boot medium layout text Johan Jonker
     [not found]   ` <jbx6244@gmail.com>
2026-07-28 15:33     ` Stefan Monnier
2026-07-28 15:39     ` Stefan Monnier
2026-07-29 13:43   ` Simon Glass
2026-07-28  6:56 ` Johan Jonker [this message]
2026-07-29 13:41   ` [PATCH v2 09/11] rockchip: tools: add comment section to rksd.c Simon Glass
2026-07-28  6:56 ` [PATCH v2 10/11] rockchip: tools: add comment section to rkspi.c Johan Jonker
2026-07-29 13:41   ` Simon Glass
2026-07-28  6:57 ` [PATCH v2 11/11] rockchip: doc: remove README.rockchip Johan Jonker
2026-07-29 13:43   ` Simon Glass
2026-07-29 13:44 ` [v2,00/11] doc: clean up README.rockchip 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=5c9acc31-33f4-4305-8858-983595ce5607@gmail.com \
    --to=jbx6244@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.