* [ECOS] JFFS2 no space left on device error @ 2005-07-31 16:37 Edgar Grimberg 2005-07-31 20:33 ` Gary Thomas 0 siblings, 1 reply; 6+ messages in thread From: Edgar Grimberg @ 2005-07-31 16:37 UTC (permalink / raw) To: eCos Discussion List Hi, I have loaded the jffs2 image provided in the eCos tree onto my board (EB40A-like) using redboot and the serial port. I made an FIS entry named JFFS2 with this image. (no errors so far) After that, using the BDI2000 debugger, I have programmed the jffs2_1 test onto the board. It seems that the mounting of the jffs2 image is working OK (at least no errors on the serial), I get some directory listing (perhaps not OK, considering the file structure from the support/jffs2 folder): <INFO>: reading directory / <INFO>: entry . [mode 016f0001 ino 00000001 nlink 1 size 0] <INFO>: entry .. [mode 016f0001 ino 00000001 nlink 1 size 0] Creating a file gives me: <INFO>: create file /foo size 202 <FAIL>: open() returned -1 No space left on device <FAIL>: write() returned -1 Bad file handle and the bad file handle message continues. Any hints? Regards, Edgar -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] JFFS2 no space left on device error 2005-07-31 16:37 [ECOS] JFFS2 no space left on device error Edgar Grimberg @ 2005-07-31 20:33 ` Gary Thomas 2005-08-01 12:18 ` Edgar Grimberg 0 siblings, 1 reply; 6+ messages in thread From: Gary Thomas @ 2005-07-31 20:33 UTC (permalink / raw) To: Edgar Grimberg; +Cc: eCos Discussion On Sun, 2005-07-31 at 19:37 +0300, Edgar Grimberg wrote: > Hi, > > I have loaded the jffs2 image provided in the eCos tree onto my board > (EB40A-like) using redboot and the serial port. I made an FIS entry > named JFFS2 with this image. (no errors so far) > After that, using the BDI2000 debugger, I have programmed the jffs2_1 > test onto the board. > It seems that the mounting of the jffs2 image is working OK (at least no > errors on the serial), I get some directory listing (perhaps not OK, > considering the file structure from the support/jffs2 folder): > > <INFO>: reading directory / > <INFO>: entry . [mode 016f0001 ino 00000001 nlink 1 size 0] > <INFO>: entry .. [mode 016f0001 ino 00000001 nlink 1 size 0] > > Creating a file gives me: > > <INFO>: create file /foo size 202 > <FAIL>: open() returned -1 No space left on device > <FAIL>: write() returned -1 Bad file handle > > and the bad file handle message continues. > > Any hints? When you created the image (in RedBoot), did you make it larger than the actual JFFS2 image that you created? In other words, JFFS2 needs additional FLASH space within the RedBoot (FIS) image in order to create new files (or even rewrite/update existing ones). -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] JFFS2 no space left on device error 2005-07-31 20:33 ` Gary Thomas @ 2005-08-01 12:18 ` Edgar Grimberg 2005-08-01 14:46 ` Andrew Lunn 0 siblings, 1 reply; 6+ messages in thread From: Edgar Grimberg @ 2005-08-01 12:18 UTC (permalink / raw) To: Gary Thomas; +Cc: eCos Discussion >When you created the image (in RedBoot), did you make it larger >than the actual JFFS2 image that you created? In other words, >JFFS2 needs additional FLASH space within the RedBoot (FIS) >image in order to create new files (or even rewrite/update >existing ones). > > > Hello Gary, Thanks for the response. I am describing the exact steps that I followed, maybe this will clear up the problems that I have: 1. the ecos.ecc file from my build tree contains: cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_1 { # Flavor: bool user_value 0 # value_source user # Default value: 1 }; cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_FIS_1 { # Flavor: bool user_value 1 # value_source user # Default value: 0 }; # > # Name of FIS entry # cdl_component CYGDAT_IO_FLASH_BLOCK_FIS_NAME_1 { # Flavor: data user_value "\"jffs2\"" # value_source user # Default value: "\"jffs2\"" }; 2. Create the jffs2 image file using: mkfs.jffs2 --pad=0x20000 -e 0x10000 -r ./etc -o ./jffs2.img 3. Upload the image file to flash, using RedBoot and FIS: RedBoot> load -m ymodem -b %{FREEMEMLO} -r CRaw file loaded 0x20007000-0x20026fff, assumed entry at 0x20007000 xyzModem - CRC mode, 1026(SOH)/0(STX)/0(CAN) packets, 5 retries RedBoot> fis create -b 0x20007000 -l 0x40000 -s 0x30000 -f 0x10b0000 JFFS2 ... Erase from 0x010b0000-0x010f0000: .... ... Program from 0x20007000-0x20037000 at 0x010b0000: ... ... Erase from 0x013f0000-0x01400000: . ... Program from 0x20070000-0x20080000 at 0x013f0000: . RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0x01000000 0x01000000 0x00020000 0x00000000 JFFS2 0x010B0000 0x010B0000 0x00040000 0x20007000 FIS directory 0x013F0000 0x013F0000 0x0000F000 0x00000000 RedBoot config 0x013FF000 0x013FF000 0x00001000 0x00000000 4. Program the first test for JFFS2 from ecos, using the bdi2000 debugger, taking care not to erase the FIS directory or the jffs2 images from flash. The test is programmed at 0x1000000, just over redboot (maybe this is a problem?) 5. Run the test (jffs2_1) and get the following: <INFO>: reading directory / <INFO>: entry . [mode 016f0001 ino 00000001 nlink 1 size 0] <INFO>: entry .. [mode 016f0001 ino 00000001 nlink 1 size 0] <INFO>: create file /foo size 202 <FAIL>: open() returned -1 No space left on device <FAIL>: write() returned -1 Bad file handle <FAIL>: write() returned -1 Bad file handle Am I doing something wrong? Regards, Edgar -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] JFFS2 no space left on device error 2005-08-01 12:18 ` Edgar Grimberg @ 2005-08-01 14:46 ` Andrew Lunn 2005-08-01 15:45 ` Edgar Grimberg 0 siblings, 1 reply; 6+ messages in thread From: Andrew Lunn @ 2005-08-01 14:46 UTC (permalink / raw) To: Edgar Grimberg; +Cc: eCos Discussion On Mon, Aug 01, 2005 at 03:17:48PM +0300, Edgar Grimberg wrote: > > >When you created the image (in RedBoot), did you make it larger > >than the actual JFFS2 image that you created? In other words, > >JFFS2 needs additional FLASH space within the RedBoot (FIS) > >image in order to create new files (or even rewrite/update > >existing ones). > > > > > > > > Hello Gary, > > Thanks for the response. I am describing the exact steps that I > followed, maybe this will clear up the problems that I have: > > 1. the ecos.ecc file from my build tree contains: > > cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_1 { > # Flavor: bool > user_value 0 > # value_source user > # Default value: 1 > }; > cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_FIS_1 { > # Flavor: bool > user_value 1 > # value_source user > # Default value: 0 > }; > # > > # Name of FIS entry > # > cdl_component CYGDAT_IO_FLASH_BLOCK_FIS_NAME_1 { > # Flavor: data > user_value "\"jffs2\"" > # value_source user > # Default value: "\"jffs2\"" > }; You actually called it JFFS2 in FIS, not jffs2. I'm not sure if this matters..... > 2. Create the jffs2 image file using: > > mkfs.jffs2 --pad=0x20000 -e 0x10000 -r ./etc -o ./jffs2.img > > 3. Upload the image file to flash, using RedBoot and FIS: > > RedBoot> load -m ymodem -b %{FREEMEMLO} -r > CRaw file loaded 0x20007000-0x20026fff, assumed entry at 0x20007000 > xyzModem - CRC mode, 1026(SOH)/0(STX)/0(CAN) packets, 5 retries > RedBoot> fis create -b 0x20007000 -l 0x40000 -s 0x30000 -f 0x10b0000 JFFS2 > ... Erase from 0x010b0000-0x010f0000: .... > ... Program from 0x20007000-0x20037000 at 0x010b0000: ... > ... Erase from 0x013f0000-0x01400000: . > ... Program from 0x20070000-0x20080000 at 0x013f0000: . > RedBoot> fis list > Name FLASH addr Mem addr Length Entry point > RedBoot 0x01000000 0x01000000 0x00020000 0x00000000 > JFFS2 0x010B0000 0x010B0000 0x00040000 0x20007000 > FIS directory 0x013F0000 0x013F0000 0x0000F000 0x00000000 > RedBoot config 0x013FF000 0x013FF000 0x00001000 0x00000000 > > 4. Program the first test for JFFS2 from ecos, using the bdi2000 > debugger, taking care not to erase the FIS directory or the jffs2 images > from flash. The test is programmed at 0x1000000, just over redboot > (maybe this is a problem?) Err, actually yes it could be. To read the FIS directory is calls into Redboot. If you have stomped over redboot im supprised the test even runs. Looking at your FIS directory you have 0x01020000 - 0x10AFFFF free. Try linking jffs2_1 to run at that address and put Redboot back at 0x01000000. > 5. Run the test (jffs2_1) and get the following: > > <INFO>: reading directory / > <INFO>: entry . [mode 016f0001 ino 00000001 nlink 1 size 0] > <INFO>: entry .. [mode 016f0001 ino 00000001 nlink 1 size 0] This does not seem right. There should be other entries. Try jffs2dump -content ./jffs2.img and see if etc, passwd etc is in the image. 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] JFFS2 no space left on device error 2005-08-01 14:46 ` Andrew Lunn @ 2005-08-01 15:45 ` Edgar Grimberg 2005-08-02 12:57 ` Edgar Grimberg 0 siblings, 1 reply; 6+ messages in thread From: Edgar Grimberg @ 2005-08-01 15:45 UTC (permalink / raw) To: Andrew Lunn; +Cc: eCos Discussion Hello, Thanks for the hints, Andrew. One more thing I didn't specified, I have taken the mkfs.jffs2 from the CVS. $ mkfs.jffs2 --version mkfs.jffs2: revision 1.43 I did as you told me, as follows... >You actually called it JFFS2 in FIS, not jffs2. I'm not sure if this >matters..... > > RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0x01000000 0x01000000 0x00020000 0x00000000 appl 0x01020000 0x01020000 0x00030000 0x20007000 jffs2 0x010B0000 0x010B0000 0x00040000 0x20007000 FIS directory 0x013F0000 0x013F0000 0x0000F000 0x00000000 RedBoot config 0x013FF000 0x013FF000 0x00001000 0x00000000 I have changed the name of the jffs FIS image, but if the application can mount the JFFS2 file system, I am not sure it matters. Anyway, I am consistent with the ecos.ecc file. > > >Err, actually yes it could be. To read the FIS directory is calls into >Redboot. If you have stomped over redboot im supprised the test even >runs. Looking at your FIS directory you have 0x01020000 - 0x10AFFFF >free. Try linking jffs2_1 to run at that address and put Redboot back >at 0x01000000. > > Did that, in the fis list command results above, you can see the appl image that contains the binary image of jffs2_1 test (made binary with arm-elf-objcopy ./jffs2_1 ./jffs2_1.bin -O binary and uploaded with RedBoot). I have stared the test with go 0x1020000 commmand in redboot, unfortunatly the same result. >This does not seem right. There should be other entries. Try > >jffs2dump -content ./jffs2.img > >and see if etc, passwd etc is in the image. > > > It is not right, indeed... $ ./jffs2dump --content /tftpboot/jffs2.img Dirent node at 0x0000000c, totlen 0x0000002b, #pino 1, version 0, #ino 2, nsize 3, name CVS Inode node at 0x00000038, totlen 0x00000044, #ino 2, version 1, isize 0, csize 0, dsize 0, offset 0 Dirent node at 0x0000007c, totlen 0x0000002d, #pino 1, version 1, #ino 3, nsize 5, name group Inode node at 0x000000ac, totlen 0x0000013b, #ino 3, version 1, isize 445, csize 247, dsize 445, offset 0 Dirent node at 0x000001e8, totlen 0x0000002e, #pino 1, version 2, #ino 4, nsize 6, name passwd Inode node at 0x00000218, totlen 0x0000019d, #ino 4, version 1, isize 658, csize 345, dsize 658, offset 0 Dirent node at 0x000003b8, totlen 0x0000002f, #pino 2, version 3, #ino 5, nsize 7, name Entries Inode node at 0x000003e8, totlen 0x00000086, #ino 5, version 1, isize 85, csize 66, dsize 85, offset 0 Dirent node at 0x00000470, totlen 0x00000032, #pino 2, version 4, #ino 6, nsize 10, name Repository Inode node at 0x000004a4, totlen 0x00000075, #ino 6, version 1, isize 49, csize 49, dsize 49, offset 0 Dirent node at 0x0000051c, totlen 0x0000002c, #pino 2, version 5, #ino 7, nsize 4, name Root Inode node at 0x00000548, totlen 0x00000073, #ino 7, version 1, isize 47, csize 47, dsize 47, offset 0 Thanks for your patience, Edgar -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ECOS] JFFS2 no space left on device error 2005-08-01 15:45 ` Edgar Grimberg @ 2005-08-02 12:57 ` Edgar Grimberg 0 siblings, 0 replies; 6+ messages in thread From: Edgar Grimberg @ 2005-08-02 12:57 UTC (permalink / raw) To: eCos Discussion Hello, I was wondering if I am affected by the bug in the arm-elf-gcc version 3.2.x, with a different symptomatic than the one in http://ecos.sourceware.org/ml/ecos-patches/2003-08/msg00006.html My gcc version shouts: $ arm-elf-gcc --version arm-elf-gcc (GCC) 3.2.1 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Regards, Edgar -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-02 12:57 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-07-31 16:37 [ECOS] JFFS2 no space left on device error Edgar Grimberg 2005-07-31 20:33 ` Gary Thomas 2005-08-01 12:18 ` Edgar Grimberg 2005-08-01 14:46 ` Andrew Lunn 2005-08-01 15:45 ` Edgar Grimberg 2005-08-02 12:57 ` Edgar Grimberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).