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: AT91SAM9260 and YFFS2 file system
PostPosted: Tue Feb 28, 2012 2:57 pm 
Offline

Joined: Sun Dec 25, 2011 2:00 pm
Posts: 58
Hi to all,
Does any one build kernel and RFS in YAFFS2 file system?
I change the configuration of kernel and built it for supporting the YAFFS2.
Also make an YAFFS2 RootFileSystem image.
But I have kernel panic error.
My error is in the following lines.

Do you know the reason of this problem?

Quote:
NAND read: device 0 offset 0x200000, size 0x1a3f14
1720084 bytes read: OK
## Booting kernel from Legacy Image at 22200000 ...
Image Name: Linux-2.6.30
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1720020 Bytes = 1.6 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.30 (corewind @ CoreWind) (gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #1 Mon Feb 27 22:33:56 IRST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=yaffs2 init=/linuxrc
NR_IRQS:192
AT91: 96 gpio irqs in 3 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: 61316KB available (3156K code, 264K data, 120K init, 0K highmem)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 444 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
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) Â? 2001-2006 Red Hat, Inc.
yaffs Feb 27 2012 22:30:32 Installing.
msgmni has been set to 119
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.0: Atmel SSC device at 0xc4878000 (irq 14)
Driver 'sd' needs updating - please use bus_type methods
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (3a:1f:34:08:54:54)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 580 at 0x000004880000
Bad eraseblock 805 at 0x0000064a0000
Bad eraseblock 895 at 0x000006fe0000
Bad eraseblock 1090 at 0x000008840000
3 cmdlinepart partitions found on MTD device atmel_nand
Creating 3 MTD partitions on "atmel_nand":
0x000000000000-0x000000400000 : "bootstrap/uboot/kernel"
0x000000400000-0x000004000000 : "rootfs"
0x000004000000-0x000010000000 : "data"
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
i2c /dev entries driver
at24 0-0050: 65536 byte 24c512 EEPROM (writable)
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
AT91SAM9 Watchdog: sorry, watchdog is disabled
at91_wdt: probe of at91_wdt failed with error -5
Registered led device: ds5
Registered led device: ds1
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem) on device 31:1.
Freeing init memory: 120K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Backtrace:
[<c002ac24>] (dump_backtrace+0x0/0x110) from [<c002b0c4>] (dump_stack+0x18/0x1c)
r6:00000000 r5:c0021ae8 r4:c0362140
[<c002b0ac>] (dump_stack+0x0/0x1c) from [<c003c9c4>] (panic+0x4c/0x114)
[<c003c978>] (panic+0x0/0x114) from [<c00264e4>] (init_post+0xd0/0xf8)
r3:c3805e24 r2:0000000a r1:00000009 r0:c02ee35c
[<c0026414>] (init_post+0x0/0xf8) from [<c0008784>] (kernel_init+0xb4/0xd8)
r4:c0361e80
[<c00086d0>] (kernel_init+0x0/0xd8) from [<c003f58c>] (do_exit+0x0/0x5a4)
r5:00000000 r4:00000000



My RFS has error? Kernel has error? or uboot environment has error?

U-boot environment is here:

Code:
    "ethaddr=3a:1f:34:08:54:54" \
    "bootdelay=3" \
    "baudrate=115200" \
    "stdin=serial" \
    "stdout=serial" \
    "stderr=serial" \
   "bootargs=mem=64M console=ttyS6,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=yaffs2" \
    "bootcmd=nand read $kernelLoadAddr $kernelUbootAddr $kernelSize; bootm $kernelLoadAddr"



also I add this parameter to bootarf ("init=/bin/sh or init=/linuxrc or init=/sbin/init and ..."), but I have error yet.

Help me plz.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Tue Feb 28, 2012 8:31 pm 
Offline

Joined: Mon Feb 20, 2012 12:55 pm
Posts: 8
We use YAFFS2 partition as rootfs...
Seems, your partition have been mounted succesfully, but image is wrong.
How you build your rootfs image for YAFFS2?
We made rootfs partition on the target: we boot linux with initrd rootfs, erase partition for rootfs (using flasheraseall utility), then mount clear partition and simply copy all root filesystem (/) to the mounted partition.
Then you can use YAFFS2 roootfs.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Tue Feb 28, 2012 9:03 pm 
Offline

Joined: Sun Dec 25, 2011 2:00 pm
Posts: 58
Thank you.

I use the busybox. After building the busybox I use the "mkyaffs2image" and make an yaffs2 image for RFS.
Then I use the sam-ba for uploading image to the nand flash.
I don't know that I could answer to your question or no.

I don't know the reason of this error.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Wed Feb 29, 2012 7:30 am 
Offline

Joined: Mon Feb 20, 2012 12:55 pm
Posts: 8
I can't say anything about mkyaffs2image, because didn't use it.
I recommend that you first of all check your rootfs making initrd image and booting linux with it. If it will work - make the yaffs image from it.
Rootfs may not work, if the busybox was build without flag --static or if there are no symbolic link /linuxrc on it.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Wed Feb 29, 2012 7:58 am 
Offline

Joined: Sun Dec 25, 2011 2:00 pm
Posts: 58
Ok, but I don't know how can I make rootfs with initrd. Can you help me for making?


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Wed Feb 29, 2012 10:07 pm 
Offline

Joined: Mon Feb 20, 2012 12:55 pm
Posts: 8
You can take as a basis the rootfs image from BSP of the evaluation kit. This image is an filesystem in file (EXT2), archived using gzip.
So, get rootfs from BSP, unzip it:
Code:
gunzip -c rootfs.gz > rootfs

Then you can mount uncompressed file to some dir:
Code:
mount -o loop rootfs /mnt

After mounting replace or add all the files that you need, for example busybox... Then you need to do everything in reverse order:
Code:
umount /mnt
gzip -c -9 rootfs > rootfs.gz


If you want to create a completely your own rootfs, this link will be usefull - http://siso.sourceforge.net/kernel-rootfs.html. But I think the modification will be easier.


Top
 Profile  
 
 Post subject: Re: AT91SAM9260 and YFFS2 file system
PostPosted: Sat Mar 03, 2012 7:07 am 
Offline

Joined: Sun Dec 25, 2011 2:00 pm
Posts: 58
Thank you for your reply.

I'm using SAM-BA atmel for uploading RFS image to the NAND Flash.
I think SAM-BA Atmel has a problem with YAFFS2 filesystem.

Because when I make a JFFS2 image I could upload and boot my board without any error, but when I changed my FileSytem to the Yaffs2 I have kernel panic error.

Do you have any idea?


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: Google [Bot] and 0 guests


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: