Hi,
I try to build the LS1088 secure boot image by using LSDK 20.04.
It will occur an error when I build the optee_test application.
The following is the error of building the optee_test application.
Building optee_test ... [0m
make[2]: Entering directory '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test'
make[3]: Entering directory '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest'
GEN /home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100_mid_crt.h
Traceback (most recent call last):
File "../../scripts/file_to_c.py", line 48, in <module>
main()
File "../../scripts/file_to_c.py", line 32, in main
for x in array.array("B", inf.read()):
TypeError: cannot use a str to initialize an array with typecode 'B'
Makefile:227: recipe for target '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100_mid_crt.h' failed
make[3]: *** [/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100_mid_crt.h] Error 1
make[3]: Leaving directory '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest'
Makefile:37: recipe for target 'xtest' failed
make[2]: *** [xtest] Error 2
make[2]: Leaving directory '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test'
/home/frank/flexbuild_lsdk2004_update_290520/packages/apps/security/security.mk:178: recipe for target 'optee_test' failed
make[1]: *** [optee_test] Error 2
make[1]: Leaving directory '/home/frank/flexbuild_lsdk2004_update_290520/packages/apps'
Makefile:28: recipe for target 'apps' failed
make: *** [apps] Error 2
make: Leaving directory '/home/frank/flexbuild_lsdk2004_update_290520'
I try to modify the file_to_c python file but it will occur other error as follows.
Building optee_test ... [0m
make[2]: Entering directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test'
make[3]: Entering directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest'
CC /home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest/regression_8100.c
In file included from /home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest/regression_8100.c:24:0:
/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100_mid_crt.h:5:1: error: expected expression before 'const'
const uint8_t regression_8100_mid_crt[] = {
^~~~~
Makefile:172: recipe for target '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100.o' failed
make[3]: *** [/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/out/xtest/regression_8100.o] Error 1
make[3]: Leaving directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test/host/xtest'
Makefile:37: recipe for target 'xtest' failed
make[2]: *** [xtest] Error 2
make[2]: Leaving directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/optee_test'
/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps/security/security.mk:178: recipe for target 'optee_test' failed
make[1]: *** [optee_test] Error 2
make[1]: Leaving directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520/packages/apps'
Makefile:28: recipe for target 'apps' failed
make: *** [apps] Error 2
make: Leaving directory '/home/frank/Documents/flexbuild_lsdk2004_update_290520'
I also found that this issue didn't occur in the new version of LSDK.
It can build successfully in LSDK21.08 and LSDK20.12.
This issue occurs in LSDK 20.04.
The attached files is the build log I collected.
How can I fix this issue in LSDK 20.04?
Thanks