add ROMFS initialization.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1058 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
d4c03d07cf
commit
2c647575b3
|
@ -51,6 +51,10 @@ extern void rt_hw_touch_init(void);
|
||||||
#define RT_INIT_THREAD_STACK_SIZE (2*1024)
|
#define RT_INIT_THREAD_STACK_SIZE (2*1024)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_DFS_ROMFS
|
||||||
|
#include <dfs_romfs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void rt_init_thread_entry(void* parameter)
|
void rt_init_thread_entry(void* parameter)
|
||||||
{
|
{
|
||||||
/* Filesystem Initialization */
|
/* Filesystem Initialization */
|
||||||
|
@ -62,7 +66,6 @@ void rt_init_thread_entry(void* parameter)
|
||||||
#if defined(RT_USING_DFS_ELMFAT)
|
#if defined(RT_USING_DFS_ELMFAT)
|
||||||
/* init the elm chan FatFs filesystam*/
|
/* init the elm chan FatFs filesystam*/
|
||||||
elm_init();
|
elm_init();
|
||||||
|
|
||||||
/* mount sd card fat partition 1 as root directory */
|
/* mount sd card fat partition 1 as root directory */
|
||||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +75,16 @@ void rt_init_thread_entry(void* parameter)
|
||||||
rt_kprintf("File System initialzation failed!\n");
|
rt_kprintf("File System initialzation failed!\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(RT_USING_DFS_ROMFS)
|
||||||
|
dfs_romfs_init();
|
||||||
|
if (dfs_mount(RT_NULL, "/rom", "rom", 0, &romfs_root) == 0)
|
||||||
|
{
|
||||||
|
rt_kprintf("ROM File System initialized!\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rt_kprintf("ROM File System initialzation failed!\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(RT_USING_DFS_DEVFS)
|
#if defined(RT_USING_DFS_DEVFS)
|
||||||
devfs_init();
|
devfs_init();
|
||||||
if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0)
|
if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0)
|
||||||
|
@ -79,9 +92,11 @@ void rt_init_thread_entry(void* parameter)
|
||||||
else
|
else
|
||||||
rt_kprintf("Device File System initialzation failed!\n");
|
rt_kprintf("Device File System initialzation failed!\n");
|
||||||
|
|
||||||
|
#ifdef RT_USING_NEWLIB
|
||||||
/* init libc */
|
/* init libc */
|
||||||
libc_system_init("uart0");
|
libc_system_init("uart0");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue