From 7dcaa67dc88ef2ad9e7b632c97ecb49aa366c807 Mon Sep 17 00:00:00 2001 From: seteiro Date: Sat, 17 Oct 2026 22:35:25 +0800 Subject: [PATCH] drivers/misc: register rt_null at BOARD init for default console (#11472) rt_console_set_device() is typically called in rt_hw_board_init() right after rt_components_board_init(). null was INIT_DEVICE (level 3), so it was not registered yet and could not be RT_CONSOLE_DEVICE_NAME. Raise to INIT_BOARD_EXPORT; null is a pure software sink with no HW deps. Co-Authored-By: Grok --- components/drivers/misc/rt_null.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/drivers/misc/rt_null.c b/components/drivers/misc/rt_null.c index 4cbc6e8e9447..1dd6f25e7c46 100644 --- a/components/drivers/misc/rt_null.c +++ b/components/drivers/misc/rt_null.c @@ -4,6 +4,7 @@ * Change Logs: * Date Author Notes * 2020-12-03 quanzhao the first version + * 2026-10-17 seteiro raise init to BOARD so null can be default console (#11472) */ #include @@ -70,5 +71,7 @@ int null_device_init(void) return 0; } -INIT_DEVICE_EXPORT(null_device_init); +/* Register at BOARD level so rt_console_set_device("null") in board init can find it. + * null is a pure software sink; no hardware dependency. See #11472. */ +INIT_BOARD_EXPORT(null_device_init);