* [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA
@ 2026-01-07 12:57 Ahmad Fatoum
2026-01-07 12:57 ` [PATCH 2/3] fixup! commands: implement rksecure command Ahmad Fatoum
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2026-01-07 12:57 UTC (permalink / raw)
To: barebox; +Cc: mtr, Ahmad Fatoum
tee: rksecure: add missing header for ARRAY_SIZE
When compiling for sandbox allyesconfig in CI, build fails due to
missing include for <linux/array_size.h>.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/tee/optee/rksecure.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tee/optee/rksecure.c b/drivers/tee/optee/rksecure.c
index 6bc9a61571c2..3a5cb0cb7be1 100644
--- a/drivers/tee/optee/rksecure.c
+++ b/drivers/tee/optee/rksecure.c
@@ -5,6 +5,7 @@
#include <linux/tee_drv.h>
#include <linux/uuid.h>
+#include <linux/array_size.h>
#include <uapi/linux/tee.h>
#include <rk_secure_boot.h>
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] fixup! commands: implement rksecure command 2026-01-07 12:57 [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Ahmad Fatoum @ 2026-01-07 12:57 ` Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 3/3] " Ahmad Fatoum 2026-01-07 13:05 ` [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Sascha Hauer 2 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2026-01-07 12:57 UTC (permalink / raw) To: barebox; +Cc: mtr, Ahmad Fatoum commands: rksecure: fix bogus early exit Due to missing braces, return ret was always executed. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- commands/rksecure.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/rksecure.c b/commands/rksecure.c index e9b7e204c1bd..e0c20f75fcec 100644 --- a/commands/rksecure.c +++ b/commands/rksecure.c @@ -59,9 +59,10 @@ static int rksecure_print_info(void) int ret; ret = rk_secure_boot_get_info(&info); - if (ret) + if (ret) { pr_err("Failed to read secure boot info\n"); return ret; + } printf("Public Root Key hash: %*phN\n" "Secure boot: %s\n" -- 2.47.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] fixup! commands: implement rksecure command 2026-01-07 12:57 [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 2/3] fixup! commands: implement rksecure command Ahmad Fatoum @ 2026-01-07 12:57 ` Ahmad Fatoum 2026-01-07 13:05 ` [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Sascha Hauer 2 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2026-01-07 12:57 UTC (permalink / raw) To: barebox; +Cc: mtr, Ahmad Fatoum commands: rksecure: use printf for command errors pr_err is logged, may be shared with Linux via pstore and outputs to stderr, which may point at a different console or be hidden by log level setting. printf on the other hand is not logged, uses stdout and is thus the correct function to use to output, regular or error, in commands. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- commands/rksecure.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/rksecure.c b/commands/rksecure.c index e0c20f75fcec..81b4f1a62860 100644 --- a/commands/rksecure.c +++ b/commands/rksecure.c @@ -17,14 +17,14 @@ static int rksecure_write_hash_hex(const char *hex, u32 key_size_bits) u8 digest[SHA256_DIGEST_SIZE]; if (strlen(hex) != SHA256_DIGEST_SIZE * 2) { - pr_err("%s has wrong size: Expected %d characters\n", + printf("%s has wrong size: Expected %d characters\n", hex, SHA256_DIGEST_SIZE * 2); return -EINVAL; } ret = hex2bin(digest, hex, SHA256_DIGEST_SIZE); if (ret < 0) { - pr_err("Failed to parse hash %s\n", hex); + printf("Failed to parse hash %s\n", hex); return -EINVAL; } @@ -41,7 +41,7 @@ static int rksecure_write_hash_file(const char *filename, u32 key_size_bits) if (ret) return ret; if (size != SHA256_DIGEST_SIZE) { - pr_err("%s has wrong size: Expected %d bytes\n", + printf("%s has wrong size: Expected %d bytes\n", filename, SHA256_DIGEST_SIZE); return -EINVAL; } @@ -60,7 +60,7 @@ static int rksecure_print_info(void) ret = rk_secure_boot_get_info(&info); if (ret) { - pr_err("Failed to read secure boot info\n"); + printf("Failed to read secure boot info\n"); return ret; } -- 2.47.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA 2026-01-07 12:57 [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 2/3] fixup! commands: implement rksecure command Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 3/3] " Ahmad Fatoum @ 2026-01-07 13:05 ` Sascha Hauer 2 siblings, 0 replies; 4+ messages in thread From: Sascha Hauer @ 2026-01-07 13:05 UTC (permalink / raw) To: barebox, Ahmad Fatoum; +Cc: mtr On Wed, 07 Jan 2026 13:57:57 +0100, Ahmad Fatoum wrote: > tee: rksecure: add missing header for ARRAY_SIZE > > When compiling for sandbox allyesconfig in CI, build fails due to > missing include for <linux/array_size.h>. > > Applied, thanks! [1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA https://git.pengutronix.de/cgit/barebox/commit/?id=bbd21ce99218 (link may not be stable) [2/3] fixup! commands: implement rksecure command https://git.pengutronix.de/cgit/barebox/commit/?id=3f0a7e09a206 (link may not be stable) [3/3] fixup! commands: implement rksecure command https://git.pengutronix.de/cgit/barebox/commit/?id=3f0a7e09a206 (link may not be stable) Best regards, -- Sascha Hauer <s.hauer@pengutronix.de> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-07 13:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-01-07 12:57 [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 2/3] fixup! commands: implement rksecure command Ahmad Fatoum 2026-01-07 12:57 ` [PATCH 3/3] " Ahmad Fatoum 2026-01-07 13:05 ` [PATCH 1/3] fixup! tee: drivers: add driver for Rockchip Secure Boot PTA Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox