follow me on Twitter

    OpenWRT snapshot by night

    Dovendo ricondizionare ( :-P ) una fonera per un amico ho deciso di provare questo famigerato tool "AP51 Easy Flash" che automatizza completamente la procedura (rootfs, kernel):
    
    rpl@ubik:~/Works/fon2200$ sudo ./ap51-flash-fonera-1.0-38 eth0 \
     openwrt-atheros-2.6-root.jffs2-64k openwrt-atheros-2.6-vmlinux.lzma
    Reading rootfs file openwrt-atheros-2.6-root.jffs2-64k with 1835008 bytes...
    Reading kernel file openwrt-atheros-2.6-vmlinux.lzma with 786432 bytes...
    rootfs(0x006e0000) + kernel(0x000c0000) + nvram(0x00000000) sums up to 0x007a0000 bytes
    Non arp received. Make sure, the device is connected directly!
    Peer MAC: 00:18:84:81:5d:9c
    Peer IP : 192.168.1.1
    Your MAC: 00:ba:be:ca:ff:ee
    Your IP : 192.168.1.0
    Setting IP address...
    Loading rootfs...
    Sending rootfs, 3584 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...
    
    Miiiii che noia fa praticamente tutto lui :-(

    Vi toglie tutta l'emozione e il divertimento... come vedere un film conoscendone già il finale :-(((

    tra l'altro la seconda revisione della fonera (FON2200) ha già redboot attivo e quindi non è nemmeno necessario utilizzare hack per aprire ssh, cambiare kernel etc. etc. :-'(

    Se è la vostra "prima volta" vi consiglio caldamente la procedura manuale (http://wiki.ninux.org/LaFoneraDallaScatolaAOpenWrt), molto più divertente :-D

    beh... cosa vedo li sulla porta 80? webif installato di default... diamogli un occhiata, mai provato prima...
    ...
    http://192.168.1.1/
    ...
    Network
    ...
    Host
    ... SBAM
    
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    /bin/sh: nvram: not found
    Content-Type: text/html; charset=UTF-8
    Pragma: no-cache
    
    ...
    
    <div class="warning">WARNING: This page has not been updated or
    checked for correct functionality under Kamikaze.</div>
    ...
    
    Miiii... funziona bene ;-)
    al secondo menù ho già beccato una pagina non funzionante?

    aggiorniamo? aggiorniamo!
    magari prima dovremmo correggere i repository?!?!??!
    st'immagine fa proprio... beh il "bello" degli snapshot è l'emozione ;-)
    
    #src snapshots http://downloads.openwrt.org/snapshots/atheros-2.6/packages
    src snapshots src snapshots http://ipkg.k1k2.de/packages/
    src packages http://downloads.openwrt.org/kamikaze/packages/mips
    dest root /
    dest ram /tmp
    src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages
    
    ORA aggiorniamo:
    
    root@OpenWrt:/etc# ipkg update
    Downloading http://ipkg.k1k2.de/packages//Packages
    Updated list of available packages in /usr/lib/ipkg/lists/snapshots
    Downloading http://downloads.openwrt.org/kamikaze/packages/mips/Packages
    Updated list of available packages in /usr/lib/ipkg/lists/packages
    Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/Packages
    Updated list of available packages in /usr/lib/ipkg/lists/X-Wrt
    Done.
    root@OpenWrt:/etc# ipkg upgrade
    Upgrading busybox on root from 1.4.2-3 to 1.8.2-1...
    Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./busybox_1.8.2-1_mips.ipk
    ipkg: fork failed: Cannot allocate memory
    
    scusa scusa... faccio fuori qualcosa?... httpd?
    
    root@OpenWrt:/etc# /etc/init.d/httpd stop
    Terminated 
    insisti insisti che alla fine ce la farà...
    
    root@OpenWrt:/etc# ipkg upgrade
    ....
    root@OpenWrt:/etc# ipkg upgrade
    ....
    root@OpenWrt:/etc# ipkg upgrade webif
    
    
    ohhh.... facciamo ripartire httpd:
    
    root@OpenWrt:/etc# /etc/init.d/httpd start
    /etc/rc.common: eval: line 1: uci_set_default: not found
    
    ti piacerebbe!!!
    googla di qua e googla di la mi sa che il nuovo webif fa uso di funzionalità inserite nei nuovi uci e base-files (https://dev.openwrt.org/changeset/10086)...

    Aggiorniamo?.... beh...
    
    root@OpenWrt:~# ipkg upgrade uci
    Installing uci (0.3.0-1) to root...
    Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./uci_0.3.0-1_mips.ipk
    Installing libuci (0.3.0-1) to root...
    Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./libuci_0.3.0-1_mips.ipk
    Configuring libuci
    Done.
    Collected errors:
    Package uci wants to install file /lib/config/uci.sh
           But that file is already provided by package base-files-atheros-2.6
    
    prego prego sovrascrivi:
    
    root@OpenWrt:~# ipkg upgrade uci -force-overwrite 
    Installing uci (0.3.0-1) to root...
    Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./uci_0.3.0-1_mips.ipk
    Configuring uci
    Done.
    root@OpenWrt:~#
    
    e ora il passo delicato (della serie "attento a cosa sovrascrivi e fare un diff non fa mai male"):
    
    root@OpenWrt:~# ipkg install base-files-atheros -force-overwrite
    ....
       Configuration file '/etc/passwd'
       ==> File on system created by you or by a script.
       ==> File also in package provided by package maintainer.
          What would you like to do about it ?  Your options are:
           Y or I  : install the package maintainer's version
           N or O  : keep your currently-installed version
             D     : show the differences between the versions (if diff is installed)
        The default action is to keep your current version.
       *** passwd (Y/I/N/O/D) [default=N] ?n
    
    
    ed ora?
    
    root@OpenWrt:~# /etc/init.d/httpd start
    root@OpenWrt:~# 
    
    ohhhh... riproviamo:
    ...
    http://192.168.1.1/
    ...
    Network
    ...
    Host
    ...
    NOW IT'S WORK ;-)

    0 commenti:

    View Luca Greco"s profile on LinkedIn

    Rpl

    La mia foto
    Lecce, Italy
    Fulltime Coder and *nix BOFH