提交 450f63d7 编写于 作者: Z Zbigniew Bodek 提交者: Wojciech Zmuda WX948747

Add Qemu ARM virtual platform to build configuration files

Remove some dependencies on HiSilicon and add new platform to build.
Signed-off-by: NZbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I8504bcc9a1bf1756e1e20694986d7774156f8b8e
上级 59db6662
......@@ -42,11 +42,11 @@ choice
config COMPILER_HIMIX_32
bool "arm-linux-ohoseabi"
depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300
depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_QEMU_ARM_VIRT_CA7
config COMPILER_CLANG_LLVM
bool "clang-llvm"
depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300
depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_QEMU_ARM_VIRT_CA7
endchoice
endmenu
......@@ -274,7 +274,7 @@ config VM_OVERLAP_CHECK
config NULL_ADDRESS_PROTECT
bool "Enable NULL Address protect"
default n
depends on (PLATFORM_HI3518EV200 || PLATFORM_HI3516CV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300) && DEBUG_VERSION
depends on (PLATFORM_HI3518EV200 || PLATFORM_HI3516CV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_QEMU_ARM_VIRT_CA7) && DEBUG_VERSION
help
Answer Y to set mem address 0~1M prohibit to access, read or write will trigger exception.
......
......@@ -59,6 +59,9 @@ endif
ifeq ($(LOSCFG_PLATFORM_HI3516DV300), y)
FSTYPE = vfat
endif
ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
FSTYPE = vfat
endif
ROOTFS_DIR = $(OUT)/rootfs
ROOTFS_ZIP = $(OUT)/rootfs.zip
VERSION =
......@@ -97,13 +100,20 @@ endif
##### make dynload #####
-include $(LITEOS_MK_PATH)/dynload.mk
ifeq ($(findstring y, $(LOSCFG_PLATFORM_HI3518EV300)$(LOSCFG_PLATFORM_HI3516DV300)), y)
VENDOR_BOARD_INCLUDE := $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board
else ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
VENDOR_BOARD_INCLUDE := $(LITEOSTOPDIR)/../../vendor/qemu/arm/$(LITEOS_PLATFORM)/config/board
else
$(error "No VENDOR_BOARD_INCLUDE defined")
endif
#-----need move when make version-----#
##### make lib #####
$(__LIBS): $(OUT) $(CXX_INCLUDE)
$(OUT): $(LITEOS_MENUCONFIG_H)
$(HIDE)mkdir -p $(OUT)/lib
$(HIDE)$(CC) -I$(LITEOS_PLATFORM_BASE)/include -I$(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board \
$(HIDE)$(CC) -I$(LITEOS_PLATFORM_BASE)/include -I$(VENDOR_BOARD_INCLUDE) \
-E $(LITEOS_PLATFORM_BASE)/board.ld.S \
-o $(LITEOS_PLATFORM_BASE)/board.ld -P
......
......@@ -40,7 +40,10 @@ LOCAL_SRCS = $(wildcard $(HWI_SRC)/*.c) \
LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/compat/posix/src \
-I $(LITEOSTOPDIR)/bsd/dev/random
ifeq ($(findstring y, $(LOSCFG_PLATFORM_HI3518EV300)$(LOSCFG_PLATFORM_HI3516DV300)), y)
MAIN_PLATFORMS := $(LOSCFG_PLATFORM_HI3518EV300) \
$(LOSCFG_PLATFORM_HI3516DV300) \
$(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7)
ifeq ($(findstring y, $(MAIN_PLATFORMS)), y)
LOCAL_SRCS += $(wildcard ../kernel/common/*.c)
LOCAL_SRCS := $(filter-out ../kernel/common/los_rootfs.c, $(LOCAL_SRCS))
ifneq ($(LOSCFG_FS_VFS), y)
......
......@@ -56,6 +56,12 @@ else ifeq ($(LOSCFG_PLATFORM_HI3518EV300), y)
USB_TYPE := usb3.0_hi3518ev300
LITEOS_CMACRO_TEST += -DTEST3518EV300
########################## Qemu ARM Virt Options##############################
else ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
HWI_TYPE := arm/interrupt/gic
TIMER_TYPE := arm/timer/arm_generic
UART_TYPE := amba_pl011
endif
HWI_SRC := hw/$(HWI_TYPE)
......@@ -69,22 +75,26 @@ LITEOS_BASELIB += -lbsp
LITEOS_PLATFORM := $(subst $\",,$(LOSCFG_PLATFORM))
PLATFORM_BSP_HISI_BASE := $(LITEOSTOPDIR)/platform
PLATFORM_BSP_BASE := $(LITEOSTOPDIR)/platform
PLATFORM_INCLUDE := -I $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board/include \
-I $(PLATFORM_BSP_HISI_BASE)/../kernel/common \
-I $(PLATFORM_BSP_HISI_BASE)/../../../drivers/liteos/platform/pm \
-I $(PLATFORM_BSP_HISI_BASE)/hw/include \
-I $(PLATFORM_BSP_HISI_BASE)/include \
-I $(PLATFORM_BSP_HISI_BASE)/$(UART_SRC)
PLATFORM_INCLUDE := -I $(PLATFORM_BSP_BASE)/../kernel/common \
-I $(PLATFORM_BSP_BASE)/../../../drivers/liteos/platform/pm \
-I $(PLATFORM_BSP_BASE)/hw/include \
-I $(PLATFORM_BSP_BASE)/include \
-I $(PLATFORM_BSP_BASE)/$(UART_SRC)
ifeq ($(findstring y, $(LOSCFG_PLATFORM_HI3518EV300)$(LOSCFG_PLATFORM_HI3516DV300)), y)
PLATFORM_INCLUDE += -I $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board/include
PLATFORM_INCLUDE += -I $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board/include/hisoc
else ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
PLATFORM_INCLUDE += -I $(LITEOSTOPDIR)/../../vendor/qemu/arm/$(LITEOS_PLATFORM)/config/board/include
# TODO: remove hisoc dependency in the code to avoid using hisoc here
PLATFORM_INCLUDE += -I $(LITEOSTOPDIR)/../../vendor/qemu/arm/$(LITEOS_PLATFORM)/config/board/include/hisoc
endif
#
#-include $(LITEOSTOPDIR)/platform/bsp/board/$(LITEOS_PLATFORM)/board.mk
#
LIB_SUBDIRS += $(PLATFORM_BSP_HISI_BASE)
LIB_SUBDIRS += $(PLATFORM_BSP_BASE)
LITEOS_PLATFORM_INCLUDE += $(PLATFORM_INCLUDE)
LITEOS_CXXINCLUDE += $(PLATFORM_INCLUDE)
......@@ -163,8 +163,10 @@ LITEOS_BASELIB += -lbase
LIB_SUBDIRS += kernel/base
LITEOS_KERNEL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/include
ifeq ($(findstring y, $(LOSCFG_PLATFORM_HI3518EV300)$(LOSCFG_PLATFORM_HI3516DV300)), y)
LITEOS_BASELIB += -lhi35xx_bsp
LIB_SUBDIRS += $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/$(LITEOS_PLATFORM)/config/board/
endif
ifeq ($(LOSCFG_KERNEL_CPUP), y)
LITEOS_BASELIB += -lcpup
......@@ -358,7 +360,11 @@ endif
#################################### Net Option End####################################
LITEOS_DRIVERS_BASE_PATH := $(LITEOSTOPDIR)/../../drivers/liteos
ifeq ($(findstring y, $(LOSCFG_PLATFORM_HI3518EV300)$(LOSCFG_PLATFORM_HI3516DV300)), y)
LITEOS_VENDOR_DRIVERS_BASE_PATH := $(LITEOSTOPDIR)/../../vendor/hisi/hi35xx/platform
else ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y)
LITEOS_VENDOR_DRIVERS_BASE_PATH := $(LITEOSTOPDIR)/../../vendor/qemu/arm/platform
endif
################################## Driver Option Begin #################################
ifeq ($(LOSCFG_DRIVERS_HDF), y)
include $(LITEOSTOPDIR)/../../drivers/hdf/lite/hdf_lite.mk
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册