Calao Atmel AT91 development board

Calao System propose Atmel AT91 ARM development Board with small form factor USB, Tiny, QIL

= USB Form Factor =

Barebox
You can use barebox on with the following support
 * uart
 * nand
 * ethernet
 * usb host
 * sd card (mci)
 * spi
 * generic barebox features (menu, hush, multi-devices, etc...)

1) First you need to clone the tree

The board support is currently in the next branch

git clone git://git.pengutronix.de/git/barebox.git git checkout -b work origin/next

2) Then you need to configure it

For the 64 MiB board

make usb_a9g20_defconfig

For the 128 MiB board

make usb_a9g20_128mib_defconfig

3) Compile it

make

4) Flash it

now you need to flash it via
 * SAM-BA
 * OpenOCD

5) start the board

barebox 2011.10.0-00144-gc9145e1 (Oct 25 2011 - 17:48:18) Board: Calao USB-A9G20 Clocks: CPU 399 MHz, master 133 MHz, main 12.000 MHz NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron NAND 256MiB 1,8V 8-bit) Scanning device for bad blocks Bad eraseblock 591 at 0x049e0000 Bad eraseblock 920 at 0x07300000 Bad eraseblock 1026 at 0x08040000 Bad eraseblock 1388 at 0x0ad80000 Bad eraseblock 1764 at 0x0dc80000 Malloc space: 0x23500000 -> 0x23f00000 (size 10 MB) Stack space : 0x234f8000 -> 0x23500000 (size 32 kB) envfs: wrong magic on /dev/env0 no valid environment found on /dev/env0. Using default environment running /env/bin/init... Hit any key to stop autoboot: 0 barebox@Calao USB-A9G20:/ #

Linux
You can use the mainline kernel (merge in release 3.1)

1) First you need to clone the tree

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git git checkout -b work

2) Then you need to configure it

currently no defconfig is merge for the next release you could use at91sam9g20_defconfig but right now you need to use at91sam9g20ek_defconfig and select it via Kconfig "CALAO USB-A9G20"

make at91sam9g20ek_defconfig make menuconfig

or

make at91sam9g20ek_defconfig sed -i -e "s:# CONFIG_MACH_USB_A9G20 is not set:CONFIG_MACH_USB_A9G20=y:g" .config

3) Compile it

make uImage

4) Run it

You can run it via nfs or tftp from barebox

for this you need to modify the /env/config

a) on board

via

ed /env/config

b) on pc

by editing

diff --git a/arch/arm/boards/usb-a926x/env/config b/arch/arm/boards/usb-a926x/env/config index d77f678..660cb3c 100644 --- a/arch/arm/boards/usb-a926x/env/config +++ b/arch/arm/boards/usb-a926x/env/config @@ -2,16 +2,16 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp +#ip=dh # or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d +eth0.ipaddr=192.168.201.33 +eth0.netmask=255.255.255.0 +eth0.gateway=192.168.201.98 +eth0.serverip=192.168.201.98 # can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp +kernel_loc=nfs # can be either 'net', 'nor', 'nand' or 'initrd' rootfs_loc=net @@ -29,6 +29,9 @@ kernelimage=uImage #kernelimage_type=raw_lzo #kernelimage=Image.lzo +nfsroot="${eth0.serverip}:/opt/work/buildroot/build/usb_9g20/target/" +kernelimage="/opt/work/buildroot/build/usb_9g20/images/uImage-usb-a9g20" + nand_device=atmel_nand nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data)" rootfs_mtdblock_nand=5

5) start the board

Note that the kernel you see in this log is a development kernel using the Device tree

nb: sometime the nfs timeout to boot again just type boot enter

barebox 2011.10.0-00144-gc9145e1 (Oct 25 2011 - 17:48:18) Board: Calao USB-A9G20 Clocks: CPU 399 MHz, master 133 MHz, main 12.000 MHz NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron NAND 256MiB 1,8V 8-bit) Scanning device for bad blocks Bad eraseblock 591 at 0x049e0000 Bad eraseblock 920 at 0x07300000 Bad eraseblock 1026 at 0x08040000 Bad eraseblock 1388 at 0x0ad80000 Bad eraseblock 1764 at 0x0dc80000 Malloc space: 0x23500000 -> 0x23f00000 (size 10 MB) Stack space : 0x234f8000 -> 0x23500000 (size 32 kB) envfs: wrong magic on /dev/env0 no valid environment found on /dev/env0. Using default environment running /env/bin/init... Hit any key to stop autoboot: 0 warning: No MAC address set. Using random address D2:E7:9F:56:A2:96 phy0: Link is up - 100/Full T T Filename '/opt/work/buildroot/build/usb_9g20/images/uImage-usb-a9g20'. [#################################################################NFS failed: Interrupted system call barebox@Calao USB-A9G20:/ Filename '/opt/work/buildroot/build/usb_9g20/images/uImage-usb-a9g20'. [#################################################################] booting kernel of type uimage from /dev/ram0.kernel Verifying Checksum ... OK   Image Name:   Linux-3.0.0+ Created:     2011-10-24  21:55:00 UTC Image Type:  ARM Linux Kernel Image (uncompressed) Data Size:   1988582 Bytes =  1.9 MB    Load Address: 20008000 Entry Point: 20008000 OK Starting kernel ... commandline: console=ttyS0,115200 ip=192.168.201.33:192.168.201.98:192.168.201.98:255.255.255.0::eth0: root=/dev/nfs nfsroot=192.168.201.98:/opt/work/buildroot/build/usb_9g20/target/,v3,tcp noinitrd mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) arch_number: 1841 Uncompressing Linux... done, booting the kernel. Linux version 3.0.0+ (root@j-debian) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #66 Tue Oct 25 05:54:39 CST 2011 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: Atmel AT91SAM (Device Tree), model: Calao USB A9G20 Memory policy: ECC disabled, Data cache writeback AT91: Detected soc type: at91sam9g20 AT91: Detected soc subtype: Unknown AT91: sram at 0x200000 of 0x4000 mapped at 0xfef74000 AT91: sram at 0x300000 of 0x4000 mapped at 0xfef70000 Clocks: CPU 399 MHz, master 133 MHz, main 12.000 MHz Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS0,115200 ip=192.168.201.33:192.168.201.98:192.168.201.98:255.255.255.0::eth0: root=/dev/nfs nfsroot=192.168.201.98:/opt/work/buildroot/build/usb_9g20/target/,v3,tcp noinitrd mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) PID hash table entries: 256 (order: -2, 1024 bytes) 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: 60960k/60960k available, 4576k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000   (   4 kB) fixmap : 0xfff00000 - 0xfffe0000   ( 896 kB) DMA    : 0xffc00000 - 0xffe00000   (   2 MB) vmalloc : 0xc4800000 - 0xfee00000  ( 934 MB) lowmem : 0xc0000000 - 0xc4000000   (  64 MB) modules : 0xbf000000 - 0xc0000000  (  16 MB) .text : 0xc0008000 - 0xc0388620  (3586 kB) .init : 0xc0389000 - 0xc03a7000  ( 120 kB) .data : 0xc03a8000 - 0xc03cc240  ( 145 kB) .bss : 0xc03cc264 - 0xc03dd8fc  (  70 kB) NR_IRQS:192 looking for phys_base=fffff000, irq_start=0 AT91: 96 gpio irqs in 3 banks Console: colour dummy device 80x30 Calibrating delay loop... 199.06 BogoMIPS (lpj=995328) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 0x0 0xfffffff0 AT91: Power Management AT91: Starting after general reset pinctrl.0: hogged map DGBU_RX, function dbgu_rxd pinctrl.0: hogged map DGBU_TX, function dbgu_txd pinmux-at91 pinmux.2: initialized AT91 pinmux driver atmel_tcb: probe of atmel_tcb.1 failed with error -22 bio: create slab  at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Advanced Linux Sound Architecture Driver Version 1.0.24. cfg80211: Calling CRDA to update world regulatory domain Switching to clocksource tcb_clksrc 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 UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. NetWinder Floating Point Emulator V0.97 (double precision) JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. msgmni has been set to 119 io scheduler noop registered (default) fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 1) is a ATMEL_SERIAL console [ttyS0] enabled brd: module loaded loop: module loaded No SmartMedia card inserted. ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. mousedev: PS/2 mouse device common for all mice ALSA device list: No soundcards found. TCP cubic registered NET: Registered protocol family 17 lib80211: common routines for IEEE802.11 drivers /opt/work/linux-2.6/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
 * 1) boot

RootFS
You can use multiple tools to build the rootfs

* Debian * OpenEmbedded * BuildRoot