]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: fix spl_board_init
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 3 Oct 2023 00:59:46 +0000 (02:59 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 13 Oct 2023 17:15:41 +0000 (10:15 -0700)
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/spl.c

index 09e3d10d6a502f2e6d85a31e9a2182df9d1f4930..7590f1b80a6eb53dcd56361b851e3860ea7a4cb1 100644 (file)
@@ -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();