Author Archives: vonger

Fix Totally bricked VoCore2 by another VoCore2

Finally I have a chance to write this tutorial. I want use this blog to show you a simple way to fix a totally bricked VoCore2 or uboot dead VoCore2.

This is the principle, we are using a SPI flash, so we should fix it using SPI interface.

wire 5 is important, that keep bricked vocore2 flash in “dead” status.


Normal VoCore2 ==== Bricked VoCore2
1. +3.3V     ======== +3.3V
2. SPI CS1   ======== SPI CS0
3. SPI MOSI  ======== SPI MOSI
4. SPI MISO  ======== SPI MISO
5. GND       ======== PORST(RESET)
6. SPI CLK   ======== SPI CLK
7. GND       ======== GND


You will need the following items to do this:

  1. 1x working VoCore2(Normal VoCore2).
  2. 7x wires.


Compile a firmware with second spi flash.
Update ~/openwrt/target/linux/ramips/dts/VOCORE2.dts palmbus section to enable second SPI flash.
A sample of my DTS and compiled firmware:

Upgrade your working VoCore2 with the new firmware.

Connect every wire.

Here is my connection:


If everything correct, you will find the second SPI flash from normal VoCore2 once it boot up:

[    0.280000] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.290000] m25p80 spi32766.0: found w25q128, expected en25q64
[    0.300000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.300000] m25p80 spi32766.0: using chunked io
[    0.310000] 4 ofpart partitions found on MTD device spi32766.0
[    0.320000] Creating 4 MTD partitions on "spi32766.0":
[    0.320000] 0x000000000000-0x000000030000 : "u-boot"
[    0.330000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.330000] 0x000000040000-0x000000050000 : "factory"
[    0.340000] 0x000000050000-0x000000800000 : "firmware"
[    0.380000] 2 uimage-fw partitions found on MTD device firmware
[    0.380000] 0x000000050000-0x0000001682fe : "kernel"
[    0.390000] 0x0000001682fe-0x000000800000 : "rootfs"
[    0.390000] mtd: device 5 (rootfs) set to be root filesystem
[    0.400000] 1 squashfs-split partitions found on MTD device rootfs
[    0.410000] 0x0000006c0000-0x000000800000 : "rootfs_data"
[    0.420000] m25p80 spi32766.1: found gd25q64, expected en25q64
[    0.420000] m25p80 spi32766.1: gd25q64 (8192 Kbytes)
[    0.430000] m25p80 spi32766.1: using chunked io
[    0.430000] 1 ofpart partitions found on MTD device spi32766.1
[    0.440000] Creating 1 MTD partitions on "spi32766.1":
[    0.440000] 0x000000000000-0x000001000000 : "attached"
[    0.450000] mtd: partition "attached" extends beyond the end of device "spi32766.1" -- size truncated to 0x800000
[    0.470000] ralink_soc_eth 10100000.ethernet: generated random MAC address 3a:20:00:a8:c9:ce
[    0.480000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5

I rename the second flash to “attached”, yours might slightly different, my second flash is VoCore2 Lite 8MB flash, so it shows “size truncated to 0x800000”, this is not a big issue, just ignore it.

Download flash image from, this is for VoCore2(not lite), or you can download and compile uboot from, write uboot to it and use uboot to load other data.

Using scp or other file upload tool copy the image to the normal VoCore2 memory(/tmp/).

Now we can call “mtd -e attached write /tmp/ultimate.16m.img attached”, this command is used to erase all data in the bricked VoCore2 flash, and write the new image to it. After this is done, you can disconnect your bricked VoCore2, and connect it to power, it should work normal.

Note: after the flash, your factory setting will be erase too. Before you call mtd erase the flash, first you could call “cp /dev/mtd7 /tmp/mtd7 and download mtd7 to your local disk as a backup of the hole flash, then later you can copy factory setting out of mtd7 from its partition(factory: partition@40000, size 0x10000).

If you find any issue or blocked at any part of the blog, please leave a message in comment, I will fix it in time. 🙂

Update May.20: download the image from is not necessary. We can cat /proc/mtd in normal vocore2

dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00fb0000 00010000 "firmware"
mtd5: 00e73d2d 00010000 "rootfs"
mtd6: 00c50000 00010000 "rootfs_data"

find “All” is mtd0, this image is working, so we can use “cp /dev/mtd0 /tmp/mtd0”, then use “mtd -e attached write /tmp/mtd0 attached” to clone the flash. At this point, must notify the image size better not exceed the flash size, or might cause boot fail.

VoCore2: Hack the Driver

Current VoCore2 default are using a blob wifi driver from link-it. So it is not very stable sometimes. Recently I just find MTK OPENWRT source code online and find there is an open-sourced wifi driver just in the dl folder, which is tested to be very stable. 🙂 Wahaha, let start the hack!!

Here is the clone of the source: (I find it by searching baidu(link here:, do not know wether or not ralink intent to public this, if not, please email to I will delete it. This source is only for study. )

I will spend hours on this driver everyday, and will show what I find on my blog. :p

Fix VoCore2 LuCI no WPA Issue


Everything works, just add two lines to file: /usr/lib/lua/luci/model/cbi/admin_network/wifi.lua

+encr:value("psk", translate("WPA PSK"), {mode="ap"}, {mode="sta"})
+encr:value("psk2", translate("WPA2 PSK"), {mode="ap"}, {mode="sta"})


Here is the patch:

--- a/usr/lib/lua/luci/model/cbi/admin_network/wifi.lua
+++ b/usr/lib/lua/luci/model/cbi/admin_network/wifi.lua 

@@ -689,6 +689,8 @@
encr:value("none", "No Encryption")
encr:value("wep-open", translate("WEP Open System"), {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"}, {mode="ahdemo"}, {mode="wds"})
encr:value("wep-shared", translate("WEP Shared Key"), {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"}, {mode="ahdemo"}, {mode="wds"})
+encr:value("psk", translate("WPA PSK"), {mode="ap"}, {mode="sta"})
+encr:value("psk2", translate("WPA2 PSK"), {mode="ap"}, {mode="sta"})

if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
local supplicant = fs.access("/usr/sbin/wpa_supplicant")


I will add this patch to later firmware at Apr 🙂

Lite: Shipping…

Just in short, we are shipping them 😉

Once it is online(around next Monday), please trace it at bottom of by your email.

PoE Version Ready

Finally find the problem, it is simple and stupid, I place an electrolytic capacitor at wrong direction… 🙂

Continue do more test…Hopefully tomorrow I will get good result.

PS: we contacted the factory about the lite version, sadly, they find the sample is not work, reason is simple,  crystal and a capacitor are short circuit, have to delay two days.

VoCore2: Process..

Good news is VoCore2 Lite batch almost done 🙂 The factory will start test them tomorrow,  and we can ship all of them in this month.

Bad news is I get a lot of trouble when develop the PoE version… The heat, the strong EMC all solved but still something wrong.. Just feel like back to the noob time. :'(

I know, you know, everybody knows, as a developer,  we always have couple of days every month — everywhere is a dead end…

Hope this pass soooon…

This is also why I love this job.

can not write anymore…work, work 🙂

VoCore2 Firmware: Compile from Source

How stupid I am… I could do this months ago. Just remove the folder named bin, staging_dir, build_dir, dl, then compress, the source code is small enough to download.


1. install Ubuntu 14.04 64bit Server to Virtual Machine.

2. in virtualbox, we will need install some packages to compile openwrt:

sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev libssl-dev python

3. download openwrt at

4. call “tar -jxvf openwrt.tar.bz2” to uncompress the package.

5. call “make menuconfig” in the openwrt folder, configure openwrt in menu, choose MT7688/28/VoCore2 in menu.

6. call “make” in the openwrt folder, start the make process


PS: recently I have no word about the lame post carrier…

VoCore2: EAGLE version PCB

Now, we convert the raw PCB file to EAGLE. I guess this should help a lot of people who are using EAGLE 🙂

Source could download here:, in the zip file name is vocore-eagle.pcb.


VoCore2: Convert into NAS

It is very simple to make SD card or a hard disk into Network Attached Storage.

Here is mine: I use it as a tiny git server to storage code, save some money to rent the private cloud on github 🙂

1. insert your microsd card(or USB disk) to VoCore2


once you insert the card or disk, you will find it mounted in /mnt.

Screen Shot 2016-12-02 at 09.24.02
mmcblk0p2 is for the SD card, sda2 is for USB disk.

2. setup ap+sta: read this blog
Or read the tutorial on not forget setup /etc/config/firewall).

3. enable samba on VoCore2(latest firmware already have samba, please download at

Screen Shot 2016-12-02 at 09.23.04

Screen Shot 2016-12-02 at 09.24.37
Fill the path and any name you want, enable guest will allow everybody in your network view the share folder, be careful.
Note: do not forget click “Save & Apply”.

4. Now you can find your NAS every where 🙂

On Mac or PC:
Screen Shot 2016-12-02 at 09.57.37

note1: you might need to setup your VoCore2 local ip. mine is
uci set samba.@samba[0].interface=’ lo br-lan’
uci commit samba
/etc/init.d/samba restart

note2: you might need to setup your VoCore2 firewall.

On Phone: