BuildRoot : get demo binaries
Root file system pre-built images
The Root file system images are images of
jffs2 filesystems containing an entire embedded Linux system. This fielsystem is read/write capable and is designed to be stored in
NAND FLASH memory available on AT91sam EK boards (256 MBytes, large pages : 2KBytes).
Buildroot generic rootfs for SAM9EK boards
The Root file system image is a generic one for all AT91SAM9 EK boards. It's an image of jffs2 filesystem which is read/write capable and is designed to be stored in NAND FLASH memory with page size as 2KBytes.

The
Version number indicates the version of buildroot we derived from buildroot's svn trunk. For the usage of
buildroot-v23434.patch, see
BuildRootBuild.
Included applications
| Applications | Description |
| alsa & alsa-utils | Advanced Linux Sound Architecture - Utilities |
| aumix | audio mixer utils |
| busybox | Unix-like toolkit |
| dropbear | A small SSH 2 server |
| iperf | TCP/UDP Bandwidth Measurement Tool |
| madplay | Mp3 player |
| mplayer | Multimedia player |
| portmap | DARPA port to RPC program number mapper |
| strace | A debugging utility |
| tslib | Touch screen library and utilities |
| wireless_tools | Tools manipulate wireless network |
Install a rootfs on an AT91 board
This section describes how to load a jffs2 root filesystem into the NAND FLASH of the board with SAM-BA and right through the u-boot command line. SAM-BA is the simplest way.

Note that the root file system is installed at
offset 0x400000 in the NAND FLASH. From a Linux kernel point of view, this corresponds to the index 0 of the MTD subsystem device (
/dev/mtd1 and
/dev/mtdblock1).

Note also that this operation will need a
complete erase of the on-board NAND FLASH. Be sure not to loose data during this operation.
Using SAM-BA
- Connect the USB Device Interface to your host machine using the USB Device Cable
- Make sure that the chip can execute the bootROM monitor SAM-BA-boot :
| AT91SAM9260-EK | AT91SAM9261-EK | AT91SAM9263-EK (RevA) |
- J7 must be opened (BMS=1) to boot from the on-chip Boot ROM
- follow the AT91SAM9260EKSamBaRecovery recovery method, if needed
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
| - J4 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash Jumper (J21)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- plug DataFlash Jumper (J21) back in position 1-2
| - J5-6 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash Card (J9)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- reinsert the DataFlash Card in J9
|
| AT91SAM9XE-EK | AT91SAM9RL-EK | AT91SAM9263-EK (RevB) |
- erase the content of the internal FLASH by putting the J7 jumper in position 1-2
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- open now J7 (or put in position 2-3), to boot in normal operating mode
| - J11 must be on 1-2 position (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash and NAND Flash Jumpers (J12 & J13)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- close DataFlash and NAND Flash Jumpers (J12 & J13)
| - J5-6 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash Card (J9)
- remove NAND Flash Jumpers (J29)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- reinsert the DataFlash Card in J9 (only for DataFlash demo)
- close NAND Flash Jumper (J29) 1
|
| AT91SAMG20-EK | AT91SAMG10-EK | AT91SAM9G45-EKES |
- J7 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash and NAND Flash Jumpers (J33 & J34)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- close DataFlash and NAND Flash Jumpers (J33 & J34)
| - J4 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove DataFlash and NAND Flash Jumpers (J21 & J24)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- close DataFlash (J21) back in position 1-2
- close NAND Flash Jumper (J24)
| - Check and conform to the Default Jumpers Settings
- First of all, be sure that the ROM code replacement is located in Dataflash to workaround the issue with SAM-BA access through USB. Please refer to the Errata on AT91SAM9G45 Engineering Sample Devices document
- JP8 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove NAND Flash Jumper (JP10)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- close NAND Flash Jumper (JP10)
|
| AT91SAM9M10-EKES and AT91SAM9M10G45-EK | | |
- Check and conform to the Default Jumpers Settings
- JP8 must be opened (BMS=1) to boot from the on-chip Boot ROM
- remove NAND Flash Jumper (JP10)
- power up the board
- verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
- close NAND Flash Jumper (JP10)
| | |
- Start SAM-BA GUI Application
- Select the the board in the drop-down menu and choose the USB Connection

- Eventually plug back a jumper to access the media on which u-boot must be loaded to
- In the main SAM-BA window :
- Choose the NandFlash media tab in the SAM-BA GUI interface
- Initialize the media choosing the NandFlash Init action in the Scripts rolling menu and press Execute
- In the same Scripts menu choose the NandFlash Erase All action and press Execute . A Please Wait... dialog window is appearing: wait for the end of the erase process
- Press on Send File Name Browse button
- Choose the filesystem image file ( v23434-rootfs.arm_nofpu.jffs2 for example) and press Open
- Enter the proper address on media in the Address text field. You can find a media map for each product in GettingStarted#Linux4SAM_DataFlash_demo_Memory and GettingStarted#Linux4SAM_NandFlash_demo_Memory
- Press Send File button. A Please Wait... dialog window is appearing: wait for the end of the flashing process
- On AT91SAM9260-EK, If you ran the AT91SAM9260EKSamBaRecovery, do not forget to replace AT91Bootstrap in your booting media
- Close SAM-BA, remove the USB cable
Ok, now you must have a the Linux root filesystem flashed on your board.
Using u-boot commands
Here is a reference documentation about
JFFS2 as root filesystem on the u-boot documentation website.
Following commands documentation is available in
the u-boot doc/README.nand documentation file.
1. erase the whole NAND FLASH
U-Boot> nand erase
NAND erase: device 0 whole chip
Skipping bad block at 0x000c0000
Skipping bad block at 0x009c0000
Erasing at 0xffe0000 -- 100% complete.
OK
2. download the JFFS2 filesystem
from TFTP to the board RAM (address 0x21400000
2)
U-Boot> tftp 0x21400000 v23434-rootfs.arm_nofpu.jffs2
TFTP from server 10.159.240.137; our IP address is 10.159.245.170
Filename 'v23434-rootfs.arm_nofpu.jffs2'.
Load address: 0x21400000
Loading: T #################################################################
#######################################################T ##########
#################################################################
[..]
#########################
done
Bytes transferred = xxxxxxxx (yyyyyyyy hex)

remember the number of
Bytes transferred just indicated above. It will be useful for the
nand write.jffs2 command.
3. write the filesystem from RAM@0x21400000
2 to NAND FLASH at offset
0x400000 (Linux
/dev/mtdblock1). Note the last parameter : it is the number of
Bytes transferred indicated in the previous command.
U-Boot> nand write.jffs2 0x21400000 0x400000 0xyyyyyyyy
NAND write: device 0 offset 0x400000, size 26083328 ...
Bad block at 0xc0000 in erase block from 0xc0000 will be skipped
Bad block at 0x9c0000 in erase block from 0x9c0000 will be skipped
Writing data at 0x195f800 -- 100% complete.
OK

Note that
bad blocks just shown above are normal behavior of a NAND FLASH : they are skipped and the filesystem will not mind, it is designed to manage them.
Good, now you have a fresh JFFS2 filesystem you can boot on.
--
EricXu - 18 Dec 2008
Notes
1: If you experience issues with NAND flash accesses,
please refer to the
AT91SAM9263-EK Evaluation Board Rev. B User Guide chapter
1.5 NAND Flash Access Issue
2: 
for
at91sam9g45 family: use proper location for RAM: 0x70000000 instead of 0x20000000