Comments (7)
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.
from build.
@jforissier
I will try to do it tomorrow, and reply you timely.
please do not remove OP-TEE support for hikey960. It is important for reseachers.
from build.
@jforissier I will try to do it tomorrow, and reply you timely. please do not remove OP-TEE support for hikey960. It is important for reseachers.
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 hikey.mk
file needs the same fix too I suppose). Thanks!
from build.
@jforissier
I am very sorry for that. The method #652 (comment) does not work. The same error occurred. This issue may arise from the default toolchain version 11.3 being too new, Because I could build OP-TEE for Hikey 960 with the old toolchain version 10.2 as following (also shown in #625)
$ cd build
$ make -j4 toolchains AARCH32_GCC_VERSION= gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf SRC_AARCH32_GCC= https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/$(AARCH32_GCC_VERSION).tar.xz
AARCH64_GCC_VERSION= gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu SRC_AARCH64_GCC = https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/$(AARCH64_GCC_VERSION).tar.xz
$ make all -j6 PLATFORM=hikey-hikey960 CFG_DRAM_SIZE_GB=4 BR2_TOOLCHAIN_EXTERNAL_GCC_10=y BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
So, how to fix this issue for building OP-TEE 3.21.0 for Hikey 960 with the default GCC toolchain version 11.3?
from build.
In fact, the C flags have to be modified in GCC_ALL_CC_FLAGS
in edk2/BaseTools/Conf/tools_def.template
like so:
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 sed
command to hikey{,960}.mk
.
from build.
@jforissier Thank you very much. The suggestion #652 (comment) is work for me.
I would like to test OP-TEE support for Hikey 960 and then report the results. This work may be complemented in later, because I must buy a new UART-USB for testing the result.
from build.
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.
from build.
Related Issues (20)
- failure to run with error "qemu-system-aarch64: -netdev user,id=vmnic: network backend 'user' is not compiled into this binary" HOT 5
- Unavaliabilty of optee_client_java_api. HOT 5
- How the memory size set in the qemu.mk file (such as 1057 at this time) is allocated to REE and TEE? HOT 9
- How to integrate OP-TEE in android studio HOT 1
- Failed to boot on RPI3
- [RFC] Makefiles for RISC-V platforms HOT 13
- Optee build failed on RPi 3B+ due to make[4]: *** [Makefile:2377: s-automata] Error 137 HOT 2
- Build latest version on debian 11 fails HOT 1
- OP-TEE building under company proxy HOT 1
- Error building op-tee for QEMUv8 HOT 6
- Using hikey620's uart0 to console NW world HOT 1
- Issue with building image - v3.22.0 on Raspberry Pi 3B+ HOT 1
- Modify the linux kernel but not working HOT 3
- Failure to run with manifest qemu_v8.xml and SPMC_AT_EL=2 HOT 2
- AMD Versal ACAP - do not update to BSP 2023.1 HOT 4
- cannot find -lpci error while cross compiling for LS1043 HOT 1
- Who can help me!make -f qemu.mk all and get a error :ccache: error: Exec format error HOT 5
- Openssl doesn't get built in when build called from qemu.mk HOT 2
- RPI3b:-sh: apt-get: not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build.