olimex sam9l9260 board - restore factory settings

I’m trying to restore factory settings for Olimex sam9 L9260 board as per instructions in the http://www.olimex.com/dev/pdf/ARM/ATMEL/SAM9-L9260.pdf file but with no success. It seems that AT91SAM9260_demo_linux_NandFlash.tcl has some issues. I run AT91SAM9260_demo_linux_NandFlash.bat and almost instantenously I get log file with results. I doubt that script did anything. I copied the NANDFLASH.tcl to the proper location and manipulated jumpers as suggested.

Could someone suggest how to resolve this situation and restore original bootloader and linux kernel.

Many Thanks,

george

Hi,

I had the same problem. The solution is very simple - just copy all directory contains AT91SAM9260_demo_linux_NandFlash.bat to HDD. Then run it from HDD.

I have a similar problem.

I just got my SAM9-L9260 board and started it. Unfortunately there were some errors during startup. As I’m new to embedded Linux, I didn’t know what those error messages stand for.

That’s why I got the SAM9-L9260 development board user manual, as mentioned in the message above and followed the instructions for restoring the default bootloader and kernel.

Executing AT91SAM9260_demo_linux_NandFlash.bat ends with log content:

-I- Waiting …

connection : \usb\ARM0

board : AT91SAM9260-EK

target(handle) : 17621272

read chip ID : 0x019803A1 at addr: 0xFFFFF240

-I- Found processor : AT91SAM9260 (0x019803A0)

script file : AT91SAM9260_demo_linux_NandFlash.tcl

u-boot file: u-boot-env-nf.bin

diskSize: 0x00400000

-I- === Performs sanity checks===

-I- === Initialize the NAND access ===

-I- Enable the address range of CS3 in HMATRIX user interface

-I- Configure SMC CS3

-I- Clock PIOC

-I- Configure Ready/Busy signal

-I- Configure pull-up

-I- Enable NandFlash

-I- ReadId

-I- NandFlash ID : 0xecdc

-I- NandFlash Samsung 8 bits 512MB

-I- Configure ECC

-I- === Erase all the NAND flash blocs and test the erasing ===

-I- Erasing whole NandFlash … Please Wait…

-I- NandFlash erased

-I- === Load the bootstrap: nandflash_at91sam9260ek in the first sector ===

-I- Send File ./nandflash_at91sam9260ek.bin at address 0x00000000

-I- NANDFLASH::sendFile

-I- File size = 3940 byte(s)

-I- Blocks 0 to 1 are programmed

-I- Number of bad blocks: 0

-I- === Load the u-boot in the next sectors ===

-I- Send File ./u-boot-env-nf.bin at address 0x00020000

-I- NANDFLASH::sendFile

-I- File size = 168780 byte(s)

-I- Blocks 1 to 3 are programmed

-I- Number of bad blocks: 0

-I- === Load the u-boot environment variables ===

-I- Send File tmp.bin at address 0x00060000

-I- NANDFLASH::sendFile

-I- File size = 131072 byte(s)

-I- Blocks 3 to 4 are programmed

-I- Number of bad blocks: 0

-I- === Load the Kernel image ===

-I- Send File uimage_write at address 0x00100000

-I- NANDFLASH::sendFile

-I- File size = 1714216 byte(s)

-I- Blocks 8 to 22 are programmed

-I- Number of bad blocks: 0

-I- === Load the linux file system ===

-I- Send File armv5l-uclibc-sam9260 at address 0x00400000

-I- NANDFLASH::sendFile

-I- File size = 4194304 byte(s)

-I- Blocks 32 to 64 are programmed

-I- Number of bad blocks: 0

When I reset the board the controller seems to hang while uncompressing the linux.

The output in the terminal is as follows:

AT91Bootstrap loading from 0x8400…

U-Boot 1.2.0 (Oct 11 2007 - 14:36:20)

DRAM: 64 MB

NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)

512 MiB

In: serial

Out: serial

Err: serial

KS8721 PHY Detected

No link

MAC: error during RMII initialization

Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x1a2828

1714216 bytes read: OK

Booting image at 21500000 …

Image Name: Linux-2.6.23

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 1714152 Bytes = 1.6 MB

Load Address: 20008000

Entry Point: 20008000

Verifying Checksum … OK

OK

Starting kernel …

Uncompressing Linux…

Does anybody have an idea what is going wrong?

Is a root filesystem necessary to uncompress the linux?

Just copy the linux file system provided on the CD to a flash stick and change the u-boot parameters

setenv bootargs mem=64M console=ttyS0,115200

root=/dev/sda1 rootdelay=10

If you have managed to get NFS working in a similar fashion please let me know!

I have a same problem on restoring NAND FLash on SAM9 L9260. I’ve used the AT91SAM9260_demo_linux_NandFlash.tcl and AT91SAM9260_demo_linux_NandFlash.bat like described in manuel but the AT91SAM9260_demo_linux_NandFlash.tcl seems to be not adapted to configure the L9260.

And on the CD received with L9260 board there is just the Olimex-GCCFD.exe.

Anyone can send me the NANDFLASH.tcl ?

Thanks a lot

Hi,

I had a few issues with this but they are surmountable-

You need to make sure the USB driver is correctly installed- have you checked that you can see the board with the ISP programmer? If you open that up and select AT91SAM9-9260EK , connect then you will see some of the memory values.

If this works then runningAT91SAM9260_demo_linux_NandFlash.bat will work- you need to make sure that you are running from a writable location (i.e not a CDROM) as it puts an output to file and obviously check the jumpers are correct as described in the Olimex manual.

A useful thing to do is to upgrade the kernel to 2.6.26 (use kernel.org and maxim.org.za to get the correct sources). This has meant that system time is kept ans has introduced the RTC device for AT91SAM- I am very much happier with the new kernel.

Hi,

I can see the board via ISP programmer. The AT91SAM9260_demo_linux_NandFlash.bat works also but when I reset my board, I always see >ROMBoot.

When I compare the log with your logs, they’re quite different. I think the tcl file is different also. I have just the AT91SAM9260_demo_linux_NandFlash.tcl for the Atmel AT91SAM9260-EK and not the NANDFLASH.tcl for the Olimex SAM9 L9260. The memories beetween board differs and the must be different.

The goal for me is to install a linux 2.6.26.

Can you send me a NANDFLASH.tcl at pascal.fifre@cleode.fr ?

Also my board is damaged , I think I’ve erased the NAND flash playing with u-boot and the OLIMEX board restoration procedure doesn’t goes on due to a driver problem with winxp.

I’ve readed an application note by atmel:

http://www.atmel.com/dyn/products/app_n … t%20Loader

its title is:

AT91SAM9260-EK SAM-BA Recovery (10 pages, revision A, updated 11/06)

Provides a solution for overcoming memory programming errors that prevent correct implementation of SAM-BA.

I think it should be useful to reset the board that isn’t recognized neither by sam-ba (win xp doesn’t install the usb driver of the board) like the mine as stated here.

What do tou think about it?

Problem fixed.

I have put the board’s jumper in this configuration:

BMS_LOW open

PDE/PHY_PDCTRL open

TXD1/DTXD on dtxd

RXD1/DRXD on drxd

INTRC/EXTCLK on extclk

BAT/EXT on ext

DF_E open

NANDF_E open

then I’ve powered the board and I’ve opened HYPERTERMINAL (or cutecom on LINUX) applied power and I’ve sent a string on the serial port (115200bps,8,1,N) and plugged the usb port and the board responded to win.

Then I’ve closed the NANDF_E jumper and I’ve launched the board restoration procedure .

I’ve made the sames things on my board.

The dialog with the board on USB is good. I can make some operations on NAND FLash (erase, sand file, etc.) with SAMBA.

When I lanch the AT91SAM9260_demo_linux_NandFlash.bat, the file.log tells me that’s good.

But after, when I reset the board I’ve always the same message on the COM port >RomBOOT.

Anybody has an idea ?

Thanks

Hi,

I did restoring the default bootloader and kernel using the AT91SAM9260_demo_linux_NandFlash.bat and it looked no problem to review log file.

But after resetting the board, I just got the message below on the hyper terminal and it didn’t move forward.

Can anybody help me? I really don’t know what the problem is.

Thanks,

RomBOOT

AT91Bootstrap loading from 0x8400…

U-Boot 1.2.0 (Apr 18 2008 - 12:47:19)

DRAM: 64 MB

NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,

3V 8-bit)

512 MiB

In: serial

Out: serial

Err: serial

KS8721 PHY Detected

End of Autonegotiation

Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x1a2828

1714216 bytes read: OK

Booting image at 21500000 …

Image Name: Linux-2.6.23

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 1714152 Bytes = 1.6 MB

Load Address: 20008000

Entry Point: 20008000

Verifying Checksum … OK

OK

Starting kernel …

Uncompressing Linux…

… done, booting the kernel.

Linux version 2.6.23 (ivan@debian.l123.org) (gcc version 4.1.2) #5 PREEMPT Sun O

ct 14 02:01:51 EEST 2007

CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177

Machine: Olimex SAM9-L9260

Memory policy: ECC disabled, Data cache writeback

Clocks: CPU 180 MHz, master 90 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. Total pages: 16256

Kernel command line: mem=64M console=ttyS0,115200, noinitrd root=/dev/mtdblock1

rootfstype=jffs2

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: 61336KB available (2732K code, 686K data, 108K init)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

NET: Registered protocol family 16

Generic PHY: Registered new driver

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)

audit: initializing netlink socket (disabled)

audit(0.570:1): initialized

JFFS2 version 2.2. (NAND) 짤 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq 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

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

loop: module loaded

MACB_mii_bus: probed

eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)

eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:01, irq=-1)

block2mtd: version $Revision: 1.30 $

NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bi

t)

Scanning device for bad blocks

Bad eraseblock 0 at 0x00000000

Bad eraseblock 1 at 0x00020000

Bad eraseblock 2 at 0x00040000

Bad eraseblock 3 at 0x00060000

Bad eraseblock 8 at 0x00100000

Bad eraseblock 9 at 0x00120000

Bad eraseblock 10 at 0x00140000

Bad eraseblock 11 at 0x00160000

Bad eraseblock 12 at 0x00180000

Bad eraseblock 13 at 0x001a0000

Bad eraseblock 14 at 0x001c0000

Bad eraseblock 15 at 0x001e0000

Bad eraseblock 16 at 0x00200000

Bad eraseblock 17 at 0x00220000

Bad eraseblock 18 at 0x00240000

Bad eraseblock 19 at 0x00260000

Bad eraseblock 20 at 0x00280000

Bad eraseblock 21 at 0x002a0000

Bad eraseblock 32 at 0x00400000

Bad eraseblock 33 at 0x00420000

Bad eraseblock 34 at 0x00440000

Bad eraseblock 35 at 0x00460000

Bad eraseblock 36 at 0x00480000

Bad eraseblock 37 at 0x004a0000

Bad eraseblock 38 at 0x004c0000

Bad eraseblock 39 at 0x004e0000

Bad eraseblock 40 at 0x00500000

Bad eraseblock 41 at 0x00520000

Bad eraseblock 42 at 0x00540000

Bad eraseblock 43 at 0x00560000

Bad eraseblock 44 at 0x00580000

Bad eraseblock 45 at 0x005a0000

Bad eraseblock 46 at 0x005c0000

Bad eraseblock 47 at 0x005e0000

Bad eraseblock 48 at 0x00600000

Bad eraseblock 49 at 0x00620000

Bad eraseblock 50 at 0x00640000

Bad eraseblock 51 at 0x00660000

Bad eraseblock 52 at 0x00680000

Bad eraseblock 53 at 0x006a0000

Bad eraseblock 54 at 0x006c0000

Bad eraseblock 55 at 0x006e0000

Bad eraseblock 56 at 0x00700000

Bad eraseblock 57 at 0x00720000

Bad eraseblock 58 at 0x00740000

Bad eraseblock 59 at 0x00760000

Bad eraseblock 60 at 0x00780000

Bad eraseblock 61 at 0x007a0000

Bad eraseblock 62 at 0x007c0000

Bad eraseblock 63 at 0x007e0000

Bad eraseblock 829 at 0x067a0000

Bad eraseblock 1039 at 0x081e0000

Bad eraseblock 1581 at 0x0c5a0000

Creating 2 MTD partitions on “NAND 512MiB 3,3V 8-bit”:

0x00000000-0x00a00000 : “Bootloader Area”

0x00a00000-0x20000000 : “User Area”

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.

usbcore: registered new interface driver libusual

udc: at91_udc version 3 May 2006

ether gadget: using random self ethernet address

ether gadget: using random host ethernet address

usb0: Ethernet Gadget, version: May Day 2005

usb0: using at91_udc, OUT ep2 IN ep1 STATUS ep4

usb0: MAC 2e:b6:35:06:80:03

usb0: HOST MAC 92:23:b9:a7:a9:d3

usb0: RNDIS ready

mice: PS/2 mouse device common for all mice

TCP cubic registered

Initializing XFRM netlink socket

NET: Registered protocol family 1

NET: Registered protocol family 17

NET: Registered protocol family 15

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

VFS: Mounted root (jffs2 filesystem).

Freeing init memory: 108K

Warning: unable to open an initial console.

Kernel panic - not syncing: No init found. Try passing init= option to kernel.