author: Nullpointer
updated by: Acrux


Sam440ep quick notes

Users often have lots of questions even on the most basic usage of the Sam440ep systems, so there are some quick notes here…
These notes are updated to the version of the board available in December 2007, Acube uBoot Nov 5.

uBoot menu and usage

When you'll power on your Sam440ep for the first time, you’ll get a bit confused by the input and output behaviour. The stdout defaults to the vga port, while the stdin is taken from serial line, even if the environment variable stdin is set to atkbd. USB keyboard is not usable so far with the versions i’ve tried, but i’m sure this issue will be fixed soon.
So the best way to communicate with uBoot is to connect a serial terminal (minicom is perfect for the use), set port parameters to 115200,8N1 and terminal to ansi, and start “talking” to uboot.
If you wish to have both input and output on your serial terminal (that is much more comfortable than writing on a computer and seeing the output on the other) then just issue:

setenv stdout serial

and you’ll direct the uboot output to the serial port.
If you want to be sure that input comes from serial just issue:

setenv stdin serial

These commands have immediate effect so you will see the results in your serial terminal immediately (and it also works blind if you don’t have a vga monitor connected to the Sam).
To save these variables for the next reboot issue:

saveenv

If you want to access to the nice text-menu of the Sam, you must be sure that stdout is set to vga instead, so issue:

setenv stdout vga
menu

You will have to move carefully using these keys:
CTRL+C ==> Move Down
CTRL+D ==> Move Up
CTRL+F ==> Enter Menu
CTRL+E ==> Leave Menu

Booting from Cdrom

First get info about the connected devices:

] ide info
Units on controller Silicon Image Serial ATA 4 ports
IDE device 0: Model: Maxtor 6V080E0 Firm: VA111610 Ser#: V202ZG7H
Type: Hard Disk
Capacity: 78167.2 MB = 76.3 GB (160086528 x 512)
IDE device 1: Vendor: TSSTcor Prod.: CDDVDW SH-S203B Rev: SB00
Type: Removable CD ROM
Capacity: 230.2 MB = 0.2 GB (117872 x 2048)

Once you figure out what’s your cdrom ide device id and controller, simply boot from that device, partition 0; the ElTorito catalog gets loaded and then kernel image is loaded from cdrom.

] diskboot 200000 1:0 0

Loading from IDE device 1, partition 0: Name: hdb0
Type: U-Boot

A different method could be:

] ide reset
] sete boot1 s4siicdrom
] boota 

Booting from ext2 filesystems, i.e. USB pendrive

USB devices are detected at boot, so if you connect an usb flash drive, reset your sam440ep to have it show up among storage devices. Issuing usb reset might work as well.

] usb tree

Device Tree:
1 Hub (12MBit/s, 0mA)
| OHCI Root Hub
|
+-2 Mass Storage (12MBit/s, 100mA)
FLASH DISK AA10000000000280

] usb storage
Device 0: Vendor: FLASH Prod.: DISK Rev: 1100
Type: Removable Hard Disk
Capacity: 979.2 MB = 0.9 GB (2005504 x 512)

As you can see usb2 devices are seen as usb1 by uBoot, so don’t expect lightspeed navigation or kernel loading from them. When the Linux kernel boots the device is of course used as an USB2 device. You can navigate inside any ext2 filesystem with ext2ls and load a kernel with ext2load.

ext2ls usb0 0:1
DIR 4096 .
DIR 4096 ..
DIR 16384 lost+found
DIR 4096 var
DIR 4096 usr
DIR 4096 bin
DIR 4096 etc
DIR 4096 sbin
DIR 4096 lib
DIR 4096 boot
DIR 4096 dev
DIR 4096 home
DIR 4096 mnt
DIR 4096 opt
DIR 4096 proc
DIR 4096 root
DIR 4096 sys
DIR 4096 tmp

] ext2ls usb0 0:1 boot
DIR 4096 .
DIR 4096 ..
880442 System.map
2058804 uImage

] ext2load usb0 0:1 200000 /boot/uImage

2058804 bytes read

] bootm

Other

To use an USB keyboard under UBoot, it needs to be attached to the upper external USB port (J18) or internal header J19A.
Uboot currently handles only 2 SATA ports from which you can boot. It means that you must connect devices you want to boot from on J20 (boot1 normally is the onboard sata DVD) and J23 only.