xaptum / xaptum-buildroot

External Buildroot tree for Xaptum hardware
GNU General Public License v2.0
0 stars 0 forks source link

Use external toolchain for sama5d2_xplained_xaprc defconfig #18

Closed drbild closed 5 years ago

drbild commented 5 years ago

The build is faster with an external toolchain, since it doesn't need to be compiled as part of the build.

This also fixes compilation of some Xaptum packages.

peterhaijen commented 5 years ago

Unfortunately, this is not helping. In fact, I think the problem remains exactly the same.

../../examples/xtt_client.c: In function ‘initialize_server_id’:
../../examples/xtt_client.c:353:40: error: unused parameter ‘tcti_type’ [-Werror=unused-parameter]
                          xtt_tcti_type tcti_type,
                                        ^~~~~~~~~
../../examples/xtt_client.c:354:38: error: unused parameter ‘dev_file’ [-Werror=unused-parameter]
                          const char* dev_file)
                                      ^~~~~~~~
../../examples/xtt_client.c: In function ‘initialize_daa’:
../../examples/xtt_client.c:403:91: error: unused parameter ‘tcti_type’ [-Werror=unused-parameter]
 int initialize_daa(struct xtt_client_group_context *group_ctx, int use_tpm, xtt_tcti_type tcti_type, const char* dev_file)
                                                                                           ^~~~~~~~~
../../examples/xtt_client.c:403:114: error: unused parameter ‘dev_file’ [-Werror=unused-parameter]
 int initialize_daa(struct xtt_client_group_context *group_ctx, int use_tpm, xtt_tcti_type tcti_type, const char* dev_file)
                                                                                                                  ^~~~~~~~
drbild commented 5 years ago

Hmm, a clean build of this commit works for me:

make clean
make sama5d2_xplained_xaprc_defconfig
make

I just rebased this on the current master. Now I get the same failure.

drbild commented 5 years ago

Unfortunately, this is not helping. In fact, I think the problem remains exactly the same.

../../examples/xtt_client.c: In function ‘initialize_server_id’:
../../examples/xtt_client.c:353:40: error: unused parameter ‘tcti_type’ [-Werror=unused-parameter]
                          xtt_tcti_type tcti_type,
                                        ^~~~~~~~~

TLDR: Disable BR2_PACKAGE_XTT_UTILS. TLDR: Enable BR2_PACKAGE_XTT_TPM_SUPPORT.

That's a problem in the xtt example programs. The compiler used for development had less strict warnings. They weren't tested with USE_TPM=OFF. It's been fixed in xtt master, but we haven't cut a release yet.

For now, we should enable TPM support on this config. (We have a TPM USB stick that can be used with the Xplained board, so it makes sense to have the TPM support enabled here.)