After you get your Linux installation up and running, please continue the following process to build your OpenWRT.
- Login to Ubuntu and open (press Ctrl+Alt+T) the Terminal as shown in figure below:
- Downloads the package lists from the repositories
sudo apt-get update
- Download & install necessary packages for the cross-compilation process
sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc
sudo apt-get install unzip python wget
- OpenWrt source repository downloads, I am using the release version of Barrier Breaker 14.07.
git clone git://git.openwrt.org/14.07/openwrt.git
- Download and install all available "feeds". Depend on your internet connection, it takes some time to complete this process.
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
- Make OpenWrt Buildroot check for missing packages on your build-system using one of the following commands;
make defconfig
make prereq
make menuconfig
- After a few seconds you should see the main screen for configuring OpenWRT. In this tutorial, I'm selecting TP-Link TL-MR3020.
- Exit the menu system when finished going through all the categories of software. Make sure to confirm that you want to save your OpenWRT configuration.
- Optional: You can also modify the kernel config for the selected target system. Depend on your internet connection, it takes some time to complete this process.
make kernel_menuconfig - After the process is completed, you should see the kernel configuration menu.
- Exit the menu system when finished going through all the categories of software. Make sure to confirm that you want to save your OpenWRT configuration.
- With all of your packages selected and your configuration saved, you’re ready to build your firmware. It takes one to several hours to complete this build process.
make
make -j 4
make V=s - The result firmware image is generated in the Home/openwrt/bin/ folder.
- Flash the factory.bin to your router.
- You may want to get a clean build after running the "make" command. If you do a make distclean, buildroot will delete your .config file.
make distclean