
The subdirectory
linuxapp-testprj
has two simple projects that show how to
cross-compile user applications for Linux. The fbtest.tgz archive contains
an example that draws the frame buffer from user space. The evtest.tgz
archive contains an example how to access the board buttons. Example
usage of evtest:
$ evtest /dev/input/event0
TIPS AND TRICKS
TIP:
The original Angstrom root filesystem distribution does not enable the
ETHERNET connection by default. To change that open
/etc/network/interfaces :
vi /etc/network/interfaces
and add the following line:
auto eth0
TIP:
It is possible to use an NFS root filesystem. When U-Boot boots press
SPACE or ENTER to enter the U-Boot shell:
Hit any key to stop autoboot: 0
U-Boot>
Then set the kernel boot arguments and point to your NFS exported
directory:
U-Boot> setenv bootargs console=ttyS0,115200 root=/dev/nfs rw
nfsroot=192.168.0.225:/path/to/nfs-root/
ip=192.168.0.239:192.168.0.225::255.255.255.0:emblin::none
And finally boot the kernel:
U-Boot> boot
In the previous example the NFS server has IP address 192.168.0.225, and
the SAM9-L9261 client is assigned IP address 192.168.0.239 and host
name "emblin". The NFS export path is "/path/to/nfs-root"
Another option is to use DHCP:
U-Boot> setenv bootargs console=ttyS0,115200 root=/dev/nfs rw
nfsroot=192.168.0.225:/path/to/nfs-root,rsize=1024,wsize=1024,tcp
ip=::::::dhcp
TIP:
After creating a root filesystem using buildroot, Angstrom or similar
method, it must be converted to a JFFS2 image for writing to the NAND
flash. Assuming that the target root directory is located in a directory
sam9-rootfs, the JFFS2 image can be created by issuing:
mkfs.jffs2 --root="sam9-rootfs" -e128KiB -n -p -o"angstrom-x11-image-
demo-glibc-at91.rootfs.jffs2"
The archive
angstrom-atmel-demo-olimex-rootfs.tgz
contains the root
directory structure that can be used as a starting point.
TIP:
By default the board is configured to enable eth0 using DHCP for
automatic IP configuration. This can be changed by editing the file
/etc/network/interfaces.
TIP:
By default the embedded Linux installation starts a SSH server. In
order to use it, however, the root password must be set. Type as root in
board terminal:
passwd
and type the new root password. Password must be non-empty (it must
contain at least one character).
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from