From: Peter Seiderer <ps.report@gmx.net>
To: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] selftests/sgx
Date: Tue, 17 May 2022 22:48:09 +0200 [thread overview]
Message-ID: <20220517224809.21f77949@gmx.net> (raw)
In-Reply-To: <1332b2a553298d899b231f0cc47de7600a5a4aa5.camel@iki.fi>
Hello Jarkko,
On Tue, 17 May 2022 20:06:51 +0300, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
> On Sun, 2022-05-08 at 23:38 +0200, Peter Seiderer wrote:
> > Hello Jarkko,
> >
> > On Sat, 07 May 2022 23:03:57 +0300, Jarkko Sakkinen <jarkko.sakkinen@iki.fi> wrote:
> >
> > > Hi,
> > >
> > > When specifying "BR2_PACKAGE_LINUX_TOOLS_SELFTESTS=y", for some reason
> > > tools/testing/selftests/sgx/ build results, i.e. "sgx:test_sgx", does
> > > not get included to the rootfs image, nor is it listed in
> > > kselftest-list.txt.
> > >
> > > If I manually compile and install selftests, it does get included. Any
> > > ideas what could be wrong?
> >
> > For which architecture do you (cross) compile (what is your target architecture)?
> >
> > According to e.g. [1]:
> >
> > [...]
> > 7 CAN_BUILD_X86_64 := $(shell ../x86/check_cc.sh $(CC) \
> > 8
> > [...]
> > 19 TEST_CUSTOM_PROGS := $(OUTPUT)/test_sgx
> > 20
> > 21 ifeq ($(CAN_BUILD_X86_64), 1)
> > 22 all: $(TEST_CUSTOM_PROGS) $(OUTPUT)/test_encl.elf
> > 23 endif
> > [...]
>
> Hi,
>
> My config is contained fully here:
>
> https://github.com/jarkkojs/buildroot-sgx/blob/master/configs/sgx_x86_64_defconfig
>
> And my kernel config is here:
>
> https://github.com/jarkkojs/buildroot-sgx/blob/master/board/sgx/x86_64/linux.config
>
> I.e. can be built with "make sgx_x86_64_defconfig && make".
>
The original error message from linux-5.17.7/tools/testing/selftests/sgx is
(Note: no global failure in linux-tools/selftests in case one or more of the
test case compiles fail):
.../host/bin/x86_64-buildroot-linux-gnu-gcc -Wall -Werror -g -I../../../../tools/include -fPIC -z noexecstack -c sigstruct.c -o .../build/linux-5.17.7/tools/testing/selftests/kselftest/sgx/sigstruct.o
sigstruct.c:15:10: fatal error: openssl/err.h: No such file or directory
15 | #include <openssl/err.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
You need to enable 'BR2_PACKAGE_OPENSSL' in your defconfig and apply
the following buildroot patch:
--- a/package/linux-tools/linux-tool-selftests.mk.in
+++ b/package/linux-tools/linux-tool-selftests.mk.in
@@ -18,6 +18,10 @@ endif
SELFTESTS_DEPENDENCIES = libcap-ng popt
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+SELFTESTS_DEPENDENCIES += openssl
+endif
+
SELFTESTS_MAKE_FLAGS = \
$(LINUX_MAKE_FLAGS) \
ARCH=$(SELFTESTS_ARCH)
Regards,
Peter
> > test_sgx is only compiled for x86_64 (and/or CAN_BUILD_X86_64 is true)...
> >
> > Regards,
> > Peter
>
> BR, Jarkko
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-05-17 20:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 20:03 [Buildroot] selftests/sgx Jarkko Sakkinen
2022-05-08 21:38 ` Peter Seiderer
2022-05-17 17:06 ` Jarkko Sakkinen
2022-05-17 20:48 ` Peter Seiderer [this message]
2022-05-18 1:45 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220517224809.21f77949@gmx.net \
--to=ps.report@gmx.net \
--cc=buildroot@buildroot.org \
--cc=jarkko.sakkinen@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.