[PATCH 7/8] samples: rust_minimal: demonstrate early_param usage

From: Matthew Wood

Date: Thu Feb 26 2026 - 18:51:19 EST


Add an early_param annotation to the test_str parameter in the
rust_minimal sample module, registering it as "testing_early_str="
on the kernel command line.

When the module is built-in, this allows the parameter to be set
directly on the boot command line without dotted module notation:

testing_early_str=world

Signed-off-by: Matthew Wood <thepacketgeek@xxxxxxxxx>
---
samples/rust/rust_minimal.rs | 2 ++
1 file changed, 2 insertions(+)

diff --git a/samples/rust/rust_minimal.rs b/samples/rust/rust_minimal.rs
index 59955e95e31a..9fc0c0a864d3 100644
--- a/samples/rust/rust_minimal.rs
+++ b/samples/rust/rust_minimal.rs
@@ -35,6 +35,8 @@
test_str: string {
default: "hello",
description: "This parameter has a default of hello",
+ // This will allow the arg to be used in kernel cmdline without dotted notation
+ early_param: "testing_early_str=",
}
},
}
--
2.52.0