Hi
Working on a project based on the AT9SAM9261-EK board and it all works, but on the production boards we do not have a nandflash, we want all parts of linux to be in the dataflash (in our case 8Meg).
So I have successfully compiled the kernel and created a filesystem, bootloader etc.
On the at91sam9261ek board the filesystem that the kernel boots to is located in nand flash.
The ffs2 filsystem needed to run our project is so small it will fit without any problem in the flashdata chip.
So I have tried for a very long time now to make the kernal boot to a ffs2 file system located in the dataflash (DataFlash:AT45DB642 8Mb) and not to the default nandflash (Samsung NAND 256MiB).
By changing the kernel Kconfig in
/linux-2.6.26/drivers/mtd/devices/Kconfig
line 57: commenting out the dependency
the at45 dataflash option becoms available for the at91sam9261ek board
I followed the atmel pdf for using data flash at:
http://www.atmel.com/dyn/resources/prod ... c32055.pdfand successfully compiled the kernel and booted it up using a ffs2 filesystem located in nand.
Here is a part of the successful boot output and you can see the dataflash driver seems to be loaded and working.
(from the debug consol connected to the serialport on the dev board)
---------------------------------------------------------------------------------------------
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes)
---------------------------------------------------------------------------------------------
after the bootup, I login with root(no password) and
when I do a partitions check I get this:
---------------------------------------------------------------------------------------------
root@at91sam9261ek:/$ cat /proc/partitions
major minor #blocks name
31 0 256 mtdblock0
31 1 261888 mtdblock1
31 2 8448 mtdblock2
root@at91sam9261ek:/$
---------------------------------------------------------------------------------------------
so I got the dataflash partition, and here is where my problem is
I create a directory so I can mount the dataflash to it.
mkdir test
I check that test is created and it is.
So now I try to mount it to the dataflash
mount -t jffs2 /dev/mtdblock2 test
and all I get is a massiv amount of this:
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c00: 0xe04d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c04: 0xae02 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c08: 0x36e0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c0c: 0xb5dd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c10: 0x74a5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c14: 0x1e89 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c18: 0x3d40 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00162c1c: 0x9719 instead
and it goes on for a while, so here is where I am stuck, I have tried to find any answers on the net and many people have the same problems,
Conclusion:
I simply want the at91sam9261-ek to run everything from dataflash and not include the nand flash, is that not possible ?
A first step would be to be able to mount the data flash the linux that I already have working, but as already shown, that gives me the Magic bitmask 0x1985 not found error.
I have read on the net that others have tried to do the same thing but no answers has been found for it.
Any clues, no matter how small will be greatly appreciated.
Jorgen