User Tools

Site Tools

This wiki is read only and for archival purposes only. >>>>>>>>>> Please use the new OpenWrt wiki at <<<<<<<<<<


J'ai installé avec succès BARRIER BREAKER (Bleeding Edge, r40579) dans la carte NAND du SheevaPlug et et j'espère que ces quelques notes vous permettrons de reproduire mon travail.

Il y a pas mal d'avantage a mettre l'OS dans la NAND , par exemple

  • Avoir un system qui peux êtres éteinds comme un modem
  • Utiliser un disque externe et activer le "Spin down" (arrêt des disques dures) afin de rédure le bruit
  • Avoir un système qui redémarre rapidement, c'est une très bonne chose pour un PABX
  • Etc …

Maleureusement, il n'y a pas d'image tout faite à télécharger pour le SheevaPLug .

Mais le portage est simple, il suffit de générer le fichier openwrt-kirkwood-uImage après avoir activé le support pour la carte mère du SheevaPlug

Ce que vous devez prendre en compte

  1. Le support jffs2-nand est disponible que dans la branche "trunk"
  2. L'espace réservé par défaut par u-boot pour le system de fichier root , est trop petit.
  3. Ne jamais utiliser d'image pour u-boot venant de OpenWrt, ça bloquerai temporairement votre votre plug


That look a bad jock, but in fact when i have start the SheevaPlu port, have read only they doc, it have all the necessary for build thing for you own devices.

  1. you will be using OpenWrt Buildroot for this, so read about it
  2. pull OpenWrt Buildroot per svn/git and install its prerequisites on your system: OpenWrt Buildroot – Installation
  3. see howto use it OpenWrt Buildroot – Usage
  4. in case questions pop up, cf. OpenWrt Buildroot – Technical Reference (Work in Progress)

Debian 7 :

sudo apt-get install libncurses5-dev zlib1g-dev gawk subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc

Note: If you simply and swiftly want to cross compile a program, see crosscompile.


1. Pull OpenWrt Buildroot and install its dependencies

2. Pull sources for BARRIER BREAKER

cd ~
mkdir -p ~/openwrt
cd ~/openwrt
svn checkout svn://
cd trunk

make menuconfig
  - Target System ---> Marvell Kirkwood
  - Target Profile ---> Generic (default)
  - Save and Exit
make kernel_menuconfig
  - System Type  ---> Marvell Kirkwood Implementations  --->
 [*] Marvell eSATA SheevaPlug Reference Board
 [*] Marvell SheevaPlug Reference Board
  - Save and Exit

./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq
make oldconfig

make menuconfig
  - LuCI  ---> 1. Collections  ---> <*> luci-ssl
  - Target Images  ---> [*] jffs2 for NAND
  - Save and Exit

Then we start the compilation


It result a minimal and fonctional system , but that probably a worng thing to stop you work here. The better is build all others aviable packages as module, especially kernel-modules. That because lot of packages can depends of kernel sign. That can take days to generate all packages as opkg format, but that a good way for never have to recompile anything.

3. Prepare a tftp server

Unfortunally for you i have use a tftp server for inject both kernel et rootfs image on the SheevaPlug NAND. I have use Debian 7 host for all my test, then the exemple is for GNU/Linux system. For other OS it should be possible, you just have to put openwrt-kirkwood-uImage and openwrt-kirkwood-generic-jffs2-nand-2048-128k.img on the "root" of you tftp server.

apt-get install tftpd-hpa

Take a look on /etc/default/tftpd-hpa file , it should look like that:

# /etc/default/tftpd-hpa
TFTP_OPTIONS="--secure --verbose"
/etc/init.d/tftpd-hpa restart
[ ok ] Restarting HPA's tftpd: in.tftpd.

copy openwrt-kirkwood-uImage and openwrt-kirkwood-generic-jffs2-nand-2048-128k.img on /srv/tftp/ directory

cp ./bin/kirkwood/openwrt-kirkwood-uImage /srv/tftp/
cp ./bin/kirkwood/openwrt-kirkwood-generic-jffs2-nand-2048-128k.img /srv/tftp/

Very hard , that all

4. Deal with u-boot

You probably have to update you u-boot , you can found it here: And you should follow that doc:

Never use the u-boot file generate by OpenWrt SDK, or found on anywhere of OpenWrt, that simply breack you device. Prefere Debian u-boot file.

  1. Connect the sheevaPlug MiniUSB to a USB port of you computer
  2. Open a terminal session
  3. Use screen or Minicom

screen /dev/ttyUSB0 115200

Start by creat a backup of you u-boot environement variables, by printenv and copy past the result inside you favorite text editor.

Marvell>> printenv

Unset almost every variables by use : sentenv VARIABLE_NAME '' when it's pretty clean inject it environement setting :

 setenv loadaddr '0x6400000'
 setenv console 'console=ttyS0,115200 panic=20'
 setenv bootargs_root 'root=/dev/mtdblock2 rootfstype=jffs2'
 setenv kernel_name 'openwrt-kirkwood-uImage'
 setenv rootfs_name 'openwrt-kirkwood-generic-jffs2-nand-2048-128k.img'
 setenv download_kernel 'mw $(loadaddr) 0xffff 0x300000; tftp $(loadaddr) $(kernel_name);'
 setenv flash_kernel 'nand erase 0x100000 0x400000; nand write.e $(loadaddr) 0x100000 0x400000;'
 setenv download_rootfs 'mw $(loadaddr) 0xffff 0x200000; tftp $(loadaddr) $(rootfs_name);'
 setenv flash_rootfs 'nand erase 0x500000 0xfb00000; nand write.e $(loadaddr) 0x500000 0x900000;'
 setenv load_openwrt 'setenv bootargs $(console) $(bootargs_root); nand read $(loadaddr) 0x100000 0x400000; bootm $(loadaddr)'
 setenv bootcmd 'run load_openwrt'
 setenv arcNumber '2097
If you have an eSATA SheevaPlug »> you have to inform u-boot «< If you have an eSATA SheevaPlug, type:
setenv machid a76
Found you ethadd and replace 'XX:XX:XX:XX:XX:XX' by you true Mac Addr, you can found with you MAC Addr on a sticker put on the back of you device
 setenv ethaddr 'XX:XX:XX:XX:XX:XX'
As you imagine you should save you setting
If you have dhcp it inject tftp informations:
 dhcp;run download_kernel;run flash_kernel;run download_rootfs;run flash_rootfs;reset;
 setenv ipaddr ''
 setenv serverip ''
 run download_kernel;run flash_kernel;run download_rootfs;run flash_rootfs;reset;
where ipaddr is you IP adress on you network, and serverip the TFTP server IP adress on you network.

5. Frist boot

At frist boot, the Filesytem ill take a moment to grow the rootfs partition to MAX size, ot can be slow (5 minutes)


Download a valide u-boot from here :

cd $HOME

Install openocd for can unbrike you SheevaPlug device.

sudo apt-get update && apt-get install openocd telnet screen

Power connect the SheevaPlug and connect the miniusb port to you computer.

Open a terminal session and intitialize openocd:

#openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg -s /usr/share/openocd/scripts

Open On-Chip Debugger 0.5.0 (2011-08-09-08:45)
Licensed under GNU GPL v2
For bug reports, read
Info : only one transport option; autoselect 'jtag'
2000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
Warn : use 'feroceon.cpu' as target identifier, not '0'
Info : clock speed 2000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: feroceon.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Error: unexpected Feroceon EICE version signature

Download a valide u-boot.elf Copy it on you home Open a other terminal session and connect you with telnet on localhost 4444.

user@youhost:~$ telnet localhost 4444
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
You optain a prompt, that the moment to inject a valide u-boot and write it on the NAND.
reset;sheevaplug_init;load_image u-boot.elf;resume 0x00600000

Now you can see Uboot starting to run "screen /dev/ttyUSB0 115200" you are ready to start restoring your plug.

Refference Documents:;wap2


I don't provide any image that because my images, don't respect default OpenWrt configuration, i have totaly make my own thing, via the amazing OpenWrt SDK. That still a OpenWrt thing, but ready out of the box for my personal usage, here what i have do:

 Compile nativelly the entire GNU core Utile, and not install busybox
 Compile nativelly NTPD
 Compile nativelly SSHD and not install dropbear
 Compile nativelly Asterisk 11 - chan_sscp-b
 Compile nativelly DJBDNS and not dnsmasq then not install dhcp server thing
 Compile nativelly StrangSwan an IPSEC thing
 Not install Luci
 Inject all my default config file, via the ./script/env and ./file/ firectory

fr/sheevaplug.txt · Last modified: 2014/05/04 15:26 by tuux