A couple of notes on NGX blueboard ARM9.
NGX Technologies produces relatively cheap boards with AT91RM9200 ARM processor from Atmel, in April 2010 you could get one for 62 USD. Board comes with preloaded Linux kernel 220.127.116.11 (with patches). With board you get tools to build kernel and, small, ready to use file system that you put on SD card and of course schematics.
Board is slightly modified Free ECB_AT91 V1, so all informations from their wiki is valid for this board as well (it has lots of useful information), since I would have to, almost, copy everything from that wiki I will place here my comments on the board and certain procedures.
The board version I got needs some fixing due to non functional USB port:
Here are photos of the board:
Since I was trying different things I created small scripts to automate some tasks:
#!/bin/bash # you need working uboot # make sure you your build tools are in PATH, you can also put full path # below, but remember to give full path to "arm-linux-objcopy" below as well crossmake="make ARCH=arm CROSS_COMPILE=arm-linux-" echo Menuconfig... sleep 1 $crossmake menuconfig echo Compiling kernel... sleep 1 # change "2" to number of processors/cores you have $crossmake -j 2 vmlinux echo Creating loadable image... sleep 1 arm-linux-objcopy -O binary -R .note.gnu.build-id -R .comment -S vmlinux linux.bin gzip -c -9 linux.bin > linux.bin.gz mkimage -A arm -O linux -T kernel -C gzip -a 0x20008000 -e 0x20008000 -n "Linux Kernel Image" -d linux.bin.gz ngx_at91.img # start tftpd server echo Starting tftpd server as root... sleep 1 sudo ./simpletftpd.pl
#!/bin/bash # Script builds kernel modules and install them in _modules directory crossmake="make ARCH=arm CROSS_COMPILE=arm-linux-" mkdir -p _modules $crossmake -j 2 modules INSTALL_MOD_PATH=./_modules $crossmake modules_install
Please note that for older kernels (prior 2.6.21?) „.note.gnu.build-id” section name is „.note” in vmlinux ELF file. If your compressed image is a little bit and it takes a lot of time to create than mentioned section wasn't removed.
I also use another script as simple TFTP server, it's almost a copy from module example. You'll need Perl and Net::TFTPd (install using „cpan” command as root), you'll need to start this script as root (sudo) since it requires lower port numbers:
#!/usr/bin/perl use strict; use Net::TFTPd; my $tftpdOBJ = Net::TFTPd->new('RootDir' => './') or die "Error creating TFTPd listener: %s\n", Net::TFTPd->error; my $tftpRQ = $tftpdOBJ->waitRQ(100) or die "Error waiting for TFTP request: %s\n", Net::TFTPd->error; $tftpRQ->processRQ() or die "Error processing TFTP request: %s\n", Net::TFTPd->error; printf "%u bytes has been transferred\n", $tftpRQ->getTotalBytes() || 0;
On ECB patched kernel everything works as expected, but for newer kernels MMC controller doesn't work as well as Ethernet controller, here are the fixes:
You can find 18.104.22.168 binary kernel + modules + kernel config file in Resources section. It works.
To try new kernel you don't need to flash anything (yet), the easiest method is to download new kernel, using uboot, through TFTP, everything is well explained on ECB_AT91 wiki. This is good to try new functionality in kernel, disadvantage is that you need to load the kernel every time you reset the board. You can put new kernel permanently on flash chip which is connected through SPI bus.
Potential bugs in kernel:
You can easily install Debian using debootstrap, Ubuntu has it in its repositories. After fetching base system some small adjustments must be made, read on. I assume you have stock NGX filesystem on your card (needed for second stage). For newer Debian systems you need EABI enabled kernel (as well as tools to build it).
First get base system (you can do that on x86 machine):
sudo debootstrap --foreign --arch=armel squeeze Debian http://ftp.us.debian.org/debian/
This command will install Debian base system in „Debian” directory. „armel” means EABI, for older distributions use „arm”. You can change distribution name („squeeze”) and mirror to suite your needs.
Copy whole „Debian” directory to root of stock NGX filesystem. Boot it using EABI kernel.
Run second stage (it will take some time to unpack and configure everything) on ARM9 Blueboard:
chroot ./Debian /debootstrap/debootstrap --second-stage
If you get „Segmentation fault” it means, most probably, that you are not using EABI kernel.
Now move somehow all files from „Debian” to root of filesystem (I copied it somewhere, removed everything from card and copied „Debian/*” back). Remember to use „cp -a” to preserve file attributes and owner.
Some things need to be adjusted:
# loopback interface auto lo iface lo inet loopback # dhcp on eth0 auto eth0 iface eth0 inet dhcp
proc /proc proc nodev,noexec,nosuid 0 0 /dev/mmcblk0p1 / ext4 noatime 0 1
# comment out following lines T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 T1:23:respawn:/sbin/getty -L ttyS1 115200 vt100
deb http://ftp.de.debian.org/debian squeeze main
After everything is ready you can easily update your system („apt-get update; apt-get upgrade”) and install new software („apt-get install some-program”) just like on „normal” Linux.