From 471de3663ea8b63f7448162edc0293b8723dcefc Mon Sep 17 00:00:00 2001 From: SimonLi Date: Fri, 21 May 2021 11:37:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(build):=20=E5=8E=BB=E9=99=A4=E5=86=97?= =?UTF-8?q?=E4=BD=99=E5=8D=95=E6=9D=BF=E7=9B=B8=E5=85=B3=E7=9A=84=E5=AE=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编译工具链的选项不应该依赖单板的宏,否则每增加一块单板都需要去新增配置。 NULL_ADDRESS_PROTECT这个宏配置没有地方使用,去掉冗余宏,内存是一一映射,可以 访问0地址,且不会立马报错,需要这个功能,现在不是一一映射,而且访问空指针会 立马报错,所以不存在这个问题。 --- Kconfig | 9 --------- tools/build/config/debug/hispark_aries.config | 1 - tools/build/config/debug/hispark_aries_clang.config | 1 - .../config/debug/ipcamera_hi3518ev300_liteos.config | 1 - .../debug/ipcamera_hi3518ev300_liteos_clang.config | 1 - tools/build/config/hispark_aries_debug_shell.config | 1 - .../ipcamera_hi3518ev300_liteos_debug_shell.config | 1 - tools/build/mk/los_config.mk | 4 ---- 8 files changed, 19 deletions(-) diff --git a/Kconfig b/Kconfig index 6c756199..085660d5 100644 --- a/Kconfig +++ b/Kconfig @@ -42,11 +42,9 @@ choice config COMPILER_HIMIX_32 bool "arm-linux-ohoseabi" - depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_QEMU_ARM_VIRT_CA7 config COMPILER_CLANG_LLVM bool "clang-llvm" - depends on PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_QEMU_ARM_VIRT_CA7 endchoice endmenu @@ -281,13 +279,6 @@ config VM_OVERLAP_CHECK help Answer Y to enable vm overlap check. -config NULL_ADDRESS_PROTECT - bool "Enable NULL Address protect" - default n - 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. - endmenu ######################## config options os drivers ######################## diff --git a/tools/build/config/debug/hispark_aries.config b/tools/build/config/debug/hispark_aries.config index 772b3f04..13235789 100644 --- a/tools/build/config/debug/hispark_aries.config +++ b/tools/build/config/debug/hispark_aries.config @@ -12,7 +12,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/config/debug/hispark_aries_clang.config b/tools/build/config/debug/hispark_aries_clang.config index ad900b69..f5e566fc 100644 --- a/tools/build/config/debug/hispark_aries_clang.config +++ b/tools/build/config/debug/hispark_aries_clang.config @@ -11,7 +11,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/config/debug/ipcamera_hi3518ev300_liteos.config b/tools/build/config/debug/ipcamera_hi3518ev300_liteos.config index 655891d1..6402dc33 100644 --- a/tools/build/config/debug/ipcamera_hi3518ev300_liteos.config +++ b/tools/build/config/debug/ipcamera_hi3518ev300_liteos.config @@ -12,7 +12,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/config/debug/ipcamera_hi3518ev300_liteos_clang.config b/tools/build/config/debug/ipcamera_hi3518ev300_liteos_clang.config index 5c9f4535..fb7eb294 100644 --- a/tools/build/config/debug/ipcamera_hi3518ev300_liteos_clang.config +++ b/tools/build/config/debug/ipcamera_hi3518ev300_liteos_clang.config @@ -10,7 +10,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/config/hispark_aries_debug_shell.config b/tools/build/config/hispark_aries_debug_shell.config index 772b3f04..13235789 100644 --- a/tools/build/config/hispark_aries_debug_shell.config +++ b/tools/build/config/hispark_aries_debug_shell.config @@ -12,7 +12,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/config/ipcamera_hi3518ev300_liteos_debug_shell.config b/tools/build/config/ipcamera_hi3518ev300_liteos_debug_shell.config index 6c0ea04f..b8c6883e 100644 --- a/tools/build/config/ipcamera_hi3518ev300_liteos_debug_shell.config +++ b/tools/build/config/ipcamera_hi3518ev300_liteos_debug_shell.config @@ -12,7 +12,6 @@ LOSCFG_DEBUG_VERSION=y LOSCFG_SHELL_DMESG=y LOSCFG_USER_INIT_DEBUG=y LOSCFG_SHELL_CMD_DEBUG=y -LOSCFG_NULL_ADDRESS_PROTECT=y LOSCFG_DRIVERS_USB_HOST_XHCI=y LOSCFG_DRIVERS_USB_ETHERNET=y LOSCFG_DRIVERS_USB_WIRELESS=y diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index 91cf344e..dab51a79 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -487,10 +487,6 @@ ifeq ($(LOSCFG_3RDPARTY), y) -include $(LITEOSTOPDIR)/3rdParty/3rdParty.mk endif -ifeq ($(LOSCFG_NULL_ADDRESS_PROTECT), y) - LITEOS_CMACRO += -DLOSCFG_NULL_ADDRESS_PROTECT -endif - ifeq ($(LOSCFG_KERNEL_SYSCALL), y) LITEOS_BASELIB += -lsyscall LIB_SUBDIRS += syscall -- GitLab