WiTi Board and OpenWRT
November 25, 2015 8 Comments
UPDATE 20160107: Witi patches got into OpenWRT mainline, but there is SD breakage in mainline, so I still do not recommend using OpenWRT master/trunk for WiTi. As soon as it gets fixed, it should be good to go. Until that moment, I recommend using my branch.
Just got my WiTi Router board today. I’ve supported WiTi project on Indiegogo and was lucky enough to get it on time. It is manufactured by MqMaker. It’s really nice device for running OpenWRT. The problem is that support for WiTi is still not in the OpenWRT mainline.
Original author (manufacturer) did not follow git workflow, but added patches to specific OpenWRT version, so it’s hard to check changes against OpenWRT mainline. He actually sent pull request to the Github page of Openwrt, but did not know they don’t accept pull requests from there (they will be ignored). His changes are available through his pull request.
Nitroshift had nice initative of having it in the OpenWRT mainline, but so far he have managed to submit few patches to the official OpenWRT mailing list. You can check his fork of OpenWRT here. OpenWRT page of this router is available here and forum discussion is here.
Being security consciousness, I wanted to see the differences from the mainline and go through them myself. In that process, I have managed to make witi branch on github which is fork from official OpenWRT mainline. It is basically nitroshift patch, but with few critical fixes in order to boot up board normally (no need for serial cable). You can check differences between OpenWRT mainline (master) and my patches here.
Currently there’s things which are not included in the patch and the most interesting feature is hardware NAT available here. Probably will add it later.
Procedure for building this proper image is following:
First, install compiling prerequisites (example for Ubuntu 14.04 LTS):
sudo apt-get install g++ libncurses5-dev zlib1g-dev bison flex unzip autoconf gawk make gettext gcc binutils patch bzip2 libz-dev asciidoc subversion git
Next clone proper branch (UPDATE: use witi-kernel branch instead of witi branch to get hardware NAT and SD readwrite support):
git clone -b witi https://github.com/kost/openwrt.git
Go to directory, update package feeds and start menuconfig:
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
Make sure to select proper model:
Target System (Ralink RT288x/RT3xxx) --->
Subtarget (MT7621 based boards) --->
Target Profile (WiTi) --->
Create default configuration and customize the configuration additionaly if needed:
make defconfig
make menuconfig
When configuration is ready, just make new firmware with following command:
make
Now, flash firmware with built binary in bin/ramips/ directory (you don’t need to keep the old configuration if not needed – but probably router will be available on 192.168.1.1 IP address).
Hope it helps!
Have this firmware the patch for sd write?
Thanks.
Just use:
git clone -b witi-kernel https://github.com/kost/openwrt.git
instead of
git clone -b witi https://github.com/kost/openwrt.git
Nice explanation of what is happening with these different builds. What about the SD Card Write-Protect issue? Do you address that? That’s the only thing I haven’t got working yet.
Just use:
git clone -b witi-kernel https://github.com/kost/openwrt.git
instead of
git clone -b witi https://github.com/kost/openwrt.git
The branch you referred to in the article was an initial repo that helped getting the code to support the board in mainline OpenWRT. It has been submitted to be mainlined: https://patchwork.ozlabs.org/patch/548942/ and got positive feedback, should be merged soon. However, this is the initial submission, once it will be mainlined it will be polished.
I see it got accepted and congrats on that, but major breakage of SD support in openwrt mainline is reason I still do not recommend using mainline.
Powered on, it’s shine like Borgs alcove:-)
You have lot of GPIOs – you can add more LEDs if you like 🙂