From: Michael Tretter <m.tretter@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Cc: Michael Tretter <m.tretter@pengutronix.de>
Subject: [PATCH 1/4] filetype: detect Rockchip signed images
Date: Wed, 20 Aug 2025 12:16:57 +0200 [thread overview]
Message-ID: <20250820-rkimage-signed-v1-1-0ad3d1d1c952@pengutronix.de> (raw)
In-Reply-To: <20250820-rkimage-signed-v1-0-0ad3d1d1c952@pengutronix.de>
Rockchip signed images use the RKSS magic instead of the RKNS magic.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
common/filetype.c | 4 ++++
include/filetype.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/common/filetype.c b/common/filetype.c
index 019f34811103ac66dae05e8c09b15fc061602eb8..eb397a175cb63df06e4426d2b99e4fde360c5b11 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -85,6 +85,8 @@ static const struct filetype_str filetype_str[] = {
[filetype_rockchip_rkns_image] = { "Rockchip boot image", "rk-image" },
[filetype_fip] = { "TF-A Firmware Image Package", "fip" },
[filetype_zstd_compressed] = { "ZSTD compressed", "zstd" },
+ [filetype_rockchip_rkss_image] = { "Rockchip signed boot image",
+ "rk-image" },
};
static const char *file_type_to_nr_string(enum filetype f)
@@ -385,6 +387,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
if (strncmp(buf8, "RKNS", 4) == 0)
return filetype_rockchip_rkns_image;
+ if (strncmp(buf8, "RKSS", 4) == 0)
+ return filetype_rockchip_rkss_image;
if (le32_to_cpu(buf[0]) == le32_to_cpu(0xaa640001))
return filetype_fip;
diff --git a/include/filetype.h b/include/filetype.h
index e66237878615ecf039e12ac68055000b60fc13a9..6f4a103df3040ef259660d06ca878f72e2245c12 100644
--- a/include/filetype.h
+++ b/include/filetype.h
@@ -66,6 +66,7 @@ enum filetype {
filetype_qemu_fw_cfg,
filetype_nxp_fspi_image,
filetype_zstd_compressed,
+ filetype_rockchip_rkss_image,
filetype_max,
};
--
2.39.5
next prev parent reply other threads:[~2025-08-20 12:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 10:16 [PATCH 0/4] ARM: rockchip: add support for " Michael Tretter
2025-08-20 10:16 ` Michael Tretter [this message]
2025-08-20 10:16 ` [PATCH 2/4] ARM: rockchip: bbu: accept " Michael Tretter
2025-08-20 10:16 ` [PATCH 3/4] ARM: rockchip: bootm: don't propagate error from register_image_handler Michael Tretter
2025-08-20 10:17 ` [PATCH 4/4] ARM: rockchip: bootm: accept signed images Michael Tretter
2025-08-20 12:30 ` [PATCH 0/4] ARM: rockchip: add support for " Sascha Hauer
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=20250820-rkimage-signed-v1-1-0ad3d1d1c952@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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