dSS11-1GB

Flash Partitioning

size  desc              addr            size

4M    kernel-rescue     0x00000000      0x00400000
4M    kernel-prod       0x00400000      0x00400000
32M   rootfs-rescue     0x00800000      0x02000000
976M  rootfs-prod       0x02800000      0x3d000000
8M    config            0x3f800000      0x00800000

Before any operation verify the partition table (mtdparts). If the table does not match, update the u-boot to the most current version.

TFTP server

With some TFTP servers a download may succeed but the resulting image is not bootable. The tftpd-hpa has proven to work.

Install under Ubuntu

Install the server with the following commands:

sudo apt-get install tftp-hpa tftpd-hpa

Then edit /etc/default/tftpd-hpa to point the server to the right TFTP_DIRECTORY.

Updating U-Boot

After any u-boot update the MAC address has to be re-written (setenv ethaddr a8:99:5c:xx:xx:xx ; saveenv).

Via TFTP

Copy .bin image to TFTP export.

setenv autoload no
dhcp
tftpboot 0x20000000 <tftp.server.ip.address>:<file.bin>
sf probe 1
sf erase 0x10000 0x70000
sf write 0x20000000 0x10000 ${filesize}

Via USB

Copy .bin image to USB pen drive.

usb start
fatload usb 0:1 0x20000000 <file>
sf probe 1
sf erase 0x10000 0x70000
sf write 0x20000000 0x10000 ${filesize}

Via NFS

Copy .bin image to NFS export.

setenv autoload no
dhcp
nfs 0x20000000 <nfs.server.ip.address>:</path/to/file>
sf probe 1
sf erase 0x10000 0x70000
sf write 0x20000000 0x10000 ${filesize}

Updating Kernel

From U-Boot:

Via TFTP

Copy .bin image to TFTP export.

setenv autoload no
dhcp
nand erase clean 0x00400000 0x00400000
tftpboot 0x00400000 <tftp.server.ip.address>:<file.bin> nand

Via USB

Copy .bin image to USB pen drive.

usb start
fatload usb 0:1 0x20000000 <file>
nand erase clean 0x00400000 0x00400000
nand write 0x20000000 0x00400000 ${filesize}

Via NFS

Copy .bin image to NFS export.

setenv autoload no
dhcp
nfs 0x20000000 <nfs.server.ip.address>:</path/to/file.bin>
nand erase clean 0x00400000 0x00400000
nand write 0x20000000 0x00400000 ${filesize}

From Linux:

flash_erase /dev/mtd1 0 0
nandwrite -p /dev/mtd1 <file>
flash_erase /dev/mtd1 0 0
cat <file> > /dev/mtdblock1

Re-flashing RootFS

Via TFTP

If the image file is larger than 60MB this is the only option.

Copy .ubi image to TFTP export.

setenv autoload no
dhcp
nand erase clean 0x02800000 0x3d000000
tftpboot 0x02800000 <tftp.server.ip.address>:<file.ubi> nand

Via USB

Only for image files that are smaller than 60MB.

Copy .ubi image to USB pen drive.

usb start
fatload usb 0:1 0x20000000 <file.ubi>
nand erase clean 0x02800000 0x3d000000
nand write 0x20000000 0x02800000 ${filesize}

Via NFS

Only for image files that are smaller than 60MB.

Copy .ubi image to NFS export.

setenv autoload no
dhcp
nfs 0x20000000 <nfs.server.ip.address>:</path/to/file.ubi>
nand erase clean 0x02800000 0x3d000000
nand write 0x20000000 0x02800000 ${filesize}

NFS root

setenv nfsopts nolock
setenv mtdparts atmel_nand:4M(kernel-rescue),4M(kernel-prod),32M(rootfs-rescue),976M(rootfs-prod),-(config)
setenv bootargs_defaults setenv bootargs console=ttyS0,115200 ubi.mtd=\${rootfs_part},4096 mtdparts=\${mtdparts}
setenv net_args run bootargs_defaults\; setenv bootargs '${bootargs}' root=/dev/nfs nfsroot='${serverip}:${rootpath},${nfsopts}' rw ip=dhcp
setenv net_boot run setup_sysrescue\; run net_args\; nboot 0x22000000 0 \${kernel_addr}\; bootm 0x22000000

Don't forget to set rootpath and serverip, then start the kernel with run net_boot

dSS11

Flash Partitioning

size  desc              addr            size

128k  bootstrap         0x0             0x20000
256k  uboot             0x20000         0x40000
256k  uboot env         0x60000         0x40000
2M    rescue kernel     0xa0000         0x200000
2M    prod. kernel      0x002a0000      0x200000
32M   rescue rootfs     0x004a0000      0x2000000
200M  prod. rootfs      0x024a0000      0xC800000
~19MB config            0x0ECA0000      0x1360000

Installing U-Boot

This step requires a serial connection to the dSS. On startup, press a key to prevent autoboot.

usb start
fatload usb 0:1 0x20000000 <file>
nand erase clean 0x20000 0x80000
nand write 0x20000000 0x20000 0x40000

Note: you can clean only the u-boot application code by changing the size to 0x40000 which preserves the environment. This may or may not be wanted. If you wonder why you'd want this, then don't do it.

Installing Kernels

From U-Boot:

usb start
fatload usb 0:1 0x20000000 <file>
nand erase clean 0x002a0000 0x200000
nand write 0x20000000 0x002a0000 0x200000

Note that for the the address in the example is for the production kernel

From Linux:

flash_eraseall /dev/mtd4
nandwrite -p /dev/mtd4 <file>

Installing RootFSs

usb start
fatload usb 0:1 0x20000000 <file>
nand erase clean 0x024a0000 0xC800000
nand write 0x20000000 0x024a0000 ${filesize}

Note that for the the address in the example is for the production rootfs

Old partition layout (for historical consideration only)

Installing U-Boot

Put the U-Boot image on a USB stick and plug it in. At the U-Boot prompt:

usb start
fatload usb 0:1 0x20000000 aizo.uboot
nand erase clean 0x20000 0x80000
nand write 0x20000000 0x20000 0x40000

Installing a new Kernel-Image

Put the kernel-image on a USB stick and plug it in. At the U-Boot prompt:

usb start
fatload usb 0:1 0x20000000 uimage-2.6.32-r9-at91sam9g20ek.bin
nand erase clean 0xa0000 0x200000
nand write 0x20000000 0xa0000 0x200000

Installing the rootfs

Put the root file system on a USB stick and plug it in. At the U-Boot prompt:

usb start
fatload usb 0:1 0x20000000 dss-image-at91sam9g20ek.jffs2
nand erase clean 0x002a0000
nand write 0x20000000 0x002a0000 ${filesize}