Motherboard Upgrade Firmware

From Wiki for Dragino Project
Revision as of 08:08, 17 April 2012 by Edwin1123 (Talk | contribs)

Jump to: navigation, search

Latest firmware of Dragino can be found here.

You can also compile your customized firmware. see HowTo -- Compile firmware for Dragino?

For different situation, there are several methods to flash the firmware of a Dragino.

Upgrade firmware in Redboot -- for Windows/Linux/MAC

This upgrade method is good to recover the Dragino firmware in a Windows machine. It requires that the Dragino and your computer in the same network.

  • Copy openwrt-atheros-vmlinux.lzma and openwrt-atheros-root.squashfs to your tftp server, defautl tftp server set in Redboot is 192.168.255.2. so you would better set your tftp server address to 192.168.255.2 or you have to change the Redboot tftp server ip via ip_addr command.
  • Access Redboot via Telnet
  • run below commands to flash
RedBoot> fis init
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
RedBoot> fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-root.squashfs
RedBoot> fis create rootfs
RedBoot> reset

Upgrade firmware use Linux AP51 tool

This upgrade method is simple and fast before dispatch Dragino from warehouse. It also useful to recover the Dragino firmware using this method.

  • Download the AP51 tool from http://svn.dragino.com/tools/
  • Disable wifi interface of your Linux machine
  • Connect the Dragino LAN port directly to your Linux machine.
  • Run:
./ap51-flash eth0 openwrt-atheros-root.squashfs openwrt-atheros-vmlinux.lzma

Linux will search Dragino in the ethernet port and do upgrade.

  • Power on Dragino, AP51-flash will auto detect and upgrade the Dragino. below is output of this upgrade


Upgrade firmware via Linux

This upgrade method is good for a remote firmware upgrade when Dragino is running.

1. Transfer the .squashfs and .lzma files to the Dragino MS12

[edwin$host ]$ scp bin/openwrt-atheros-vmlinux.lzma root@dragino:/tmp
[edwin$host ]$ scp bin/openwrt-atheros-root.squashfs root@dragino:/tmp

2. look up flash blocks

root@dragino:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "RedBoot"
mtd1: 000b0000 00010000 "vmlinux.bin.l7"
mtd2: 00300000 00010000 "rootfs"
mtd3: 000c0000 00010000 "rootfs_data"
mtd4: 0000f000 00010000 "FIS directory"
mtd5: 00001000 00010000 "RedBoot config"
mtd6: 00010000 00010000 "boardconfig"

3. write kernel image:

root@dragino:/tmp# mtd write /tmp/openwrt-atheros-vmlinux.lzma vmlinux.bin.l7

4. write rootfs:

root@dragino:/tmp# mtd write /tmp/openwrt-atheros-root.squashfs rootfs

5. reboot

root@dragino:/tmp# reboot

NOTE when you reflash the rootfs network settings will return to default, e.g. an LAN IP of 192.168.255.1