J'ai rencontré quelques soucis en utilisant le binaire ap51-flash-fonera-1.0-42 fourni par le projet FreiFunk... à cause de la version de libpcap linkée :

$ ./ap51-flash-1.0-42 
./ap51-flash-1.0-42: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory

Le binaire fourni par openwrt est compilé pour un GNU/Linux 32bits or j'utilisais une Ubuntu 64bits (karmic) : j'ai donc recompilé une version 64bits de ap51-flash. Je fournis le binaire compilé ap51-flash 64 bits, sinon il est assez simple de le recompiler soi-même :

  • installer les librairies de développement libpcap
# apt-get install libpcap libpcap-dev
  • récupérer les sources sur le svn :
$ svn co http://dev.open-mesh.com/downloads/svn/ap51-flash/trunk ap51-flash
$ make

Voilà, vous avez une version 64 bits pour flasher vos foneras :)

  • Quelques commandes pour vérifier :
$ file ap51-flash
ap51-flash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
$ ldd ap51-flash
	linux-vdso.so.1 =>  (0x00007ffff0bfe000)
	libpcap.so.0.8 => /usr/lib/libpcap.so.0.8 (0x00007fa7e8602000)
	libc.so.6 => /lib/libc.so.6 (0x00007fa7e8293000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa7e8837000)
$ file p51-flash-fonera-1.0-42
p51-flash-fonera-1.0-42: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped 
$ ldd ap51-flash-1.0-42 
	linux-gate.so.1 =>  (0xf7ef7000)
	libpcap.so.0.8 => not found
	libc.so.6 => /lib32/libc.so.6 (0xf7d84000)
	/lib/ld-linux.so.2 (0xf7ef8000)

Si tout se passe bien, vous devriez avoir ces messages au lancement de ap51-flash :

$ ./ap51-flash eth0 openwrt-atheros-root.squashfs openwrt-atheros-vmlinux.lzma
[...]
Non arp received. Make sure, the device is connected directly!
Non arp received. Make sure, the device is connected directly!
No packet.
Peer MAC: 00:18:XX:XX:XX:XX
Peer IP : 192.168.1.254
Your MAC: 00:ba:YY:YY:YY:YY
Your IP : 192.168.1.0
Setting IP address...
Loading rootfs...
Sending rootfs, 3328 blocks...
Initializing partitions...
Rootfs partition size now 0x006f0000
Flashing rootfs...
Loading kernel...
Sending kernel, 1536 blocks...
Flashing kernel...
Setting boot_script_data...
Done. Restarting device...