Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: AT91SAM9260-EK, Linux booting from NandFlash (persistent)
PostPosted: Tue Jan 13, 2009 7:07 pm 
Offline

Joined: Wed Dec 03, 2008 8:16 pm
Posts: 6
Hi everybody.

Can someone can show me the full procedure how to send a kernel and build a filesystem on the nand flash of the evaluation board of AT91SAM9260-EK ?

I tried many things but I have some error at the end.... the following is what I did.

1-Install Sam-Ba and be sure that all jumpers are present on the board.
2-Use Hyperterminal to see romboot (after powering the card). Also, I must see that the card is detected by Windows USB
driver.... /usb/Arm0.
3-Execute the AT91SAM9260_demo_linux_NandFlash.bat file provided by Atmel. It installs U-Boot (the batch file use samba
utilities).
4-Reset the ev-kit. UBoot is running.
5-Configure U-Boot by setting some environment variable like ipaddress, serverip, bootargs, etc.
6-Download with TFTP my kernel image uImage into 0x21500000 (ram) and rootfs.arm.ext2.gz into 0x21100000 (ram).
7-Boot from 0x21500000. Linux kernel is decompressed and run.

Until then, it works. Linux runs in RAM. My bootargs variable is ---> mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw

At this point we don't have a PERSISTENT file system because everything run into RAM. So I tried the following....

8-flash_eraseall /dev/mtd3
9-Tftp the file rootfs.arm.jffs2 (download).
10-nandwrite -p /dev/mtd3 rootfs.arm.jffs2

So now, the File system of type JFFS2 is on mtd3 device.

After a REBOOT, nothing happen !!!
I think that the Kernel for booting is not persistent into the NAND or the Uboot does not know where to jump, etc.
I have also a problem about SAVING ENVIRONMENT VARIABLE. When I do saveenv (in UBoot), it says that my block 3 is bad.
So each time a reboot my eval board, I need to rewrite the different environment variable.

Anyway, something is missing or I don't understand. I think that 90% of the job is done... how to boot from a persistent Linux on nandflash ? I did not see any complete procedure on the web... I hope someone will have the time to write a small walkthrough. I really need a persistent Linux in my evaluation board.

Thanks.


NOTE: (as seen by cat /proc/mtd)

mtd0 is boot
mtd1 is uboot
mtd2 kernel
mtd3 disk
mtd4 spi0.1-AT45DB642


Top
 Profile  
 
 Post subject: Re: AT91SAM9260-EK, Linux booting from NandFlash (persistent)
PostPosted: Tue Jan 13, 2009 9:03 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
Sounds to me like the uboot env is being saved to DataFlash and not NAND. You might want to try the prebuilt NANDFlash bootstrap and uboot files from http://www.linux4sam.org . My NAND boot setup has 2 MTD single block MTD partitions for uboot env. The save alternates between them. So I have:

mtd0 - boot
mtd1 - uboot
mtd2 - uboot env1
mtd3 - uboot env2
mtd4 - kernel
mtd5 - RFS

_________________
Tim Barr
Multitech Inc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: