Skip to content
Snippets Groups Projects
Commit 2c429d72 authored by Victor Chong's avatar Victor Chong Committed by Jérôme Forissier
Browse files

hikey_debian: update edk2 with newer build and instructions


Signed-off-by: default avatarVictor Chong <victor.chong@linaro.org>
Reviewed-by: default avatarJerome Forissier <jerome.forissier@linaro.org>
parent 8f77f8d0
No related branches found
No related tags found
No related merge requests found
......@@ -195,8 +195,11 @@ edk2-common: $(EDK2_PATH)/Conf/target.txt
edk2-clean-common:
set -e && cd $(EDK2_PATH) && source edksetup.sh && \
$(call edk2-call) clean && \
$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools clean && \
$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools clean
rm -rf $(EDK2_PATH)/Build
rm -f $(EDK2_PATH)/Conf/build_rule.txt
rm -f $(EDK2_PATH)/Conf/target.txt
rm -f $(EDK2_PATH)/Conf/tools_def.txt
################################################################################
# QEMU / QEMUv8
################################################################################
......
......@@ -61,9 +61,7 @@ flash` step will tell you how you should set the jumpers on the board.
The intention here was to do almost the same kind of build as the regular where
the big difference is the kernel in use and the root fs. The kernel currently
comes from the 96Boards team, but that might change soon again. The root fs is a
Debian based root file system. In this setup we're also using a pre-built UEFI
binary. In the long run we would like to change that so we build UEFI from
scratch in this setup just as we do in other OP-TEE setups.
Debian based root file system.
In the root fs there is already a couple of OP-TEE binaries included. After
building the solution one must replace those, since they are a bit dated (see
......
......@@ -59,9 +59,10 @@ else
EDK2_BIN ?= $(EDK2_PATH)/Build/HiKey/RELEASE_GCC49/FV/BL33_AP_UEFI.fd
EDK2_BUILD ?= RELEASE
endif
OPENPLATPKG_PATH ?= $(ROOT)/OpenPlatformPkg
OUT_PATH ?= $(ROOT)/out
MCUIMAGE_BIN ?= $(EDK2_PATH)/HisiPkg/HiKeyPkg/NonFree/mcuimage.bin
MCUIMAGE_BIN ?= $(OPENPLATPKG_PATH)/Platforms/Hisilicon/HiKey/Binary/mcuimage.bin
BOOT_IMG ?= $(OUT_PATH)/boot-fat.uefi.img
NVME_IMG ?= $(OUT_PATH)/nvme.img
SYSTEM_IMG ?= $(OUT_PATH)/debian_system.img
......@@ -123,26 +124,37 @@ arm-tf-clean:
################################################################################
# EDK2 / Tianocore
################################################################################
EDK2_VARS ?= EDK2_ARCH=AARCH64 \
EDK2_DSC=HisiPkg/HiKeyPkg/HiKey.dsc \
EDK2_TOOLCHAIN=GCC49 \
EDK2_BUILD=$(EDK2_BUILD)
EDK2_ARCH ?= AARCH64
EDK2_DSC ?= OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKey.dsc
EDK2_TOOLCHAIN ?= GCC49
EDK2_CONSOLE_UART ?= $(CFG_NW_CONSOLE_UART)
ifeq ($(EDK2_CONSOLE_UART),0)
EDK2_VARS += EDK2_MACROS="-DSERIAL_BASE=0xF8015000"
EDK2_BUILDFLAGS += -DSERIAL_BASE=0xF8015000
endif
define edk2-call
GCC49_AARCH64_PREFIX=$(LEGACY_AARCH64_CROSS_COMPILE) \
$(MAKE) -j1 -C $(EDK2_PATH) \
-f HisiPkg/HiKeyPkg/Makefile $(EDK2_VARS)
build -n 1 -a $(EDK2_ARCH) -t $(EDK2_TOOLCHAIN) -p $(EDK2_DSC) \
-b $(EDK2_BUILD) $(EDK2_BUILDFLAGS)
endef
edk2: edk2-common
.PHONY: edk2
edk2:
cd $(EDK2_PATH) && rm -rf OpenPlatformPkg && \
ln -s $(OPENPLATPKG_PATH)
set -e && cd $(EDK2_PATH) && source edksetup.sh BaseTools && \
$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools && \
$(call edk2-call)
.PHONY: edk2-clean
edk2-clean: edk2-clean-common
edk2-clean:
set -e && cd $(EDK2_PATH) && source edksetup.sh BaseTools && \
$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools clean
rm -rf $(EDK2_PATH)/Build
rm -f $(EDK2_PATH)/Conf/build_rule.txt
rm -f $(EDK2_PATH)/Conf/target.txt
rm -f $(EDK2_PATH)/Conf/tools_def.txt
################################################################################
# Linux kernel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment