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
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-0.9.33.2/bin/ run ./mipsel-openwrt-linux-gcc -g vof.c
OK, that’s all. Hope this will be useful.