[ECOS] Re: cannot mount effs2 filesystem at boot

Andrew Lunn andrew@lunn.ch
Mon Aug 30 14:59:00 GMT 2004


On Mon, Aug 30, 2004 at 04:10:23PM +0200, brix82@libero.it wrote:
> I have configured ecos, now the device "/dev/flash1" points to the correct
> location of the FIS directory:
> 
> cdl_option CYGNUM_IO_FLASH_BLOCK_OFFSET_1 {
>     # Flavor: data
>     user_value 0x00300000
> }
> 
> And here is the FIS directory listing:
> 
> RedBoot> fis list
> Name              FLASH addr  Mem addr    Length      Entry point
> RedBoot           0x50000000  0x50000000  0x00040000  0x00000000
> ...
> jffs              0x50300000  0x50300000  0x00080000  0x00050000
> 
> Unfortunately, i can't write to the filesystem. I modified
> /opt/ecos.massimo/ecos-2.0/packages/fs/jffs2/v2_0/src/os-ecos.h
> and changed CONFIG_JFFS2_FS_DEBUG to 2. Here are the last few lines of the output:
> 
> ...
> <7>erase_pending_list: 00000000 (used 00000000, dirty 00000000, wasted 00000000,
> unchecked 00000000, free 00040000)
> <7>erasable_pending_wbuf_list: empty
> <7>free_list: empty
> <7>bad_list: empty
> <7>bad_used_list: empty
> <7>Not rotating empty clean_list
> <7>Not rotating empty very_dirty_list
> <7>Not rotating empty dirty_list
> <7>Not rotating empty erasable_list
> <7>Rotating erase_pending_list by 0
> <7>Erase block at front of erase_pending_list is at 00000000
> <7>Not rotating empty free_list
> <7>jffs2_read_super(): Getting root inode
> <7>jffs2_read_inode(): inode->i_ino == 1
> <7>Allocated inocache at 0x00050438
> <7>jffs2_do_read_inode(): Creating inocache for root inode
> <7>jffs2_do_read_inode_internal(): ino #1 nlink is 1
> <7>jffs2_get_inode_nodes(): ino #1
> <7>jffs2_read_inode() returning
> <7>jffs2_read_super(): d_alloc_root()
> <7>Starting erase of pending block 0x00000000
> <7>Freeing all node refs for eraseblock offset 0x00000000
> <7>Erase completed successfully at 0x00000000
> <7>Verifying erase at 0x00000000
> <7>Writing erased marker to block at 0x00000000
> <7>jffs2_erase_pending_blocks completed
> arenasize 66781112, freeblocks 1, totalallocated 1584, totalfree 66779508,
> maxfree 66779508
> <INFO>: reading directory /
> <7>jffs2_readdir() for dir_i #1
> <7>Dirent 0: ".", ino #1
> <INFO>: entry              . [mode 00016f01 ino 000503b0 nlink 1 size 0]
> <7>jffs2_readdir() for dir_i #1
> <INFO>: entry             .. [mode 00016f01 ino 000503b0 nlink 1 size 0]
> <7>jffs2_readdir() for dir_i #1
> <INFO>: create file /foo size 202
> jffs2_lookup()
> jffs2_lookup()
> <7>jffs2_create()
> <7>jffs2_new_inode(): dir_i 1, mode 0x16f08
> <7>Allocated inocache at 0x00050750
> <7>jffs2_do_new_inode(): Assigned ino# 2
> <7>jffs2_reserve_space(): Requested 0x44 bytes
> <7>jffs2_reserve_space(): alloc sem got
> <7>dirty size 0x00000000 + unchecked_size 0x00000000 < sector size 0x00040000,
> returning -ENOSPC

You have run out of memory. 

> I also have an application (a mini shell, this is my real interest) which should
> browse the jffs2 filesystem image. In the main() function i do this:
> 
> 	mount( "/dev/flash1", "/", "jffs2" );
> 	while( 1 ) {
> 		getcwd( pwd, 100 );
> 		while( ( putchar(pwd[aptr++] ) ) != 0 );  // print PWD in the prompt
>                 ...
>        }

Before you can getcwd() you first need to do a cddir() to /, otherwise 
the cwd is undefined and generally causes problems.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list