Last modified 2 years ago
Hackable:1 on SheevaPlug
Testing hackable:1 on a usb device
Preparing the usb device
Needed:
- a serial terminal (minicom / cu / gtkterm / ...)
- a usb device ( => 500 Mo)
- get H1 version:
# wget http://build.hackable1.org/Hackable1-Openmoko-Freerunner-user-rev5beta5.tar.gz
- mount the first partition of a formated usb device (ext3 works as well, here we mounted it in /mnt/usb and device was in /dev/sdb1):
# mkdir /mnt/usb # mount /dev/sdb1 /mnt/usb
- untar tarball to the usb device:
# tar xzpf Hackable1-Openmoko-Freerunner-user-rev5beta5.tar.gz -C /mnt/usb/
- edit inittab for serial:
# echo "T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100" >> /mnt/usb/etc/inittab
- edit network configuration (we want eth0):
# sed "s/^#auto eth0/auto eth0/;s/^#iface eth0/iface eth0/" -i /mnt/usb/etc/network/interfaces
- umount usb:
# sync # umount /mnt/usb
Launch hackable:1 on the SheevaPlug
- turn on the SheevaPlug (or reboot it)
- start your serial terminal and press a key on it to get u-boot prompt Marvell>> (be fast if you just turned on the SheevaPlug)
- set temporary configuration for u-boot (for a permanent change, write saveenv after the validation of set bootargs):
- on factory u-boot configuration:
set bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/sda1 rw rootdelay=10' boot
- on factory u-boot configuration:
Install h:1 on flash
In this example we will explain how to upgrade the u-boot version of the SheevaPlug and at the same time install h:1 on flash.
For this example, we will use the h:1 rev5bet5 of the usb device described before and sheevaplug-installer-v1.0
You will need an x86 (or a chroot ..), libftdi1, php5-cli
Prepare files on your computer
- get hackable:1:
$ wget http://build.hackable1.org/Hackable1-Openmoko-Freerunner-user-rev5beta5.tar.gz
- untar h:1 in a work directory:
# tar xzpf Hackable1-Openmoko-Freerunner-user-rev5beta5.tar.gz -C workdir
- edit inittab for serial:
# echo "T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100" >> workdir/etc/inittab
- edit network configuration (we want eth0):
# sed "s/^#auto eth0/auto eth0/;s/^#iface eth0/iface eth0/" -i workdir/etc/network/interfaces
- edit filesystem (we want ubifs):
# sed "s/rootfs/ubi0:rootfs/;s/jffs2/ubifs/;s/errors=remount-ro,//" -i workdir/etc/fstab
- download the last SheevaPlug installer (c.f.: here):
# wget "http://www.plugcomputer.org/index.php/us/resources/downloads?func=download&id=53&chk=02a44f5d0d8a2944df16903b3d55d322&no_html=1"
- extract the tarball of sheevaplug-installer:
# tar xzf sheevaplug-installer-v1.0.tar.gz
- tar your h:1 in the work directory into a rootfs.tar.gz file which is in the installer directory of the sheevaplug-installer:
# cd workdir # tar czpf ../sheevaplug-installer-v1.0/installer/rootfs.tar.gz *
Next .. usb device.
Prepare files on the usb device
Format a fat filesystem on the first partition of your usb device, then mount it and copy the root file-system / kernel / kernel modules / init ramdisk of the sheevaplug-installer installer directory on it and umount usb device (for this example the usb device will be at /dev/sdb1):
# mkfs.vfat /dev/sdb1
# mount /dev/sdb1 /mnt/usb
# cp ../sheevaplug-installer-v1.0/installer/{rootfs.tar.gz,uImage,modules.tar.gz,initrd} /mnt/usb
# sync
# umount /mnt/usb
flashing the Sheeva
- stop the countdown of u-boot to get the prompt of the SheevaPlug (see here for more information about how to do it),
- connect your usb device to the SheevaPlug,
- on your computer, go to the root directory of the sheevaplug-installer and run runme.php:
# cd ../sheevaplug-installer-v1.0 # php runme.php
- wait a while, then at the end of the execution of runme.php, look at your serial terminal. hackable:1 will be installed into the flash.
- look at the hackable1 login: and have fun.
