-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to build OP-TEE 3.21.0 for Hikey 960 #652
Comments
Try this: diff --git a/hikey960.mk b/hikey960.mk
index dbff5c2..af167b3 100644
--- a/hikey960.mk
+++ b/hikey960.mk
@@ -134,7 +134,7 @@ edk2:
ln -s $(OPENPLATPKG_PATH)
set -e && cd $(EDK2_PATH) && source edksetup.sh && \
$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools \
- BUILD_CC="gcc $(call cc-option,gcc,-Wno-error=stringop-truncation,)" && \
+ BUILD_CC="gcc $(call cc-option,gcc,-Wno-error=stringop-truncation,) $(call cc-option,gcc,-Wno-error=stringop-overflow,)" && \
$(call edk2-call)
.PHONY: edk2-cleandiff --git a/hikey960.mk b/hikey960.mk EDK2 for HiKey is unmaintained, so unless someone takes up this task it is likely that sooner or later we will have to drop it and use something else (U-Boot), or even remove HiKey in OP-TEE support entirely. |
@jforissier |
Don't worry, we will not remove anything unless there is a good reason and we will always discuss here first. I am glad to hear that people are still using HiKey, and I hope we can get patches to make it live longer! I personally used to use HiKey/HiKey960 a lot, but not so much so. If my above suggestion works for you, please create a pull request so it can be merged (note that the |
@jforissier
So, how to fix this issue for building OP-TEE 3.21.0 for Hikey 960 with the default GCC toolchain version 11.3? |
In fact, the C flags have to be modified in diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 2b4fb47ec..8a58208e8 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4338,7 +4338,7 @@ DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG =
NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
+DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -Wno-stringop-overflow -include AutoGen.h -fno-common^M
DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency Please refer to this Dockerfile, it worked for me: Dockerfile.txt Perhaps we should add the |
@jforissier Thank you very much. The suggestion #652 (comment) is work for me. |
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
OP-TEE 3.20.0 can be built on my host PC successfully. But, OP-TEE 3.21.0 can not be built successfully on the same PC with the same environment. Errors shows as following:
@jforissier @jbech-linaro @jenswi-linaro
The text was updated successfully, but these errors were encountered: