NGW100 Linux 2.6.27.6 with PHP, SQL, Python, and more.

I have compiled a Linux Kernel for the NGW100 or any AVR32 device, using buildroot. It includes: Lighttp, SQLite, PHP, Python, and OpenSSH (supports SCP).

This all stemmed from wanting to be able to develop and compile C and C++ programs for the NGW100. At first I tried to compile PHP and Lighttp using the instructions found on Wildan Maulana’s blog entitled Compiling PHP & lighttpd for avr32, but it was less then ideal. After some experimentation and Googling, I discovered that with Buildroot, I could build my own custom Kernel that included all the software that I required.

I first compiled with dropbear SSH which lacks SCP (Secure Copy) and not OpenSSH but soon realized that ProFTPD was a huge pain in the rear, transfers were unreliable (especially to the SD card), so I recompiled with OpenSSH support.

Useful Information:

  • Root Password: roota
  • HTTP Directory: /www/pages
  • Both NICs have DHCP client enabled, and Iptables has been disabled.

Additional Daemons Installed:

  • lighttpd
  • SQLite
  • PHP
  • Python
  • OpenSSH w/ SCP support

Version Information:
uname -a
Linux ngw.example.net 2.6.27.6.atmel.1 #1 Fri Jan 16 15:21:34 EST 2009 avr32 unknown

Installation Instructions:

UPDATE: I have uploaded the images to a new faster server. I have also compiled the root file system with support for Lighttpd (w/ OpenSSL), PHP (w/ OpenSSL), and SQLite per special request. It also includes OpenSSH and Nano.

With Python and no OpenSSL: avr32-linux.tar.bz2
With OpenSSL Support: avr32-openssl.tar.bz2

You will need to format an SD Card using the ext2 filesystem, which will need to be done from a Linux machine, First unmount the device, then use the following command to format it:

sudo mkfs.ext2 /dev/yourDeviceHere

After this you can just extract the avr32-linux.tar.bz2 archive to the root of the SD Card using the following command (replace /media/sdcard with the mount point of your SD card):

cd /media/sdcard
sudo tar -xvf /path/to/avr32-linux.tar.bz2

Insert the SD Card into your NGW100 and boot it up, using a serial console press the space key to abort the normal boot sequence, then enter the following:

Print your current environment variables:
Uboot> printenv

Make a note of the current settings, that way if you want to boot from the onboard flash memory at some point, you will be able to change your settings back. You can also find the default settings on this page.

No lets change the uBoot environment variables to boot from the SD Card:

Uboot> askenv bootcmd
Please enter 'bootcmd': mmcinit; ext2load mmc 0:1 0x10300000 /uImage; bootm 0x10300000
Uboot> set bootargs 'console=ttyS0 root=/dev/mmcblk0p1 rootwait'
Uboot> saveenv

Now you should be able to press the reset button and boot into Linux, congratulations!

About the Author