* UBIFS on Atmel Dataflash @ 2009-12-09 8:30 Andre Puschmann 2009-12-09 8:53 ` Artem Bityutskiy 0 siblings, 1 reply; 5+ messages in thread From: Andre Puschmann @ 2009-12-09 8:30 UTC (permalink / raw) To: linux-mtd Hi guys, this is my very first try to get UBIFS working. My target is an Atmel AT91RM9200 cpu which has a 8MB Atmel Dataflash AT45DB642x. Pagesize is 1056 Bytes. I cross-compiled the ubi tools and my first try to attach was not successful: $ ./ubiattach /dev/ubi_ctrl -m 6 UBI: attaching mtd6 to ubi0 UBI error: io_init: min. I/O unit (1056) is not power of 2 My question is if it's possible (in general) to get a working version of UBIFS on this kind of flash (with no power of two pagesize)? Anybody ever tried this? I also tried ubiformat which raises a segfault: $ ./ubiformat /dev/mtd6 ubiformat: warning!: your MTD system is old and it is impossible to detect sub-page size. Use -s to get rid of this warning ubiformat: assume sub-page to be 1056 ubiformat: mtd6 (dataflash), size 4815360 bytes (4.6 MiB), 4560 eraseblocks of 1056 bytes (1.0 KiB), min. I/O size 1056 bytes libscan: scanning eraseblock 4559 -- 100 % complete ubiformat: 4554 eraseblocks are supposedly empty ubiformat: warning!: 6 of 4560 eraseblocks contain non-ubifs data ubiformat: continue? (yes/no) yes ubiformat: warning!: only 0 of 4560 eraseblocks have valid erase counter ubiformat: erase counter 0 will be used for all eraseblocks ubiformat: note, arbitrary erase counter value may be specified using -e option ubiformat: continue? (yes/no) yes ubiformat: use erase counter 0 for all eraseblocks ubiformat: formatting eraseblock 4559 -- 100 % complete Segmentation fault Any comments on this are highly appreciated. Best regards, Andre ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: UBIFS on Atmel Dataflash 2009-12-09 8:30 UBIFS on Atmel Dataflash Andre Puschmann @ 2009-12-09 8:53 ` Artem Bityutskiy 2009-12-09 9:55 ` Andre Puschmann 2009-12-09 14:33 ` Artem Bityutskiy 0 siblings, 2 replies; 5+ messages in thread From: Artem Bityutskiy @ 2009-12-09 8:53 UTC (permalink / raw) To: Andre Puschmann; +Cc: linux-mtd On Wed, 2009-12-09 at 09:30 +0100, Andre Puschmann wrote: > Hi guys, > > this is my very first try to get UBIFS working. My target is an Atmel > AT91RM9200 cpu which has a 8MB Atmel Dataflash AT45DB642x. Pagesize is > 1056 Bytes. > > I cross-compiled the ubi tools and my first try to attach was not > successful: > > $ ./ubiattach /dev/ubi_ctrl -m 6 > UBI: attaching mtd6 to ubi0 > UBI error: io_init: min. I/O unit (1056) is not power of 2 Yeah, I had a feeling we should not have assumed power of 2. But it was so appealing, because we can avoid (slow) divisions when aligning data to min. I/O unit boundary. I knew about DataFlash, but it is usually so small that I did not expect anyone using UBIFS there. Are you sure you want ubifs on such a tiny flash? We were really targeting to larger ones, say, starting from 64MiB at least. Basically, there is not fundamental reasons not to support non-power of 2 min. I/O unit size, besides of optimizations. And to fix this, one would need to carefully look at / grep for min_io_size usage in both UBI/UBIFS, and change stuff like ALIGN(x, c->min_io_size) to something else. But there are very many of such places. > My question is if it's possible (in general) to get a working version of > UBIFS on this kind of flash (with no power of two pagesize)? Anybody > ever tried this? It is possible, but needs some work, which should not be too difficult. I never heard anyone trying, though. > I also tried ubiformat which raises a segfault: > > $ ./ubiformat /dev/mtd6 > ubiformat: warning!: your MTD system is old and it is impossible to > detect sub-page size. Use -s to get rid of this warning > ubiformat: assume sub-page to be 1056 > ubiformat: mtd6 (dataflash), size 4815360 bytes (4.6 MiB), 4560 > eraseblocks of 1056 bytes (1.0 KiB), min. I/O size 1056 bytes > libscan: scanning eraseblock 4559 -- 100 % complete > ubiformat: 4554 eraseblocks are supposedly empty > ubiformat: warning!: 6 of 4560 eraseblocks contain non-ubifs data > ubiformat: continue? (yes/no) yes > ubiformat: warning!: only 0 of 4560 eraseblocks have valid erase counter > ubiformat: erase counter 0 will be used for all eraseblocks > ubiformat: note, arbitrary erase counter value may be specified using -e > option > ubiformat: continue? (yes/no) yes > ubiformat: use erase counter 0 for all eraseblocks > ubiformat: formatting eraseblock 4559 -- 100 % complete > Segmentation fault > > Any comments on this are highly appreciated. Yeah, I need to make ubiformat nicely return error instead of dying. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: UBIFS on Atmel Dataflash 2009-12-09 8:53 ` Artem Bityutskiy @ 2009-12-09 9:55 ` Andre Puschmann 2009-12-09 9:57 ` Artem Bityutskiy 2009-12-09 14:33 ` Artem Bityutskiy 1 sibling, 1 reply; 5+ messages in thread From: Andre Puschmann @ 2009-12-09 9:55 UTC (permalink / raw) To: dedekind1; +Cc: linux-mtd Hi Artem, thanks for your prompt reply. Artem Bityutskiy wrote: > Yeah, I had a feeling we should not have assumed power of 2. But it was > so appealing, because we can avoid (slow) divisions when aligning data > to min. I/O unit boundary. I knew about DataFlash, but it is usually so > small that I did not expect anyone using UBIFS there. > > Are you sure you want ubifs on such a tiny flash? We were really > targeting to larger ones, say, starting from 64MiB at least. > Mmh, the idea to run UBIFS came up due to a problem with JFFS2 on this device. So I wanted to use another writeable flash fs to find out whether its a fs-problem or a mtd/dataflash one. So you suggest to stick with JFFS2 in this case? > Basically, there is not fundamental reasons not to support non-power of > 2 min. I/O unit size, besides of optimizations. And to fix this, one > would need to carefully look at / grep for min_io_size usage in both > UBI/UBIFS, and change stuff like ALIGN(x, c->min_io_size) to something > else. But there are very many of such places. > Thanks for your explanation. Best regards, Andre ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: UBIFS on Atmel Dataflash 2009-12-09 9:55 ` Andre Puschmann @ 2009-12-09 9:57 ` Artem Bityutskiy 0 siblings, 0 replies; 5+ messages in thread From: Artem Bityutskiy @ 2009-12-09 9:57 UTC (permalink / raw) To: Andre Puschmann; +Cc: linux-mtd On Wed, 2009-12-09 at 10:55 +0100, Andre Puschmann wrote: > Hi Artem, > > thanks for your prompt reply. > > Artem Bityutskiy wrote: > > Yeah, I had a feeling we should not have assumed power of 2. But it was > > so appealing, because we can avoid (slow) divisions when aligning data > > to min. I/O unit boundary. I knew about DataFlash, but it is usually so > > small that I did not expect anyone using UBIFS there. > > > > Are you sure you want ubifs on such a tiny flash? We were really > > targeting to larger ones, say, starting from 64MiB at least. > > > Mmh, the idea to run UBIFS came up due to a problem with JFFS2 on this > device. So I wanted to use another writeable flash fs to find out > whether its a fs-problem or a mtd/dataflash one. > > So you suggest to stick with JFFS2 in this case? Yes, UBI/UBIFS flash overhead is higher, and it is not very appropriate for small flashes because of this. JFFS2 is better for small flashes. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: UBIFS on Atmel Dataflash 2009-12-09 8:53 ` Artem Bityutskiy 2009-12-09 9:55 ` Andre Puschmann @ 2009-12-09 14:33 ` Artem Bityutskiy 1 sibling, 0 replies; 5+ messages in thread From: Artem Bityutskiy @ 2009-12-09 14:33 UTC (permalink / raw) To: Andre Puschmann; +Cc: linux-mtd On Wed, 2009-12-09 at 10:53 +0200, Artem Bityutskiy wrote: > > Any comments on this are highly appreciated. > > Yeah, I need to make ubiformat nicely return error instead of dying. Just pushed a fix. It should now gracefully refuse your flash, instead of dying. Did not test, though. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-09 14:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-09 8:30 UBIFS on Atmel Dataflash Andre Puschmann 2009-12-09 8:53 ` Artem Bityutskiy 2009-12-09 9:55 ` Andre Puschmann 2009-12-09 9:57 ` Artem Bityutskiy 2009-12-09 14:33 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox