diff mbox series

[1/1] test: build test/boot for CONFIG_UT_BOOTSTD=n

Message ID 20231216151954.66658-1-heinrich.schuchardt@canonical.com
State Accepted
Commit 6a8a23ccfb2486bc2f35f36c7eadeb1e13534055
Delegated to: Tom Rini
Headers show
Series [1/1] test: build test/boot for CONFIG_UT_BOOTSTD=n | expand

Commit Message

Heinrich Schuchardt Dec. 16, 2023, 3:19 p.m. UTC
Building sandbox_defconfig with

    CONFIG_UT_BOOTSTD=n
    CONFIG_MEASURMENT=y
 
results in an error:

    /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0x408):
    undefined reference to `do_ut_measurement'

Fixes: 5999ea20fa42 ("test: Add sandbox TPM boot measurement")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 test/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Dec. 16, 2023, 6:45 p.m. UTC | #1
On Sat, 16 Dec 2023 at 08:20, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Building sandbox_defconfig with
>
>     CONFIG_UT_BOOTSTD=n
>     CONFIG_MEASURMENT=y
>
> results in an error:
>
>     /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0x408):
>     undefined reference to `do_ut_measurement'
>
> Fixes: 5999ea20fa42 ("test: Add sandbox TPM boot measurement")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  test/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

This looks like the best fix, to me.


>
> diff --git a/test/Makefile b/test/Makefile
> index 6b8a1506f5..feba097543 100644
> --- a/test/Makefile
> +++ b/test/Makefile
> @@ -23,7 +23,7 @@ obj-$(CONFIG_UT_TIME) += time_ut.o
>  obj-y += ut.o
>
>  ifeq ($(CONFIG_SPL_BUILD),)
> -obj-$(CONFIG_$(SPL_)UT_BOOTSTD) += boot/
> +obj-y += boot/
>  obj-$(CONFIG_UNIT_TEST) += common/
>  obj-y += log/
>  obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o
> --
> 2.40.1
>
Ilias Apalodimas Dec. 17, 2023, 5:36 p.m. UTC | #2
On Sat, 16 Dec 2023 at 17:20, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Building sandbox_defconfig with
>
>     CONFIG_UT_BOOTSTD=n
>     CONFIG_MEASURMENT=y
>
> results in an error:
>
>     /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0x408):
>     undefined reference to `do_ut_measurement'
>
> Fixes: 5999ea20fa42 ("test: Add sandbox TPM boot measurement")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  test/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/Makefile b/test/Makefile
> index 6b8a1506f5..feba097543 100644
> --- a/test/Makefile
> +++ b/test/Makefile
> @@ -23,7 +23,7 @@ obj-$(CONFIG_UT_TIME) += time_ut.o
>  obj-y += ut.o
>
>  ifeq ($(CONFIG_SPL_BUILD),)
> -obj-$(CONFIG_$(SPL_)UT_BOOTSTD) += boot/
> +obj-y += boot/
>  obj-$(CONFIG_UNIT_TEST) += common/
>  obj-y += log/
>  obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o
> --
> 2.40.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini Jan. 12, 2024, 1:46 p.m. UTC | #3
On Sat, Dec 16, 2023 at 04:19:54PM +0100, Heinrich Schuchardt wrote:

> Building sandbox_defconfig with
> 
>     CONFIG_UT_BOOTSTD=n
>     CONFIG_MEASURMENT=y
>  
> results in an error:
> 
>     /usr/bin/ld: test/cmd_ut.o:(.data.rel.cmd_ut_sub+0x408):
>     undefined reference to `do_ut_measurement'
> 
> Fixes: 5999ea20fa42 ("test: Add sandbox TPM boot measurement")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/test/Makefile b/test/Makefile
index 6b8a1506f5..feba097543 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -23,7 +23,7 @@  obj-$(CONFIG_UT_TIME) += time_ut.o
 obj-y += ut.o
 
 ifeq ($(CONFIG_SPL_BUILD),)
-obj-$(CONFIG_$(SPL_)UT_BOOTSTD) += boot/
+obj-y += boot/
 obj-$(CONFIG_UNIT_TEST) += common/
 obj-y += log/
 obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o