diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h index 6cf7dc716ace0a74ddfcfd5b5d4c8a922fcd2762..c45d2794bfcde7d9493a526654ddb6cea194eb02 100644 --- a/bsp/mini2440/rtconfig.h +++ b/bsp/mini2440/rtconfig.h @@ -89,7 +89,7 @@ /* using DFS support */ #define RT_USING_DFS #define RT_USING_DFS_EFSL -#define RT_USING_DFS_YAFFS2 +/* #define RT_USING_DFS_YAFFS2 */ /* #define DFS_USING_WORKDIR */ diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py index ae3d48f2fe2aabc56a8c13c3ba446516eb0b2959..cb3bb45c967daddde365778abe4288648b7b7e14 100644 --- a/bsp/mini2440/rtconfig.py +++ b/bsp/mini2440/rtconfig.py @@ -1,20 +1,49 @@ -# component options +import SCons.cpp -# finsh shell option -RT_USING_FINSH = True +# component options -# device file system options -RT_USING_DFS = True -RT_USING_DFS_EFSL = True +# make all component false +RT_USING_FINSH = False +RT_USING_DFS = False +RT_USING_DFS_EFSL = False RT_USING_DFS_ELMFAT = False RT_USING_DFS_YAFFS2 = False +RT_USING_LWIP = False +RT_USING_WEBSERVER = False +RT_USING_RTGUI = False + +# parse rtconfig.h to get used component +PreProcessor = SCons.cpp.PreProcessor() +f = file('rtconfig.h', 'r') +contents = f.read(4096) +f.close() +PreProcessor.process_contents(contents) +rtconfig_ns = PreProcessor.cpp_namespace + +# finsh shell options +if rtconfig_ns.has_key('RT_USING_FINSH'): + RT_USING_FINSH = True + +# device virtual filesystem options +if rtconfig_ns.has_key('RT_USING_DFS'): + RT_USING_DFS = True + + if rtconfig_ns.has_key('RT_USING_DFS_EFSL'): + RT_USING_DFS_EFSL = True + if rtconfig_ns.has_key('RT_USING_DFS_ELMFAT'): + RT_USING_DFS_ELMFAT = True + if rtconfig_ns.has_key('RT_USING_DFS_YAFFS2'): + RT_USING_DFS_YAFFS2 = True # lwip options -RT_USING_LWIP = True -RT_USING_WEBSERVER = False +if rtconfig_ns.has_key('RT_USING_LWIP'): + RT_USING_LWIP = True + if rtconfig_ns.has_key('RT_USING_WEBSERVER'): + RT_USING_WEBSERVER = True # rtgui options -RT_USING_RTGUI = True +if rtconfig_ns.has_key('RT_USING_RTGUI'): + RT_USING_RTGUI = True # panel options # 'PNL_A70','PNL_N35', 'PNL_T35'