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  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 6:53 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
Hi all,

The last week I finished to build my AT91SAM9260 based custom board. I have some problems and questions, I hope someone will have idea because I am blocked since 2-3 days.
My board is largely inspired from the AT91SAM9260-EK board.
The 3 majors differences are :
1) My 64MB SDRAM are two MT48LC32M8 chips, connected with 16 bits databus to the processor. On my board I need a lot of GPIO thus I need D16 to D31 to be GPIO
2) My Nand flash is a 512MB (4Gb) from ST (NAND04GW3B2DN6E). The ready/busy pin of the Nand is connected to PB16 and not PC13.
3) My ethernet Phy is a DP83848I from National, and the interrupt line is connected on PA22 (this phy has no ETXER, I don't know why).

On my board I want to reserve the Nand memory to store kernel image and rootfs, thus the bootstrap, uboot and uboot's environnement are stored in the dataflash, a AT45DB161 connected on NPCS1.

Here is what I done in the bootstrap sources :

- Modify the sdram init procedure to use a 16 bits bus and do not set D16-D32 as peripheral mode
- Change debug baudrate to 57600 bauds (I don't know why but my pcmcia/seriall adapter on my laptop don't work at 115200)

My modification works well I am able to load u-boot in SDRAM and execute him successfully, thus I have not problem with the bootstrap

Here is what I done in the uboot sources :

- Modify board/at91sam9260ek/nand.c to use PB16 and not PC13 as ready/busy input pin
- Modify include/configs/at91sam9260ek.h to say uboot environnement is in dataflash
- Modify AT91C_SPI_CS1_CLK in cpu/arm926ejs/at91sam926x/spi.c to have 5Mhz instead of 33Mhz, because my AT45DB161 was not found (This dataflash works at max 13Mhz), and change baudrate to 57600 bauds (I don't know why but my pcmcia/seriall adapter on my laptop don't work at 115200)
- Create a DP83848.c and DP83848.h to support my Phy. In fact I copied the dm9161a.c and dm9161a.h and I just modified names and the OUI value in the DP83848.h

My modications works well, nand flash is detected, dataflash is detected, and Phy is detected.
I can save uboot env successfully in dataflash. I can also successfully download kernel and image by tftp, but I found that the download speed is not very rapid. I download a 13MB rootfs image in 12-13sec, thus approx 1MB/s. Is it a normal download speed ? Someone can tell me the dowload speed of his board ?

Here is what I done in the linux kernel sources :

- First I installed official 2.6.25 kernel sources, and applied 2.6.25-at91.patch.gz patchs from linux4sam.org
- I done a make mrproper, and a make ARCH=arm at91sam9260ek_defconfig
- I compiled the kernel with a make ARCH=arm CROSS_COMPILE=arm-linux- , to see if everything was OK. The compilation was successfull.
- After I modified the kernel configuration (make ARCH=arm xconfig) to activate MTD and nand flash support with Hardware ECC, MTD partionning support, ext2 support, ext3 support, and jffs2 support.
- I changed the boot cmd line to : mem=64M console=ttyS0,57600 root=/dev/mtd1 rw
- I modified the arch/arm/mach-at91/board-sam9260ek.c file to change the nand ready/busy pin(PB16 in my case) and the PHY interrupt pin (PA22 in my case).

For now I don't put any root filesystem in the flash, the first thing I want to do is to verify that kernel boot correctly and see my nand flash.

Here is what I do :

U-Boot> nand erase

--> Reboot

U-Boot> nand bad
Device 0 bad blocks:
0d820000
0d860000

U-Boot> tftp 21000000 uImage
--> it's my compiled kernel, I done a mkimage on it.

U-Boot> bootm 21000000
--> kernel startup :

kernel in minicom wrote:
Uncompressing Linux................................................................................ done, booting the kernel.
Linux version 2.6.25 (nlc@nlcLaptop) (gcc version 3.4.3) #9 Fri Nov 28 14:21:36 CET 2008
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,57600 root=/dev/mtd1 rw
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: 62360KB available (2236K code, 159K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 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
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
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
ssc ssc.0: Atmel SSC device at 0xc4860000 (irq 14)
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:50:c2:43:b0:01)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:01, irq=-1)
Driver 'sd' needs updating - please use bus_type methods
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
AT91 NAND: 8-bit, <NULL> ECC
Scanning device for bad blocks
Bad eraseblock 1729 at 0x0d820000
Bad eraseblock 1731 at 0x0d860000
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x20000000 : "Partition 2"

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 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
i2c /dev entries driver
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
at91sam9_wdt: invalid timeout (must be between 1 and 16)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Cannot open root device "mtd1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
0104 8192 ram4 (driver?)
0105 8192 ram5 (driver?)
0106 8192 ram6 (driver?)
0107 8192 ram7 (driver?)
0108 8192 ram8 (driver?)
0109 8192 ram9 (driver?)
010a 8192 ram10 (driver?)
010b 8192 ram11 (driver?)
010c 8192 ram12 (driver?)
010d 8192 ram13 (driver?)
010e 8192 ram14 (driver?)
010f 8192 ram15 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


My nand flash is detected correctly. But I have a problem, the nand scan for bad block listing is very long, it takes more than 60sec !! uboot only takes 3-4sec to do that. Why scanning is very long and how reduce this time ?

Now I want to put a jffs2 file system in the nand flash but I have a big problem, every time I write something in the flash from uboot, the blocks are seen as bads a the next uboot restart or even in the kernel message when nand is scanned !!

Example :

uboot in minicom wrote:
U-Boot> nand bad

Device 0 bad blocks:
0d820000
0d860000

U-Boot> tftp 21000000 uImage
[...]
U-Boot> nand write 21000000 0 12d800

NAND write: device 0 offset 0x0, size 0x12d800
1234944 bytes written: OK


-->reboot

U-Boot> nand bad

uboot in minicom wrote:
Device 0 bad blocks:
00000000
00020000
00040000
00060000
00080000
000a0000
000c0000
000e0000
00100000
00120000
0d820000
0d860000


And if for exemple I do a nand erase clean, at the next uboot restart all blocks are marked as bad if I launch the "nand bad" command, or if I boot the linux kernel.

Any idea where the problem can come from ?
Sorry for my long message and my poor english :?

To resume my question :
- What is your dowload speed with tftp in uboot ?
- Why the bad block scanning is very long in linux (>60sec) compared to uboot (only 3-4sec)
- Why blocks are considered bad at next startup when I write into it with uboot (and ther is no write error !)

Regards


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 7:14 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
I just tried to load my rootfs.jffs2 image with samba. After that, u-boot doesn't see that blocks are bads.
Thus I have a problem with the uboot write function. It tells the write in nand flash is OK but it mark block as bad, how it is possible !!??

Because with samba I have a valid jffs2 filesystem in nand flash at offset 0x40000 (mtd1), I try to boot linux :

Quote:
Linux version 2.6.25 (nlc@nlcLaptop) (gcc version 3.4.3) #9 Fri Nov 28 14:21:36 CET 2008
[...]
Kernel command line: mem=64M console=ttyS0,57600 root=/dev/mtd1 rw
[...]
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[...]
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
AT91 NAND: 8-bit, <NULL> ECC
Scanning device for bad blocks
Bad eraseblock 1729 at 0x0d820000
Bad eraseblock 1731 at 0x0d860000
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x20000000 : "Partition 2"
[...]
VFS: Cannot open root device "mtd1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
0104 8192 ram4 (driver?)
0105 8192 ram5 (driver?)
0106 8192 ram6 (driver?)
0107 8192 ram7 (driver?)
0108 8192 ram8 (driver?)
0109 8192 ram9 (driver?)
010a 8192 ram10 (driver?)
010b 8192 ram11 (driver?)
010c 8192 ram12 (driver?)
010d 8192 ram13 (driver?)
010e 8192 ram14 (driver?)
010f 8192 ram15 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


Anyone knows why the kernel is unable to mount the mtd1 partition ?
Regards


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 7:42 pm 
Offline

Joined: Fri Nov 28, 2008 3:41 pm
Posts: 22
Location: Argentina
Hi nlc.
* We also make a custom board for the AT91SAM9260 but with minor differences respect the EK. The version of u-boot that we are using is 1.3.0 with support for the DP83848 (please see mi post in the thread "U-Boot ethernet phy DP83848 support").
* For the question about the tftp speed, in my board I get the same speed as you: 13Mb in 13/15 seconds.
* At first we have problems with the nand flash. u-boot and linux kernel don't read the nand ID right, so I have to edit the code of u-boot in file nand_base.c, function nand_scan, and add a reset command before the read_id command. This solve our problem with the nand.
* Using the angstrom rootfs the nand are working well. With the buildroot version I had problems with blocks size of the jffs2 image, etc, so for now I'm using a usb key to mount the filesystem. If you can do that may be a good way to make progress until the nand still with problems.
* Also you can put the rootfs in a mmc/sd card or mount the fs via nfs, but I don't try these options yet.

I hope this may help you. Sorry for my poor english too!


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 7:50 pm 
Offline

Joined: Fri Nov 28, 2008 3:41 pm
Posts: 22
Location: Argentina
For the angstrom demo the kernel command line arguments are:
mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2

Note the use of mtdblock1 instead mtd1. Try with this change maybe help.


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 7:58 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
Thank you for the download rate mesurement :)
I will pass on uboot 1.3.0 when all my problem will be solved, because for now it's OK with DP83848.

For the nand ID or nand detection, uboot/linux has always detected it correctly.

With samba I loaded the angstrom filesystem in the nand (because uboot nand write problems...), but I my linux kernel doesn't want to see it :cry:

The kernel correctly detect the nand and partitions :

kernel wrote:
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 1729 at 0x0d820000
Bad eraseblock 1731 at 0x0d860000
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x20000000 : "Partition 2"


But it's as is the kernel doesn't have created the /dev/mtdblockX devices, because they are not listed as available partition :

kernel wrote:
VFS: Cannot open root device "mtdblock1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
0104 8192 ram4 (driver?)
0105 8192 ram5 (driver?)
0106 8192 ram6 (driver?)
0107 8192 ram7 (driver?)
0108 8192 ram8 (driver?)
0109 8192 ram9 (driver?)
010a 8192 ram10 (driver?)
010b 8192 ram11 (driver?)
010c 8192 ram12 (driver?)
010d 8192 ram13 (driver?)
010e 8192 ram14 (driver?)
010f 8192 ram15 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 7:59 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
gasty wrote:
For the angstrom demo the kernel command line arguments are:
mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2

Note the use of mtdblock1 instead mtd1. Try with this change maybe help.


Yes I tested too (mtdblock1 / rootfstype option), same result :cry:


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 8:06 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
And what is your nand size and how many time takes your bad block scanning in kernel startup ?


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Fri Nov 28, 2008 8:39 pm 
Offline

Joined: Fri Nov 28, 2008 3:41 pm
Posts: 22
Location: Argentina
The nand in my board is MT29F8G08MAAWC, 8gbits (1Gbyte), 8 bits data width.
My jffs2 image generated with buildroot don't work, but I don't try changing the jffs2 parameters (block size, etc) yet. With the linux4sam demo all is ok. The boot completes in one minute, but the bad blocks scanning its not so long.


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Sat Nov 29, 2008 1:28 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
I will try to find the explanations because I don't understand why linux scanning takes 60sec to scan 4096 block and u-boot takes 3-4 sec !!


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Sat Nov 29, 2008 3:12 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
gastu, I tried the uboot 1.3.0 you have used too (I used your link).

it's OK for DP83848, but another kind of problem appear with my nand flash :shock:
Now my nand isn't detected correctly :

Quote:
U-Boot 1.3.0 (Nov 29 2008 - 14:01:26)

DRAM: 64 MB
NAND: NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (<NULL> NAND 512MiB 3,3V 8-bit)
NAND: Pagesize: 512, Blocksize: 16K, OOBsize: 16
512 MiB

DataFlash:AT45DB161
Nb pages: 4096
Page Size: 528
Size= 2162688 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D0003FFF (RO)
Area 1: D0004000 to D0007FFF
Area 2: D0008000 to D0037FFF (RO)
Area 3: D0038000 to D020FFFF
In: serial
Out: serial
Err: serial
In dp83848 Reset Phy
MAC: DP83848 device detected
MAC: 100 Mbps, Half Duplex
MAC: End of Autonegociation
MAC: Addres set to 01B043C25000


Chip IDs are correctly read (0x20 and 0xDC), but not correctly associated with the manufacturer "ST Micro" as before. And pagesize / blocksize / OOBsize are wrong (must be 2048 / 128K / 64) !

I try to locate the problem....


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Sat Nov 29, 2008 3:46 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
Ok I have u-boot working with nand flash.

In drivers/nand/nand_ids.c there is 2 Nand device with the same device ID :

{"NAND 512MiB 3,3V 8-bit", 0xDC, 512, 512, 0x4000, 0},
{"NAND 512MiB 3,3V 8-bit", 0xDC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | AND_NO_AUTOINCR},

When uboot scan the table it stop on the first....where page size and block size are hard coded in the table.
I commented the first one, and now uboot detect correctly the nand because page size is not hardcoded in the table and uboot reads another register in the nand to get the informations :

Quote:
NAND: NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (<NULL> NAND 512MiB 3,3V 8-bit)
NAND: Pagesize: 2048, Blocksize: 128K, OOBsize: 64
512 MiB


Now write to the Nand from uboot works, after a reboot blocks where uboot has wrote something are not considered bads 8)

I don't know why the manufacturer Name doesn't appear, bur for now it's not really important :D


Now I need to undestrand why linux doesn't create my mtdblocks device :? Surelly a kernel option but I don't see that option


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Sat Nov 29, 2008 6:42 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
OK I found why bad block scanning was very long during kernel start.

In fact I done a mistake when I modified my rdy_pin in the arch/arm/mach-at91/board-sam9260ek.c file :lol:

Thus the ready pin was always at low level and thus in this case the the function nand_wait_ready() in driver/mtd/nand_base.c in limited to 2 "jiffies", thus 20ms.....

Now I configured correctly my rdy_pin and the bad block scanning takes (looked on the scope)......200ms !!!

Next step have kernel able to create mtdblock devices.... :?


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Sat Nov 29, 2008 7:25 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
I progress !
Now it's OK mtdblock devices are created and my mtdblock1 is successfully mounted. It contains a Angstrom jffs2 root filesystem. The secret was to activate the "Caching block device access to MTD device" option....

But problem, I have no console nor messages :

Quote:
Linux version 2.6.25 (nlc@nlcLaptop) (gcc version 3.4.3) #54 Sat Nov 29 17:58:11 CET 2008
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[...]
NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 1729 at 0x0d820000
Bad eraseblock 1731 at 0x0d860000
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x20000000 : "Partition 2"
[...]
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 96K


After that, that all, no console ? :?
Curiously the board is not died because I have echo characters on minicom !!


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Mon Dec 01, 2008 1:38 pm 
Offline

Joined: Mon Jul 07, 2008 6:16 pm
Posts: 53
Location: France
gasty wrote:
The nand in my board is MT29F8G08MAAWC, 8gbits (1Gbyte), 8 bits data width.
My jffs2 image generated with buildroot don't work, but I don't try changing the jffs2 parameters (block size, etc) yet. With the linux4sam demo all is ok. The boot completes in one minute, but the bad blocks scanning its not so long.


Hi gasty,

Now I have exactly the same problem. I successfully finished an entire buildroot process, but the jffs2 image doesn't work. I tryed with my kernel 2.6.25 built alone or with the buildroot kernel (2.6.24-4), and result is the same, the kernel can't mount the filesystem :

Quote:
mtd->read(0x400 bytes from 0x0) returned ECC error
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0xa0a0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0xa0a0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xa4a0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0xffbf instead
mtd->read(0x1ff80 bytes from 0x80) returned ECC error
Empty flash at 0x00000010 ends at 0x000000b0
Dirent at 000007dc has zeroes in name. Truncating to 0 chars
jffs2_scan_dirent_node(): Name CRC failed on node at 0x000007dc: Read 0xa0a0a0a0, calculated 0x75cc1fcb
Name for which CRC failed is (now) '', ino #18
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000808: 0x5600 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000810: 0x0600 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000814: 0xc400 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000818: 0x48b5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000081c: 0x7810 instead
[........]


Top
 Profile  
 
 Post subject: Re: Questions / problems with custom board and AT91SAM9260
PostPosted: Mon Dec 01, 2008 2:33 pm 
Offline

Joined: Fri Nov 28, 2008 3:41 pm
Posts: 22
Location: Argentina
Hi nlc.
I think the problem of magic bitmask 0x1985 are related to the parameters that buildroot passes to the mkimage program to generate the jffs2 image. These parameters are given by default for the nand in the at91sam9260ek. See in the .config file for buildroot:

BR2_TARGET_ROOTFS_JFFS2_PAGESIZE=0x420 (1024+32 bytes)
BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x2100 (128K + 4K bytes=0x21000. One '0' less?)

The values for my nand are:
BR2_TARGET_ROOTFS_JFFS2_PAGESIZE=0x840 (2048+64 bytes)
BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x4400 (256K+8K bytes=0x44000)

See your nand specs.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

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: