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  [ 8 posts ] 
Author Message
 Post subject: AT91SAM9263EK and Linux4Sam fs problem
PostPosted: Wed Apr 02, 2008 9:18 am 
Offline

Joined: Wed Apr 02, 2008 9:03 am
Posts: 35
Hi,

I couldn't find any post about this my problems. Lots of other problems though.

I have AT91SAM9263EK and I've been trying to install Linux4Sam on it. I get the U-boot and Kernel boot just fine, but the problem is that I cannot get the kernel find my root filesystem properly. It seems that there are something missing in Linux4Sam pages or I just cannot find it.

I have tried several different root filesystems. Mostly I have tried to get to work the Angstrom-x11-image-demo-glibc.rootfs.jffs2 found from Linux4Sam page as prebuild image. I have also tried the prebuild kernel, but I couldn't find what U-boot environment variables I should use. The filesystem is loaded to NAND to address 0x0

So, I tried with and without the following:
setenv bootargs mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2 init=/bin/sh

With this the kernel boots up and then there are lots of jffs2 and mtd related errors and then the kernel panics saying can't find init. If I try /dev/mtdblock1 instead the kernel says the filesystem is mounted ok, but complains about missing console and panics saying can't find init.

I also tried to rebuild kernel from the scracht with instructions in Linux4Sam and I was able to build it and it even booted, but end result was the same.

Kernel founds NAND, but I'm thinking that the MTD configuration isn't quite right.

Code:
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 789 at 0x062a0000
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x04000000 : "Partition 1"
0x04000000-0x10000000 : "Partition 2"


There are no devices assigned to MTD partitions and I wasn't able to get working MTD configuration in bootargs.

Could someone show me the whole u-boot environment that is needed to get kernel boot up properly, but I think there are something missing in Linux4Sam site. Or if you have any other suggestion what to do, they are welcome.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 2:04 pm 
Offline

Joined: Thu Feb 28, 2008 5:37 am
Posts: 65
hai maddis,

I am a newbie and I havn't even compiled Angstrom Linux.
I just installed and ran the "Angstrom-x11-image-demo-glibc-at91.rootfs.jffs2" demo on AT91SAM9263EK.

If you are intrested only in running Angstrom you can download the
"softpack-1.2-at91sam9263-ek-web" package from the ATMEL site
It contains many demo projects.

you will find the Linux archive in /html/demo folder
and the installation instructions in /html/Linux4SAM

just follow the mentioned procedure and you will have a running linux.

cheers,
Devendra


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 9:13 am 
Offline

Joined: Wed Apr 02, 2008 9:03 am
Posts: 35
Hi,

Thanks for the tip. I downloaded the demo from Atmel site. I had to modify the .tcl file first to get it even working. The NAND:EraseAll wasn't working so I replaced it with NAND:EraseSectorTest like it was on the demo that came with the board.

After that the programming went ok. After I booted the board the result were same though. Long list of jffs2 errors and then kernel panic and the reason was 'init not found'. So the result was the same like before.

I tried to erase the NAND with Sam-ba before running the script that programs the demo there, but that didn't make any difference. Demo programming log doesn't show any errors so it should be ok.

Only system so far that I've been able to get to boot successfully is the demo that came with the board. I'm starting to think it's the _only_ linux that will work with the board. :roll:

So, if you have more ideas I'm listening.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 4:41 pm 
Offline

Joined: Thu Jul 12, 2007 9:40 pm
Posts: 9
Location: michigan, usa
Hi

I have found that all is dependent on the ISP version. The latest version of SAM-ba 2.7 dll has no EraseSectorTest. I can boot the first time all the way to the touch screen alignment screen and then the x-11 dies. I go back to my console screen and there is an Angstrom banner and a login. I have no idea what the login ID or password are. I am using a 4 meg dataFlash and the latest
revisions from the Atmel web site. On a reboot a get numerous ECC errors but ECC is disabled. I do not get a panic. Which versions are you using?

I have figured out the console. At the end of the all of the errors you can <cr> a couple of times and get a login. Login as root and no password.

And both the 2007/09 and the 2008/04 versions produce the same result. The gui hangs at the set time applet and the jffs2 spues crc and ecc errors.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 25, 2008 5:13 pm 
Offline

Joined: Fri Apr 25, 2008 4:30 pm
Posts: 6
Had the same problem last night (first day with AT91SAM9263-EK board).

Make sure you have the latest ISP tool from Atmel (I see you said you have V2.7 and that is what I'm using now earlier version gave long list of CRC errors ending in a Kernel-Panic!)

Instead of using the Tcl script, I went through and installed each component myself:

In SAM-BA

1. Init the dataflash
2. Erase All Dataflash
3. SendBoot dataflash_at91sam9263ek.bin
4. SendFile 0x4000 tmp.bin (UBOOT Env Variables)
5. SendFile 0x8000 u-boot-1.1.5_atmel_1.6_at91sam9263ek
6. SendFile 0x40000 linux-2.6.24-at91sam9263ek.bin
7. Init NandFlash
8. Erase NandFlash
9. SendFile 0x0 Angstrom-x11-image-demo-glibc-at91.rootfs.jffs2

Exit SAM-BA and disconnect USB port
Connect Terminal
Reset

This worked for me!
Takes awhile to boot (there is alot to load)

Good Luck,

Joe

Edited (left out a step!!!)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 7:51 am 
Offline

Joined: Wed Apr 02, 2008 9:03 am
Posts: 35
Hi,

Thanks for the tip about version! I had rather old version. Sam-ba was 2.3. I upgraded it to latest version (2.7) and now the Anstrom system boots up just fine!


Top
 Profile  
 
 Post subject: I wish I knew what I am doing wrong
PostPosted: Wed Apr 30, 2008 3:52 pm 
Offline

Joined: Thu Jul 12, 2007 9:40 pm
Posts: 9
Location: michigan, usa
I have a sam9263-ek rev b with an atmel 4meg dataflash, isp 1.11, sam-ba 2.7 and the 200709 & 200804 Linux demos from linux4sam. I have used both the tcl script and the manual method to load the demo, all to no avail. I have done a file to memory compare for each file. Before I reboot all files except the dataflash_at91sam9263-ek.bin compare. The miscompare seems obvious to me. I have saved all of the screens. Here are the errors I get on the 2.6.24 200804 version:
1. rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
It is posted as a problem on the kerneltrap website.

2. Driver 'sd' needs updating - please use bus_type methods

3. Configuring gnome-vfs
mtd->read(0x44 bytes from 0x3546e90) returned ECC error
mtd->read(0x44 bytes from 0x3550700) returned ECC error
mtd->read(0x44 bytes from 0x3554f68) returned ECC error
mtd->read(0x44 bytes from 0x35256a8) returned ECC error
Node CRC d0edee29 != calculated CRC 526537c3 for node at 035256a8
kernel BUG at fs/jffs2/file.c:251!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c3de8000
[00000000] *pgd=23f52031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.24 #4)
PC is at __bug+0x20/0x2c
LR is at release_console_sem+0x1cc/0x1e8
pc : [<c002afc8>] lr : [<c003cae4>] psr: 60000013
sp : c3f45cc0 ip : 00000000 fp : c3f45ccc
r10: c3f45d78 r9 : 00000000 r8 : 00004000
r7 : c0365b00 r6 : c38b2a80 r5 : 000004d2 r4 : 000004d2
r3 : 00000000 r2 : c02e8630 r1 : 0000156a r0 : 00000026
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 23de8000 DAC: 00000015
Process gconftool-2 (pid: 1511, stack limit = 0xc3f44268)
Stack: (0xc3f45cc0 to 0xc3f46000)
5cc0: c3f45d2c c3f45cd0 c00ed4f4 c002afb8 00003000 00001000 c3f45cfc 00000000
5ce0: 00004000 00000000 00004000 00000000 000004d2 c3d84600 00004000 00000000
5d00: 000004d2 000004d2 000004d2 c3f44000 00000000 00004000 00000000 c3f45d78
5d20: c3f45dbc c3f45d30 c0063120 c00ed4bc 000004d2 000004d2 c0365b00 c0093890
5d40: c38b2b18 c3f45e90 c3ebd520 c38b2b18 c0250e78 c38b2a80 00000000 00001000
5d60: 00000000 c0250e78 00000039 3510b57e 03524fe4 c3f45d90 c3f45f20 00000001
5d80: 00000000 000004d2 c0093890 c0365b00 00000039 c38b2aec c38b2a80 00004000
5da0: 00000000 c38b2a80 00000000 000004d2 c3f45e44 c3f45dc0 c00639dc c0062fa0
5dc0: 00004000 00000000 c3f45ee0 000004d2 00000000 00000000 00000002 c3f45ee0
5de0: c3f45f20 c3f45e90 001200d2 c02eff8c c3ebd520 c38b2b18 00000000 00000001
5e00: c3f45e64 c3f45e10 c0067428 c00665fc 00000000 000004d2 c02eff90 c38b2aec
5e20: c38b2a80 c3f45e90 c3f45f20 00004000 00000000 00000001 c3f45e84 c3f45e48
5e40: c0063aa4 c00635cc c3f45e74 c3f45e58 c3ebd520 c38b2b18 c3c5b6a0 c3f45e90
5e60: c3ebd520 c3f45e90 c3f45f20 c3f45f78 c3f44000 fffffdee c3f45f4c c3f45e88
5e80: c007f3f4 c0063a3c 00004000 00000000 c0038258 00000001 00000000 00000001
5ea0: ffffffff c3ebd520 00000000 00000000 00000000 00000000 c3c5b6a0 c38b0798
5ec0: 00000000 00000000 c3f45eec c3c5b6a0 c0050468 c3f45ed4 c3f45ed4 c0308a84
5ee0: 00004000 00000000 c0090828 c0090318 c3f45f1c c3f45f00 c004d94c 000004d2
5f00: c004526c c02e9a20 c0308a84 c03077a0 c3f45f44 00000000 00000000 c38b2b7c
5f20: 4001b000 000004d2 c3ebd520 4001b000 c3f45f78 000004d2 c0026f88 00000000
5f40: c3f45f74 c3f45f50 c007fce0 c007f348 00000000 c3f45f60 00004000 00000000
5f60: c3ebd520 00000004 c3f45fa4 c3f45f78 c00802ac c007fc38 00004000 00000000
5f80: c3f45fac 00000000 fefff000 002ac800 000004d2 4001b000 00000000 c3f45fa8
5fa0: c0026de0 c0080278 002ac800 000004d2 00000003 4001b000 000004d2 00000000
5fc0: 002ac800 000004d2 4001b000 00000004 000004d2 00059a38 4044f000 00000001
5fe0: 00000004 bea997d8 403a5cdc 403e95ac 60000010 00000003 00000000 00000000
Backtrace:
[<c002afa8>] (__bug+0x0/0x2c) from [<c00ed4f4>] (jffs2_write_end+0x48/0x2ec)
[<c00ed4ac>] (jffs2_write_end+0x0/0x2ec) from [<c0063120>] (generic_file_buffered_write+0x190/0x62c)
[<c0062f90>] (generic_file_buffered_write+0x0/0x62c) from [<c00639dc>] (__generic_file_aio_write_nolock+0x420/0x470)
[<c00635bc>] (__generic_file_aio_write_nolock+0x0/0x470) from [<c0063aa4>] (generic_file_aio_write+0x78/0xf4)
[<c0063a2c>] (generic_file_aio_write+0x0/0xf4) from [<c007f3f4>] (do_sync_write+0xbc/0x10c)
[<c007f338>] (do_sync_write+0x0/0x10c) from [<c007fce0>] (vfs_write+0xb8/0x148)
[<c007fc28>] (vfs_write+0x0/0x148) from [<c00802ac>] (sys_write+0x44/0x70)
r7:00000004 r6:c3ebd520 r5:00000000 r4:00004000
[<c0080268>] (sys_write+0x0/0x70) from [<c0026de0>] (ret_fast_syscall+0x0/0x2c)
r6:4001b000 r5:000004d2 r4:002ac800
Code: e1a01000 e59f000c eb004874 e3a03000 (e5833000)
---[ end trace d510b2d5227e0aa1 ]---
Segmentation fault
jffs2_flush_wbuf(): Write failed with -5
mtd->read(0x44 bytes from 0x3501748) returned ECC error
mtd->read(0x44 bytes from 0x3505640) returned ECC error
This is also posted as a problem on the kerneltrap website.

So:
do I have a bad board/nand flash -- other seem to have no problems

The 200709 2.6.22 versions boots to the demo gui screen but goes to the set clock which fails because the touch screen alignment values are hosed due to ecc errors reading and writing. This is why I suspect eithe ther on-board ecc system is not set up correctly or it is bad. Or the nand fash is flakey.
The errors appear to just be eec failures on read and writes.
What can I do to fix this? Preferably the 2.6.24 version.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 22, 2008 8:33 am 
Offline

Joined: Tue May 13, 2008 4:01 am
Posts: 4
I've had the same problems.

I've got a few boards. Some appear to work better than others, which tends to indicate flaky hardware, or hardware that's not properly configured.

I've tried the mtd-utils:
./flash_eraseall -j /dev/mtd0 //start with clean NAND flash
./nandtest -p 1 /dev/mtd0 //This produces heaps of errors.
./flash_eraseall -j /dev/mtd0 //clean again
nandwrite -a -p /dev/mtd0 /boot/uImage //write some data to MTD
nanddump -f text.out -l 0x260000 -s 0 /dev/mtd0 //try to read it back - fails.

I've asked for help on the MTD developers list, but haven't heard back yet.

The Timesys solution uses a CRAMFS I think, that means the NAND is effectively read only, so the problem may not manifest that way.


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