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  [ 7 posts ] 
Author Message
 Post subject: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Wed Feb 25, 2009 9:53 pm 
Offline

Joined: Wed Feb 25, 2009 9:37 pm
Posts: 8
Hi all,

I am using a AT91SAM9263-EK and want to run Linux on it. I have
already downloaded Linux-2.6.27 kernel and built it for ARM. Steps I used:

1. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

2. mkimage -A arm -O linux -C none -T kernel -a 20008000 -e 20008000
-n linux-2.6 -d arch/arm/boot/zImage uImage

That gives me uImage.

3. On the AT91SAM9263-EK, I have downloaded Bootstrap and U-Boot using
SAM-BA at addresses 0x0 and 0x20000 respectively. I want to make use
of NAND FLASH.

4. I use tftp to put the uImage on AT91SAM9263EK
tftp 0x21400000 uImage

5. This is U-boot environment

bootargs=console=ttyS0,115200 root=/dev/mtdblock5
mtdparts=at91_nand:128k(bootst
rap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) rw
rootfstype=jffs2
bootcmd=nand read 0x22000000 0xA0000 0x200000; bootm
bootdelay=3
baudrate=115200
ethact=macb0
ethaddr=02:03:04:85:06:07
filesize=15103C
fileaddr=21400000
ipaddr=150.10.4.35
serverip=150.10.4.43

6. After loading uImage in NAND FLASH when I use bootm to boot it; I
get the message : (I have inserted the entire output of bootm command, please scroll to see it)

"No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)"

I am surely missing the file system. How can I put the jffs2 file
system in NAND FLASH and at what location?
What commands at U-boot do
I use?

I cannot use nfs as I run Linux in VMware on windows host machine.

Thanks for all the help in advance.

***************************************************************
output when bootm command is given
****************************************************************
U-Boot> bootm 0x21400000
## Booting kernel from Legacy Image at 21400000 ...
Image Name: linux-2.6
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1380348 Bytes = 1.3 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
............................ done, booting the kernel.
Linux version 2.6.27 (root@ubuntu) (gcc version 4.2.0 20070413 (prerelease) (Cod
eSourcery Sourcery G++ Lite 2007q1-10)) #2 Mon Feb 16 18:10:44 EST 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9263-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 199 MHz, master 99 MHz, main 16.367 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock5 mtdparts=at91_nand
:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) rw
rootfstype=jffs2
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 62016KB available (2536K code, 198K data, 108K init)
Calibrating delay loop... 99.73 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 121
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: backlight control is not available
atmel_lcdfb atmel_lcdfb.0: 150KiB frame buffer at 23940000 (mapped at ffc00000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00700000 (mapped at c485c000), i
rq 26
atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfff8c000 (irq = 7) is a ATMEL_SERIAL
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 21 (02:03:04:85:06:07)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=ffffffff:00, irq=-
1)
Driver 'sd' needs updating - please use bus_type methods
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 29, io mem 0x00a00000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.27 ohci_hcd
usb usb1: SerialNumber: at91
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 4e:f8:1a:4a:7d:f1
usb0: HOST MAC d6:2d:c1:64:72:f1
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
mice: PS/2 mouse device common for all mice
ads7846 spi0.3: touchscreen, irq 31
input: ADS784x Touchscreen as /devices/platform/atmel_spi.0/spi0.3/input/input0
i2c /dev entries driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.17.
AC97C regs = FFFA0000
AC97C irq = 18
at91-ac97: codec write timeout
<4>at91-ac97: codec write timeout
<4>at91-ac97: codec write timeout
<4>at91-ac97: codec write timeout
<6>ALSA device list:
#0: Atmel AC97 Controller at 0xfffa0000, irq 18
TCP cubic registered
NET: Registered protocol family 17
List of all partitions:
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

*************************************************************


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Fri Feb 27, 2009 10:37 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
Looking at the kernel output, it looks like there is no NAND support and no MTD partitions. That is what you need to fix first. They are found under the Device Drivers-> Memory Technology devices-> NAND devices-> Support for NAND AT91. Also make sure MTD partitioning, command line partitioning, and direct char access are enabled as well.

_________________
Tim Barr
Multitech Inc.


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Sat Feb 28, 2009 2:42 am 
Offline

Joined: Wed Feb 25, 2009 9:37 pm
Posts: 8
Thanks for the reply. I enabled the NAND support and rebuilt the kernel. Further, I changed the bootargs like this:

bootargs mem=64M console=ttyS0,115200 root=mtd2 rw rootfstype=jffs2

Now while booting the kernel, at the end it shows:

VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 104K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.


It appears that the file system is mounted but it is not finding init. How do I fix this now???

Thanks in the advance my friend. Sorry for the spam.


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Sat Feb 28, 2009 9:01 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
Now check your file systems setting in the kernel. You may need to turn on compression support for JFFS2 files. I had a similar error because the mkfs.jffs2 program compresses the JFFS2 file by default. If you don't have compression enabled in the kernel, then the file won't mount properly.

_________________
Tim Barr
Multitech Inc.


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Tue Mar 03, 2009 5:33 pm 
Offline

Joined: Wed Feb 25, 2009 9:37 pm
Posts: 8
I have turned the compression options on, Still the same !!


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Wed Mar 04, 2009 1:59 pm 
Offline

Joined: Thu Jan 15, 2009 11:05 am
Posts: 12
hi,

bootargs should look like the following
mem=64M console=ttyS0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2

Note that the mtdblock device is used instead of the mtd.
Check the following links for information on how to mount the RFS from the u-boot.
http://www.denx.de/wiki/view/DULG/RootF ... FileSystem
viewtopic.php?f=12&t=5190&hilit=jffs2+boot+nand


Top
 Profile  
 
 Post subject: Re: Trouble mounting file system on AT91SAM9263-EK NAND Flash
PostPosted: Wed Mar 04, 2009 2:17 pm 
Offline

Joined: Thu Jan 15, 2009 11:05 am
Posts: 12
Hi again,

check the following links too... there you can get some information on how to install your JFFS2 into the nand flash

AT91SAM9260EK board and MTD_AT91_DATAFLASH ? http://www.at91.com/samphpbb/viewtopic.php?f=12&t=2963
Filesystem on NAND flash http://www.at91.com/samphpbb/viewtopic.php?f=12&t=3626
Bad Magic Number ..linux Kernel not booting with jffs2 http://www.at91.com/samphpbb/viewtopic.php?f=12&t=4753
Problem with creating jffs2 root file system http://www.at91.com/samphpbb/viewtopic.php?f=12&t=5145

but mainly the steps you need to follow are:
in your host (development)
1) create your JFFS2 RFS image
mkfs.jffs2 -e 0x20000 -s 0x800 -r /root/filesystem -o image.jffs2
2) transfer image.jffs2 to your target system

in your target system (AT91SAM)
3) erase the NAND partition you want to write to
flash_eraseall /dev/mtd0
4) write the JFFS2 image to the NAND partition (in this case the first partition mtd0).
nandwrite -p /dev/mtd0 image.jffs2

Also, a very good summary of the steps you need to follow for installing the RFS into a NAND partition can be found (outside AT91 website!):
http://linux.omap.com/pipermail/davinci ... 04133.html
although it is not a website related to our AT91 systems, the steps provided are quite the same as the ones you need.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 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: