Table of Contents
Install
For the installation midge to your router, you should go by following steps:
Download
See Download section
Upload firmware
There is way to direct upload firmware over HTTP. But you can try
- HTTP Upgrade by Petr Novak way (very old and deprecated)
Upload firmware to the router over console cable
Currently you can upload firmware over serial console_cable (but i have plans to add web-upgrade support)
- Connect console cable to PC
- Start terminal program (minicom, HyperTerminal, etc)
- Setup 115200 8N1, no hardware handshaking
- Turn on power to the router
- On screen you will see prompt
ADM5120 Boot:
- Quickly press space 3 times, you should see following menu:
ADM5120 Boot: <--- press space 3x times Linux Loader Menu ==================== (a) Download vmlinuz to flash ... (b) Download vmlinuz to sdram (for debug) ... (c) Exit Please enter your key :
- Press ‘a’
In case of problems if you using minicom
- wait ~7 secs after press of (a) in bootloader and before press of Ctrl-Z in minicom
- type some junk after press of (a) in bootloader and before press of Ctrl-Z in minicom
- power off and on your router
- additional hints for minicom you find here: minicom
- try to use download script
- Transmit firmware file with XMODEM
- After transmitting you should see following picture:
Downloading.......................PASS Eraseing nor flash.......PASS Programming nor flash...PASS Linux Loader Menu ==================== (a) Download vmlinuz to flash ... (b) Download vmlinuz to sdram (for debug) ... (c) Exit Please enter your key :
- Press ‘c’ to exit
Please enter your key : c jump to linux code!! LINUX started... ADM5120 Demo board CPU revision is: 0001800b Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes. Primary data cache 8kB, 2-way, linesize 16 bytes. Linux version 2.4.31-MIPS-01.00 (vlad@woody) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110.1)) #116 5 am5120_setup() starts. System no PCI BIOS Determined physical RAM map: memory: 00e4d000 @ 001b3000 (usable) On node 0 totalpages: 4096 zone(0): 4096 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs ro panic=10 console=ttyS0 CPU clock: 175MHz Using 87.500 MHz high precision timer. Calibrating delay loop... 174.48 BogoMIPS Memory: 14460k/14644k available (1319k kernel code, 184k reserved, 88k data, 68k init, 0k highmem) Dentry cache hash table entries: 2048 (order: 2, 16384 bytes) Inode cache hash table entries: 1024 (order: 1, 8192 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 4096 (order: 2, 16384 bytes) Checking for 'wait' instruction... available. POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. Squashfs 2.1-r2 (released 2004/12/15) (C) 2002-2004 Phillip Lougher pty: 256 Unix98 ptys configured Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky MX29LV320B flash device: 200000 at 1fc00000 Amd/Fujitsu Extended Query Table v1.0 at 0x0040 number of CFI chips: 1 cfi_cmdset_0002: Disabling fast programming due to code brokenness. Creating 6 MTD partitions on "MX29LV320B flash device": 0x00000000-0x00008000 : "Boot Partition" 0x00010000-0x000b0000 : "Kernel" 0x000b0000-0x00130000 : "Root FS" 0x00130000-0x00200000 : "Data FS" 0x00100000-0x00200000 : "#0x00100000-0x00200000" 0x00010000-0x00200000 : "#Kernel-End" MX29LV320B flash device initialized Initializing Cryptographic API NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 1024 bind 2048) ip_conntrack version 2.1 (128 buckets, 1024 max) - 296 bytes per conntrack ip_tables: (C) 2000-2002 Netfilter core team NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> LED & GPIO Driver v1.1 VFS: Mounted root (squashfs filesystem) readonly. Freeing prom memory: 0kb freed Freeing unused kernel memory: 68k freed init started: BusyBox v1.00 (2005.08.04-09:04+0000) multi-call binary Algorithmics/MIPS FPU Emulator v1.5 Info: MIDGE_TYPE is jffs2 jffs2.bbc: SIZE compression mode activated. jffs2.bbc: enabling a compressor... done. jffs2.bbc: disabling a compressor... done. Info: Checking for first boot... Info: This is first boot! Info: Erasing partition /dev/mtdblock3 832+0 records in 832+0 records out Info: Unpacking /etc/sceleton.tar.gz to /jffs... tar: Short read Info: Making symlinks... Info: Syncing... Info: Mounting tmpfs to /ram Info: Generating random mac address... Using /lib/modules/2.4.31-MIPS-01.00/kernel/drivers/net/adm5120sw.o ADM5120 Switch Module Init Initializing random number generator... done. Starting network... Generating RSA Key... Will output 1024 bit rsa secret key to '/etc/dropbear/dropbear_rsa_host_key' Generating key, this may take a while... Public key portion is: ssh-rsa AAAA Fingerprint: md5 aa:fa:b7:5f:05:23:53:aa:4e:09:ad:db:10:0c:58:2d Generating DSS Key... Will output 1024 bit dss secret key to '/etc/dropbear/dropbear_dss_host_key' Generating key, this may take a while... Public key portion is: ssh-dss DDDD Fingerprint: md5 f4:76:d0:0d:2e:f3:22:48:87:af:48:63:6f:39:28:86 Starting dropbear sshd: OK Syncing time... Error: /etc/network/fw: iptables is required Starting crond: OK Jan 1 02:00:59 crond[799]: crond 2.3.2 dillon, started, log level 8
Login
- login as root and password midge
Change parameters
- password
- /etc/hostname
- /etc/network/interfaces
- /etc/resolv.conf
- /etc/midge.conf
- /etc/ipkg.conf (optional) - see Packages section
Enjoy
Outdated
Upgrade
midge has /sbin/upgrade script which can be used for upgrade:
- initial root filesystem
- kernel
- and whole firmware (kernel + initfs + blank jffs2)
On upgrading firmware completely, you will loss data on your root filesystem
After upgrade you should reboot device by power OFF/ON (root jffs2 partition will be broken)
You can change upgrade server and dir in /etc/midge.conf
UPGRADE_SERVER=http://midge.vlad.org.ua UPGRADE_DIR=firmware
examples
Usage
midge# upgrade Usage: /sbin/upgrade initfs|kernel|firmware
Upgrading inital rootfs
midge# upgrade initfs Upgrading initial root file system... Connecting to midge.vlad.org.ua[212.1.120.85]:80 initfs-jffs2-latest. 100% |*****************************| 504 KB 00:00 ETA 7+1 records in 7+1 records out
After upgrade initial root filesystem you should reboot or you can get unpredictable result
Upgrading linux kernel
midge# upgrade kernel Upgrading kernel... Connecting to midge.vlad.org.ua[212.1.120.85]:80 vmlinuz-jffs2-latest 100% |*****************************| 615 KB 00:00 ETA 9+1 records in 9+1 records out
