From aff8a3e3c10c29cba2245a05266dc776ae37972d Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 8 Oct 2020 20:19:28 +0800 Subject: [PATCH] Fix build when KERNEL_DYNLOAD is disabled Fix unused function warning treated as error when KERNEL_DYNLOAD option is switched off. Signed-off-by: Zbigniew Bodek Change-Id: I21a01ff3d7ecb7b2e65bacbaa985c6390f5e4be7 --- arch/arm/arm/Makefile | 1 + kernel/user/src/los_user_init.c | 5 +++-- syscall/Makefile | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/arm/Makefile b/arch/arm/arm/Makefile index 24d47056..648fe5c7 100644 --- a/arch/arm/arm/Makefile +++ b/arch/arm/arm/Makefile @@ -35,6 +35,7 @@ LOCAL_SRCS := $(wildcard src/*.c) $(wildcard src/*.S) LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/kernel/base/include \ -I $(LITEOSTOPDIR)/kernel/extended/include \ + -I $(LITEOSTOPDIR)/kernel/extended/dynload/include \ -I $(LITEOSTOPDIR)/arch/arm/arm/include \ ifeq ($(LITEOS_ARM_ARCH), -march=armv7-a) diff --git a/kernel/user/src/los_user_init.c b/kernel/user/src/los_user_init.c index e1bb9cfd..d8434323 100644 --- a/kernel/user/src/los_user_init.c +++ b/kernel/user/src/los_user_init.c @@ -30,13 +30,13 @@ */ #include "los_user_init.h" + +#ifdef LOSCFG_KERNEL_DYNLOAD #include "los_syscall.h" #define SYS_CALL_VALUE 0x900001 -#ifdef LOSCFG_KERNEL_DYNLOAD LITE_USER_SEC_RODATA STATIC CHAR *g_initPath = "/bin/init"; -#endif LITE_USER_SEC_TEXT STATIC UINT32 sys_call3(UINT32 nbr, UINT32 parm1, UINT32 parm2, UINT32 parm3) { @@ -55,6 +55,7 @@ LITE_USER_SEC_TEXT STATIC UINT32 sys_call3(UINT32 nbr, UINT32 parm1, UINT32 parm return reg0; } +#endif LITE_USER_SEC_ENTRY VOID OsUserInit(VOID *args) { diff --git a/syscall/Makefile b/syscall/Makefile index ef0e26a7..622ccc28 100644 --- a/syscall/Makefile +++ b/syscall/Makefile @@ -34,6 +34,7 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/base/include \ + -I $(LITEOSTOPDIR)/kernel/extended/dynload/include \ -I $(LITEOSTOPDIR)/fs/include \ -I $(LITEOSTOPDIR)/compat/posix/include \ -I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include \