[PATCH 1/1] sandbox: fix spl_board_init

sandbox_spl_defconfig with CONFIG_SPL_UNIT_TEST=n fails to build.
in function `spl_board_init': arch/sandbox/cpu/spl.c:134:(.text.spl_board_init+0x4a): undefined reference to `ut_run_list'
Add the missing configuration check.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- arch/sandbox/cpu/spl.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 09e3d10d6a..7590f1b80a 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -126,6 +126,9 @@ void spl_board_init(void) { struct sandbox_state *state = state_get_current();
+ if (!CONFIG_IS_ENABLED(UNIT_TEST)) + return; + if (state->run_unittests) { struct unit_test *tests = UNIT_TEST_ALL_START(); const int count = UNIT_TEST_ALL_COUNT();

On Mon, 2 Oct 2023 at 19:00, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
sandbox_spl_defconfig with CONFIG_SPL_UNIT_TEST=n fails to build.
in function `spl_board_init': arch/sandbox/cpu/spl.c:134:(.text.spl_board_init+0x4a): undefined reference to `ut_run_list'
Add the missing configuration check.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
arch/sandbox/cpu/spl.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Mon, 2 Oct 2023 at 19:00, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
sandbox_spl_defconfig with CONFIG_SPL_UNIT_TEST=n fails to build.
in function `spl_board_init': arch/sandbox/cpu/spl.c:134:(.text.spl_board_init+0x4a): undefined reference to `ut_run_list'
Add the missing configuration check.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
arch/sandbox/cpu/spl.c | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, thanks!
participants (2)
-
Heinrich Schuchardt
-
Simon Glass