Roger Whittaker

View Roger Whittaker's profile on LinkedIn

Valid XHTML 1.0 Transitional

GuruPlug Plus Debian install

Saturday 5th February 2011

Here are my notes on installing Debian 6.0 to the Guruplug Plus.

None of this is original or my own work, but I found that I needed to refer to several different sources of information to get the job done.

I hope this is helpful, but the usual disclaimers apply: don't blame me if this doesn't work, or if it destroys your device.

Here we are installing to a microSD disk. If you are using a USB stick, the usb address will be different in the boot_cmd line below.

Update to a recent u-boot using this reference:

From USB, do something like this:
Marvell>> usb start
Marvell>> fatload usb 2:1 0x0800000 uboot.bin
Marvell>> nand erase 0x0 0xa0000
Marvell>> nand write 0x0800000 0x0 0xa0000
Marvell>> reset

Or if you have no u-boot (you're in a bricked state), see the section "Flashing U-Boot on Bricked Plug" here:

Main reference for installation, but note that some things are different here, because this page refers to SheevaPlug:

The Debian unstable installer for Guruplug is available here:

Copy the uImage and uInitrd from that location to a DOS formatted USB stick.

Connect to the Guruplug with:
# screen /dev/ttyUSB0 115200

Marvell>> usb start
Marvell>> fatload usb 2:1 0x00800000 /uImage
reading /uImage
1434220 bytes read
Marvell>> fatload usb 2:1 0x01100000 /uInitrd
reading /uInitrd
3172851 bytes read
Marvell>> setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
Marvell>> bootm 0x00800000 0x01100000

The installer boots, and you go through the installation.

Marvell>> setenv bootargs_console console=ttyS0,115200
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 1:1 0x00800000 /uImage; ext2load usb 1:1 0x01100000 /uInitrd'
Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x60000 -- 100% complete.
Writing to Nand... done
Marvell>> boot

Now install emacs, isc-dhcp-server, linux-source-2.6.32, module-assistant, rsync, etc...

Create a suitable /etc/dhcp/dhcpd.conf.

Edit /etc/default/isc-dhcp-server to include the right interfaces (eth1 and uap0).

Now we need to get the wireless working.


module-assistant prepare

(This command installs the necessary tools and headers).

Download the necessary source from:

mkdir /root/build-uap

Copy libertas_uap.tgz to /root/build-uap.

Unpack it.

In /root/build-uap/libertas_uap:
make CONFIG_LIBERTAS_UAP=m -C /lib/modules/$(uname -r)/build M=$(pwd)
mkdir /lib/modules/$(uname -r)/kernel/drivers/net/wireless/libertas_uap
cp uap8xxx.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/libertas_uap

Get the firmware blobs helper_sd.bin and sd8688_ap.bin from the original image:

mkdir -p /lib/firmware/mrvl/

Copy the firmware blobs to /lib/firmware/mrvl/.

Create a file /etc/modprobe.d/libertas_uap.conf:
# blacklist competing modules for the same hardware
# used by libertas_uap (uap8xxx.ko)
blacklist libertas_sdio
blacklist libertas

Now reboot.

Now sort out IP addresses for eth1 and uap0.

Add them to /etc/network/interfaces.

For example - add these lines:
auto eth1
iface eth1 inet static
auto uap0
iface uap0 inet static

Now we need /usr/bin/uaputl from an original Guruplug install, again from:

Then we need a script to start the access point. Here's a very simple one:

#! /bin/bash
/usr/bin/uaputl bss_stop
/usr/bin/uaputl sys_cfg_ssid bellman
/usr/bin/uaputl sys_cfg_protocol 32
/usr/bin/uaputl sys_cfg_wpa_passphrase "mypassowrd"
/usr/bin/uaputl sys_cfg_cipher 8 8
/usr/bin/uaputl bss_start
/etc/init.d/isc-dhcp-server restart
iptables -F
modprobe ip_tables
modprobe iptable_filter
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

For accessing the internal storage if you want to do that later:
apt-get install mtd-utils


Then you can do something like:
ubiformat /dev/mtd2 -s 512
ubiattach /dev/ubi_ctrl -m 2
ubimkvol /dev/ubi0 -N internal -m
mount -t ubifs ubi0:internal /mnt

Have a lot of fun... (although it's not openSUSE...)