Tuesday, December 20, 2016
A little insight on how to build the firmware quickly
A little insight on how to build the firmware quickly
I have a 6 Core AMD-FX6300 Desktop with CentOS installed.
All the OpenWrt buildroot dependencies and Java Runtime (OpenJRE) are already installed.
My Repository is maintained via patches which patch cleanly on top of fresh Barrier Breaker.
All the Package Source (ie. Linux Kernel.tar.xz etc) is cached in 1 directory so I dont need to download any other stuff.
Step 1 liner:
git clone git://git.openwrt.org/14.07/openwrt.git &&
git clone https://github.com/gwlim/mips74k-barrier-breaker-patch.git temp;
mv temp/* openwrt/; rm -rf temp &&
cd openwrt
./bb_openwrt.sh
Step 2 liner:Symlink the Package Source as a dl folder in the buildroot
(It is like the UNIX way of creating a shortcut in Windows so the OpenWrt buildroot can find the Packages)
Step 3:
Go grab a cup of coffee while the buildroot patches itself
Step 4:
make menuconfig
and choose the target platform like WR1043ND etc in the menuStep 5:
make -j 4
This will build the firmware in parallel processesStep 6:
Go grab another cup of coffee while the buildroot builds your firmware
Step 7:
After I am done I just take the binaries and nuke the buildroot with a
rm -rf ./openwrt
Every build is a fresh build it is not design to last!If you do this correctly, you can easily build from source a fully optimized firmware for your Router in less than 1 hour!
The patches keeps tracks of the all changes, it is designed to fail if upstream makes changes which conflicts with existing patches.
This will free up my brain space on remembering all the various changes I made
Also it will prevent conflict with upstream repository
Lastly it will make porting to the next release (Chaos Calmer) much easier as all the changes are recorded with most changes just minor line changes, renaming and shifting around.
Available link for download