On Tue, Jan 31, 2012 at 11:17 AM, wrote: > >> >> In production I could implement the block device in flash, as has been >> done with /dev/mtdblock2, > I do not think it would be a good solution =A0because a user could delete= BIOS =A0from the flash > by an accident and then only JTAG solution or changing the flash would he= lp > > All that I would like to achive is to test/check that flash and SDRAM chi= ps work correctly. > So I was thinking about writing some data to them and read data back and = check if I receive > the same data.For this reason I need to know which address is for flash a= nd which for > SDRAM modules You cannot do this directly in Linux for a few reasons. Others have already mentioned the SDRAM / physical / virtual addressing. >From a quick search, the Dreambox appears to use U Boot, and that supports a memtest utility. Is there a way for you to interrupt the boot process to access the U Boot command line? Hopefully support for that will be compiled in. If the flash devices are NAND, you cannot do it directly either, as there is an OOB data area that is used to store ECC and various other things related to the filesystem (bad blocks, wear leveling, etc). With current NAND technology, you could have up to 4 bits flipped per 512 bytes. And it gets worse as they go to smaller technologies. I've been dealing with this for the past month, as the performance takes a hit with the more complicated ECC algorithm. Hamming 1-bit is a lot faster than BCH 4 bit when you're doing it in software. :( Linux itself has some kernel modules and userspace tools to test NAND devices. Google mtd_stresstest and you should be able to find some information. The nandtest utility in the mtd-utils package is also useful. NOTE! Make sure you read the documentation carefully on these utilities as they are destructive to the filesystem and if you trash your bootloader, the only way to recover is likely JTAG. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .