Subject: Howto Boot from Flash with the Alchemy AU1100

From: Robert Bon <[email-masked]>
Date: Mon, 05 Sep 2005 10:57:53 +0200

Hello,

We are running linux kernel 2.6.12 on a AMD-Alchemy DB1100 evaluation 
board, with processor AU1100.

De kernel file is a Srecord which is programmed (with the bootloader 
YAMON load command) in to RAM, starting at address 0x80100000.
We want to store in the onboard flash.

How can we do this?

Thanks Robert.

---

From: Jørg Ulrich Hansen <[email-masked]>
Date: Mon, 5 Sep 2005 13:41:34 +0200

Start linux from flash at startup
The boot loader can be set up to automatically start Linux at power up.

Do the following:
To load kernel image into RAM on mb1100 type:
load

Then the image has to be copied to FLASH.
Erase block in FLASH:
erase bfd00000 2c0000

Copy image from RAM to FLASH:
copy a0100000 bfd00000 2c0000

When YAMON starts up it will process the start command, so that has to be
set up.
The kernel_entry address is not fixed so the start address has to be set up
for each new kernel
image. The start address can be read from the srec image file or it is
printed on the screen after
the load image command.

To set the start command:
set start 'copy bfd00000 a0100000 2c0000; go a032b018 \
root=/dev/mtdblock0 rootfstype=jffs2'

Start Linux with root file system mounted as jffs2
In a real world the root file system will normally be located in the FLASH
memory as a jffs2
partition. 
We will now copy a jffs2 image with the root file system to the FLASH.

From YAMON prompt do following:
Fill 16 MB of RAM with FF:
fill a1000000 1000000 ff
Load image into RAM:
load tftp://192.168.21.33/rootfs.srec
Erase 16MB in FLASH:
erase be000000 1000000
Copy 4MB from RAM to FLASH
copy a1000000 be000000 400000
If the image is bigger than 4MB please copy the appropriate size.

Now it should be ready to press reset.

If it prints a lot of text Linux starts correctly
If it prints ‘kernel panic’ in the end then it failed to mount the root file
system

This is based on a CPU module mb1100 that is similar to db1100.
More information about au1100 running Linux can be found at
http://www.mechatronicbrick.dk

Kind regards Jorg