diff --git a/.gitignore b/.gitignore index 77dbb6a9907fa0834c076ac8e7b081d22840a628..4b15f208bf5885c4c54525e8eb5c445a1e2437fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,27 @@ -/out -/test -/include -.config* -cscope* -tags -.vscode +# General ignored file types *.o -.idea -*.img +*.a +*.so *.swp *.rej *.orig -*.a -*.so -.config.cmd + +# IDE settings +.vscode +.idea .settings .cproject .project -platform/include/menuconfig.h -platform/board.ld -apps/init/init -apps/shell/shell + +# VIM files +cscope* +tags + +# Menuconfig temp files +/include/config +/include/generated +.config* + +# Build temp files +/platform/board.ld +/out diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 index f2608bcc68ff9d7858ab84601e371bb3655da595..6a36cc46b12b0677b5fd57a4ec5324f5cc076216 --- a/Makefile +++ b/Makefile @@ -49,7 +49,6 @@ LITEOS_TARGET = liteos LITEOS_LIBS_TARGET = libs_target LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h LITEOS_PLATFORM_BASE = $(LITEOSTOPDIR)/platform -LITEOS_PLATFORM_MENUCONFIG_H = $(LITEOS_PLATFORM_BASE)/include/menuconfig.h export CONFIG_=LOSCFG_ MENUCONFIG_PATH = $(LITEOSTOPDIR)/tools/menuconfig @@ -124,7 +123,7 @@ $(__LIBS): $(OUT) $(CXX_INCLUDE) $(OUT): $(LITEOS_MENUCONFIG_H) $(HIDE)mkdir -p $(OUT)/lib $(HIDE)$(CC) -I$(LITEOSTOPDIR)/kernel/base/include -I$(LITEOSTOPDIR)/../../$(LOSCFG_BOARD_CONFIG_PATH) \ - -I$(LITEOS_PLATFORM_BASE)/include -E $(LITEOS_PLATFORM_BASE)/board.ld.S \ + -I$(LITEOS_PLATFORM_BASE)/include -imacros $< -E $(LITEOS_PLATFORM_BASE)/board.ld.S \ -o $(LITEOS_PLATFORM_BASE)/board.ld -P $(BUILD): @@ -141,14 +140,13 @@ menuconfig:$(MENUCONFIG_MCONF) $< $(KCONFIG_FILE_PATH) genconfig:$(MENUCONFIG_CONF) - $(HIDE)mkdir -p include/config include/generated platform/include + $(HIDE)mkdir -p include/config include/generated $< --olddefconfig $(KCONFIG_FILE_PATH) $< --silentoldconfig $(KCONFIG_FILE_PATH) - -mv -f $(LITEOS_MENUCONFIG_H) $(LITEOS_PLATFORM_MENUCONFIG_H) ##### menuconfig end ####### $(LITEOS_MENUCONFIG_H): -ifneq ($(LITEOS_PLATFORM_MENUCONFIG_H), $(wildcard $(LITEOS_PLATFORM_MENUCONFIG_H))) +ifneq ($(LITEOS_MENUCONFIG_H), $(wildcard $(LITEOS_MENUCONFIG_H))) $(HIDE)$(MAKE) genconfig endif $(LITEOS_TARGET): $(__LIBS) @@ -197,16 +195,13 @@ clean: done $(HIDE)$(MAKE) -C apps clean $(HIDE)$(RM) $(__OBJS) $(LITEOS_TARGET) $(BUILD) $(LITEOS_MENUCONFIG_H) *.bak *~ - $(HIDE)$(RM) $(LITEOS_PLATFORM_MENUCONFIG_H) - $(HIDE)$(RM) include + $(HIDE)$(RM) include/config include/generated $(HIDE)$(MAKE) cleanrootfs $(HIDE)echo "clean $(LITEOS_PLATFORM) finish" -cleanall: - $(HIDE)$(RM) $(LITEOSTOPDIR)/out - $(HIDE)find $(LITEOS_PLATFORM_BASE)/ -name board.ld -exec rm -rf {} \; - $(HIDE)cd sample/sample_osdrv;make clean;cd ../..; - $(HIDE)echo "clean all" +cleanall: clean + $(HIDE)$(RM) $(LITEOSTOPDIR)/out $(LITEOS_PLATFORM_BASE)/board.ld + $(HIDE)echo "clean all done" cleanrootfs: $(HIDE)$(RM) $(OUT)/rootfs diff --git a/arch/arm/arm/include/arch_config.h b/arch/arm/arm/include/arch_config.h old mode 100755 new mode 100644 index 53f09d0245303b432b7cc98842dd25da92b9cbdd..a12909b1fc396c6958222eeff9df19d6a7082dce --- a/arch/arm/arm/include/arch_config.h +++ b/arch/arm/arm/include/arch_config.h @@ -32,7 +32,6 @@ #ifndef _ARCH_CONFIG_H #define _ARCH_CONFIG_H -#include "menuconfig.h" #define CPSR_INT_DISABLE 0xC0 /* Disable both FIQ and IRQ */ #define CPSR_IRQ_DISABLE 0x80 /* IRQ disabled when =1 */ diff --git a/arch/arm/arm/include/los_tlb_v6.h b/arch/arm/arm/include/los_tlb_v6.h index 7257babeb20977286716ea201583fcb81a049912..cdfa7971977c147518be6d41b7fa12d68856c674 100644 --- a/arch/arm/arm/include/los_tlb_v6.h +++ b/arch/arm/arm/include/los_tlb_v6.h @@ -37,7 +37,6 @@ #define __LOS_TLB_V6_H__ #include "los_typedef.h" -#include "menuconfig.h" #include "arm.h" #ifdef __cplusplus diff --git a/fs/zpfs/vfs_zpfs.h b/fs/zpfs/vfs_zpfs.h index 827b8d0ab5a11bc810aeb569c889cf6e56bdae84..7b2b23ebbb599031696fde323ef26edceeda6558 100644 --- a/fs/zpfs/vfs_zpfs.h +++ b/fs/zpfs/vfs_zpfs.h @@ -37,7 +37,6 @@ #include "compiler.h" #include "los_base.h" #include "los_typedef.h" -#include "menuconfig.h" #ifdef LOSCFG_FS_ZPFS diff --git a/kernel/base/vm/los_vm_scan.c b/kernel/base/vm/los_vm_scan.c old mode 100755 new mode 100644 index 4815ea8bfb1331b0563e9406b4e746c4c182ac03..e179f8fe30c896771ab3f4d38a0756b95a7bbfbf --- a/kernel/base/vm/los_vm_scan.c +++ b/kernel/base/vm/los_vm_scan.c @@ -29,7 +29,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "menuconfig.h" #ifdef LOSCFG_FS_VFS #include "fs/file.h" diff --git a/kernel/common/patchfs/los_partition_utils.h b/kernel/common/patchfs/los_partition_utils.h index 8fcc167511f20124d2bf61c537400af761336d28..d4f9860714928b61c2b0fb6f1adb766564567440 100644 --- a/kernel/common/patchfs/los_partition_utils.h +++ b/kernel/common/patchfs/los_partition_utils.h @@ -31,7 +31,6 @@ #ifndef _LOS_PARTITION_UTILS_H #define _LOS_PARTITION_UTILS_H -#include "menuconfig.h" #include "los_typedef.h" #include "los_base.h" diff --git a/kernel/common/sys_config.h b/kernel/common/sys_config.h old mode 100755 new mode 100644 index 7e38fc8a4b952954c522654e3202f53a89118238..40decfaf5f43486a2d92c71447a146b68b66a737 --- a/kernel/common/sys_config.h +++ b/kernel/common/sys_config.h @@ -32,7 +32,6 @@ #ifndef _SYS_CONFIG_H #define _SYS_CONFIG_H -#include "menuconfig.h" #ifdef __cplusplus #if __cplusplus diff --git a/net/lwip-2.1/porting/include/lwip/lwipopts.h b/net/lwip-2.1/porting/include/lwip/lwipopts.h old mode 100755 new mode 100644 index 3656f696c989b85bc1e1d798712d15ae2c3ee807..57f4ddd70b24dde9a719d3fd29db20fb67e847b0 --- a/net/lwip-2.1/porting/include/lwip/lwipopts.h +++ b/net/lwip-2.1/porting/include/lwip/lwipopts.h @@ -32,7 +32,6 @@ #ifndef _LWIP_PORTING_LWIPOPTS_H_ #define _LWIP_PORTING_LWIPOPTS_H_ -#include "menuconfig.h" // lwIP debug options, comment the ones you don't want #if LWIP_DEBUG diff --git a/syscall/fs_syscall.c b/syscall/fs_syscall.c index 79e0bf766b1426cb6217c99ce1ac42e6ac53cfee..2df23ff41006b4e79ccba098498c196760044ed3 100644 --- a/syscall/fs_syscall.c +++ b/syscall/fs_syscall.c @@ -29,7 +29,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "menuconfig.h" #ifdef LOSCFG_FS_VFS #include "errno.h" #include "unistd.h" diff --git a/syscall/los_syscall.c b/syscall/los_syscall.c old mode 100755 new mode 100644 index bd3c464d1765f37328a12697716182a49147e199..292181598dc3e4b0718447f58d5e0dfbf2f27701 --- a/syscall/los_syscall.c +++ b/syscall/los_syscall.c @@ -30,7 +30,6 @@ */ #define _GNU_SOURCE -#include "menuconfig.h" #ifdef LOSCFG_FS_VFS #include "fs/fs.h" #include "fs/file.h" diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk old mode 100755 new mode 100644 index c2166fcf73572a97bc9776a413436cceb710bbb7..cf1526c3140c7505fe9cc96354f48e43e25a404c --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -119,6 +119,7 @@ CXX_PATH = $(LITEOSTOPDIR)/lib/cxxstl JFFS_PATH = $(LITEOSTOPDIR)/fs/jffs2 LITEOS_SCRIPTPATH ?= $(LITEOSTOPDIR)/tools/scripts LITEOS_LIB_BIGODIR = $(OUT)/lib/obj +LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h LOSCFG_ENTRY_SRC = $(LITEOSTOPDIR)/kernel/common/los_config.c ### include variable @@ -670,6 +671,9 @@ LITEOS_COPTS_EXTRA_INTERWORK := $(LITEOS_COPTS_EXTRA) #-fno-inline endif +# kernel configuration macros +LITEOS_CMACRO += -imacros $(LITEOS_MENUCONFIG_H) + ifneq ($(LOSCFG_COMPILER_CLANG_LLVM), y) LITEOS_LD_OPTS += -nostartfiles endif