VoCore & OpenWrt

Thank you for everybody support on indiegogo at first :)
That campaign on indiegogo is really out of my imagination. I just want to sell about 300 pieces so I can send it to factory.

This article will tell you how to make OpenWrt working on VoCore. In fact, it is not that hard. I do not need to change a word in source code. That is benefited by RT5350 is a stable chip for years and it has already been fully supported by OpenWrt.

First: Prepare a Linux System
MacOS(Unix) could do that too, but it will cost much more time to prepare, just ignore it.

This is my VM(VirtualBox) of debian on my MacOS.


Second: Prepare Tools for OpenWrt
This is easy to be find on Google. I just copy some from other websites.

sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install binutils
sudo apt-get install patch
sudo apt-get install bzip2
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install make
sudo apt-get install autoconf
sudo apt-get install gettext
sudo apt-get install unzip
sudo apt-get install subversion
sudo apt-get install libncurses5-dev
sudo apt-get install ncurses-term
sudo apt-get install zlib1g-dev
sudo apt-get install gawk
sudo apt-get install git-core
sudo apt-get install libz-dev

Third: Prepare OpenWrt Source Code
This OpenWrt wiki will help: https://dev.openwrt.org/wiki/GetSource

Fourth: Prepare Feeds for OpenWrt
(LuCI interface is one of the feeds)
Goto openwrt source code folder, then call:

./scripts/feeds update –a
./scripts/feeds install –a

Fifth: Compile OpenWrt

make menuconfig


Target System: Ralink RT288x/RT3xxx
RT5350 is based on RT288x
Subtarget: RT3x5x/RT5350 based boards
It is obviously, VoCore is based on RT5350
Target Profile: VoCore
Current OpenWrt source do not have this config yet, will try to commit my VoCore profile to OpenWrt soon. Other RT5350 profiles are compatible with VoCore, for example, before I write VoCore dts, I just use “Poray X8” instead.

Just keep rest of the menuconfig to default, then save & exit, call make…
Have to wait a long time, OpenWrt will download every source code and make everything for you from source code. The Cross Compiled Toolchain will be made from source code too, that is awesome, I have tried to compiled Cross Compiled Toolchain by myself three years ago for S3C2440 board, but failed. :)
OpenWrt is really good, the hole process is that complex but there is no error.

Final: Send BIN to VoCore
After compiled openwrt, there is a folder named bin/ramips, there are many bins.
Just ignore most of them, focus on the files named openwrt.XXXXXXXX.sysupgrade.bin.
Send it to VoCore has four ways:
1. I have a USB SPI flash writer, so it is able to write data to flash directly, then solder the flash onto VoCore, that is used for an empty flash or bricked VoCore. If you do not want to solder that, just buy a simple tool that mentioned in my former blog.
NOTIFY: that bin is just firmware data, so we need to combine it with uboot, factory setting then burn it to SPI flash.
2. If there are already boot loader exists, tftp/kermit the bin to firmware.
3. If old firmware exists:

mtd -r write openwrt.XXXXXXXX.sysupgrade.bin firmware

4. JTAG, it might be possible but I did not test.

Addition: Compile Your Own App
Just check this link: http://wiki.openwrt.org/doc/devel/crosscompile
I am lazy, my app on VoCore is just one .c file(such as vof), so just go to ./staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc- run ./mipsel-openwrt-linux-gcc -g vof.c

OK, that’s all. Hope this will be useful. :)

6 thoughts on “VoCore & OpenWrt

  1. >>NOTIFY: that bin is just firmware data, so we need to combine it with uboot, factory setting then burn it to SPI flash.

    Waiting the topic for your next article.

  2. Hi, it’s possible to upload the firmware using a RaspberryPi or an Arduino?

    1. I think so. Any device support wifi/ssh is able to upload firmware to VoCore(if it is not bricked)

  3. I have a few make tips and tricks that i find very handy when working with openwrt

    building with IGNORE_ERRORS=1 makes it more easy to start. (trunk can contain packages that are broken)

    tee allows you to save log file and see current status (not hiding like it normally would when using >), handy with previous command. You can check if and/or what packages failed.

    A very known option to build parallel enable with -j9 (core’s + 1)

    Pasting this all in a file (like buildscript.sh)

    make -j9 V=s IGNORE_ERRORS=100 2>&1 | tee ../LogFiles/openwrt-+”%F@%T”.txt ; beep

    and running this with source:
    $ source ./buildscript.sh
    $ . ./buildscript.sh #mind the space between . and .

    Hopes this helps somebody :)

    1. O, typo: :(

      make -j9 V=s IGNORE_ERRORS=100 2>&1 | tee ../LogFiles/openwrt-$(date +”%F@%T”).txt ; beep

  4. (i am back :), i have made an other mistake, its “IGNORE_ERRORS=M”

Comments are closed.