In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
So add "ARCH=arm" when build OPTEE.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org --- opteed-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..63dafb0 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -94,7 +94,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi - make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} + make ARCH=arm -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir
Add content to build ATF & OPTEE for HiKey platform.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org --- edk2-platforms.config | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/edk2-platforms.config b/edk2-platforms.config index 5c09afe..8ef82d1 100644 --- a/edk2-platforms.config +++ b/edk2-platforms.config @@ -106,6 +106,20 @@ ARCH=AARCH64 LONGNAME=HiKey DSC=Platform/Hisilicon/HiKey/HiKey.dsc ARCH=AARCH64 +BUILD_ATF=yes +UEFI_BIN=BL33_AP_UEFI.fd +UEFI_IMAGE_DIR=HiKey +SCP_BIN=Platform/Hisilicon/HiKey/mcuimage.bin +ATF_SPD=opteed +TOS_BIN=tee-pager.bin +TOS_PLATFORM_FLAVOR=hikey +BUILD_TOS=yes +# Uncomment this to use UART0 as the EDK2 console +#BUILDFLAGS=-DSERIAL_BASE=0xF8015000 +# Uncomment this to use UART0 as the ARM Trusted Firmware console +#ATF_BUILDFLAGS=CONSOLE_BASE=PL011_UART0_BASE CRASH_CONSOLE_BASE=PL011_UART0_BASE +# Uncomment this to use UART0 as the OP-TEE Trusted OS console +#TOS_BUILDFLAGS=CFG_CONSOLE_UART=0
[d02] LONGNAME=Hisilicon D02
Hi HJ,
On Fri, Feb 2, 2018 at 8:51 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
How to reproduce? Works fine on my end. Even if ARCH is X64, I think the uefishell function (http://git.linaro.org/uefi/uefi-tools.git/tree/uefi-build.sh#n192) would take care of it.
Thanks!
So add "ARCH=arm" when build OPTEE.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
opteed-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..63dafb0 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -94,7 +94,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi
make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS}
make ARCH=arm -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir
-- 2.7.4
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On Sat, Feb 3, 2018 at 12:43 AM, Victor Chong victor.chong@linaro.org wrote:
Hi HJ,
On Fri, Feb 2, 2018 at 8:51 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
How to reproduce? Works fine on my end. Even if ARCH is X64, I think the uefishell function (http://git.linaro.org/uefi/uefi-tools.git/tree/uefi-build.sh#n192) would take care of it.
Oh this is edk2-build.sh (something relatively new?), not the uefi-build.sh we're used to. Never mind then. Sorry for the noise.
Thanks!
So add "ARCH=arm" when build OPTEE.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
opteed-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..63dafb0 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -94,7 +94,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi
make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS}
make ARCH=arm -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir
-- 2.7.4
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On Sat, Feb 3, 2018 at 12:54 AM, Victor Chong victor.chong@linaro.org wrote:
On Sat, Feb 3, 2018 at 12:43 AM, Victor Chong victor.chong@linaro.org wrote:
Hi HJ,
On Fri, Feb 2, 2018 at 8:51 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
Fwiw optee_os now checks that ARCH is arm before continuing the build. https://github.com/OP-TEE/optee_os/commit/c0b2e931b395f098aa53912afa8b4f37cb...
How to reproduce? Works fine on my end. Even if ARCH is X64, I think the uefishell function (http://git.linaro.org/uefi/uefi-tools.git/tree/uefi-build.sh#n192) would take care of it.
Oh this is edk2-build.sh (something relatively new?), not the uefi-build.sh we're used to. Never mind then. Sorry for the noise.
Thanks!
So add "ARCH=arm" when build OPTEE.
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
opteed-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..63dafb0 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -94,7 +94,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi
make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS}
make ARCH=arm -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir
-- 2.7.4
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi
On Sat, Feb 03, 2018 at 12:54:54AM +0900, Victor Chong wrote:
On Sat, Feb 3, 2018 at 12:43 AM, Victor Chong victor.chong@linaro.org wrote:
On Fri, Feb 2, 2018 at 8:51 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
How to reproduce? Works fine on my end. Even if ARCH is X64, I think the uefishell function (http://git.linaro.org/uefi/uefi-tools.git/tree/uefi-build.sh#n192) would take care of it.
Oh this is edk2-build.sh (something relatively new?), not the uefi-build.sh we're used to.
Yes. Because changes in the build invokation was required with edk2-platforms, I created separate front-end scripts rather than introducing extra complexity.
edk2-platforms.sh also uses edk2-platforms.config instead of platforms.config.
/ Leif
On Fri, Feb 02, 2018 at 07:51:10PM +0800, Haojian Zhuang wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
So add "ARCH=arm" when build OPTEE.
No, please, no hard-coding in the scripts.
How about adding a new option to edk2-platforms.config, maybe TOS_ARCH or SPD_ARCH?
Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
opteed-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..63dafb0 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -94,7 +94,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi
- make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS}
- make ARCH=arm -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir
-- 2.7.4
On 6 February 2018 at 21:43, Leif Lindholm leif.lindholm@linaro.org wrote:
On Fri, Feb 02, 2018 at 07:51:10PM +0800, Haojian Zhuang wrote:
In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64.
Then there's error when build OPTEE.
Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop.
So add "ARCH=arm" when build OPTEE.
No, please, no hard-coding in the scripts.
How about adding a new option to edk2-platforms.config, maybe TOS_ARCH or SPD_ARCH?
OK