From 969b9be9a7745b04ac5285302465e585dbfd08ff Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Fri, 29 Oct 2010 06:01:04 +0000 Subject: [PATCH] add devfs initialization in application.c git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1034 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/mini2440/application.c | 11 +++++++++++ bsp/mini2440/board.c | 2 ++ bsp/mini2440/rtconfig.py | 3 +++ 3 files changed, 16 insertions(+) diff --git a/bsp/mini2440/application.c b/bsp/mini2440/application.c index 93b6ed8bf..780971af8 100644 --- a/bsp/mini2440/application.c +++ b/bsp/mini2440/application.c @@ -71,6 +71,17 @@ void rt_init_thread_entry(void* parameter) else rt_kprintf("File System initialzation failed!\n"); #endif + +#if defined(RT_USING_DFS_DEVFS) + devfs_init(); + if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0) + rt_kprintf("Device File System initialized!\n"); + else + rt_kprintf("Device File System initialzation failed!\n"); + + /* init libc */ + libc_system_init("uart0"); +#endif } #endif diff --git a/bsp/mini2440/board.c b/bsp/mini2440/board.c index ee7b80280..7b9f85ff8 100644 --- a/bsp/mini2440/board.c +++ b/bsp/mini2440/board.c @@ -148,8 +148,10 @@ void rt_hw_board_init() /* initialize uart */ rt_hw_uart_init(); +#ifdef RT_USING_RTGUI /* init virtual keypad */ rt_hw_key_init(); +#endif /* initialize mmu */ rt_hw_mmu_init(); diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py index a38121b26..90b8c8f6d 100644 --- a/bsp/mini2440/rtconfig.py +++ b/bsp/mini2440/rtconfig.py @@ -9,6 +9,7 @@ RT_USING_DFS_ELMFAT = False RT_USING_DFS_YAFFS2 = False RT_USING_DFS_NFS = False RT_USING_DFS_ROMFS = False +RT_USING_DFS_DEVFS = False RT_USING_LWIP = False RT_USING_WEBSERVER = False RT_USING_RTGUI = False @@ -51,6 +52,8 @@ if rtconfig_ns.has_key('RT_USING_DFS'): RT_USING_DFS_NFS = True if rtconfig_ns.has_key('RT_USING_DFS_ROMFS'): RT_USING_DFS_ROMFS = True + if rtconfig_ns.has_key('RT_USING_DFS_DEVFS'): + RT_USING_DFS_DEVFS = True # lwip options if rtconfig_ns.has_key('RT_USING_LWIP'):