On 19 February 2018 at 05:37, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi all,
I met an issue on building edk2-platforms when I tried to port drivers. The log is in below.
Generating FVMAIN_COMPACT FV
####
Generating FVMAIN FV
####################################
#############Return Value = 2
GenSec: ERROR 0001: Error opening file
/opt/workspace/boot/uefi/upstream/upstream-edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/Platform/Hisilicon/HiKey960/HiKey960GpioDxe/HiKey960GpioDxe/OUTPUT/HiKey960GpioDxe.efi
GenSec: ERROR 2000: Status is not successful
GenFds.py...
Status value is 0x2
: error 7000: Failed to generate section
### ['GenSec', '-s', 'EFI_SECTION_PE32', '-o', '/opt/workspace/boot/uefi/upstream/edk2/Build/HiKey960/DEBUG_GCC5/FV/Ffs/6aa12592-7e36-4aec-acf8-2ac2fd13815cHiKey960GpioDxe/6aa12592-7e36-4aec-acf8-2ac2fd13815cSEC2.1.pe32', '/opt/workspace/boot/uefi/upstream/upstream-edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/Platform/Hisilicon/HiKey960/HiKey960GpioDxe/HiKey960GpioDxe/OUTPUT/HiKey960GpioDxe.efi']
build.py...
: error 7000: Failed to execute command
GenFds -f
/opt/workspace/boot/uefi/upstream/edk2-platforms/Platform/Hisilicon/HiKey960/HiKey960.fdf --conf=/opt/workspace/boot/uefi/upstream/edk2/Conf -o /opt/workspace/boot/uefi/upstream/edk2/Build/HiKey960/DEBUG_GCC5 -t GCC5 -b DEBUG -p /opt/workspace/boot/uefi/upstream/edk2-platforms/Platform/Hisilicon/HiKey960/HiKey960.dsc -a AARCH64 -D "EFI_SOURCE=/opt/workspace/boot/uefi/upstream/edk2/EdkCompatibilityPkg" -D "EDK_SOURCE=/opt/workspace/boot/uefi/upstream/edk2/EdkCompatibilityPkg" -D "TOOL_CHAIN_TAG=GCC5" -D "TOOLCHAIN=GCC5" -D "TARGET=DEBUG" -D "FAMILY=GCC" -D "WORKSPACE=/opt/workspace/boot/uefi/upstream/edk2" -D "FIRMWARE_VER=44699e6-dirty" -D "EDK_TOOLS_PATH=/opt/workspace/boot/uefi/upstream/edk2/BaseTools" -D "ARCH=AARCH64" -D "ECP_SOURCE=/opt/workspace/boot/uefi/upstream/edk2/EdkCompatibilityPkg" [/opt/workspace/boot/uefi/upstream/upstream-edk2]
- Failed -
Build end time: 13:28:45, Feb.19 2018
Build total time: 00:00:57
Hikey960 (AARCH64) DEBUG fail
pass 0
fail 1
Fail to build UEFI & ARM Trusted Firmware (0)
And I found that HiKey960GpioDxe driver is generated at Build/HiKey960/DEBUG_GCC5/AARCH64/edk2-platforms/HiKey960. The edk2 tries to find it by the path without “edk2-platforms”. How to fix this issue?
Yes, this is correct. The string 'edk2-platforms' should not occur anywhere in your .dsc/.fdf/.inf files, nor should you use symlinks to link other package repositories into your workspace. Instead, you should add the path to edk2-platforms/ to your PACKAGES_PATH environment variable.