How to Start of with OpenWRT…

While I wanted to learn how to start with OpenWRT I was  not able to find much documentation where to start from, this post is completely dedicated to fresh newbies..

My host system is Ubuntu 12.04 LTS

First we need to get OpenWRT source code via git or svn.  OpenWRT always has beta/development version called as “TRUNK” and stable version called “ATTITUDE ADJUSTMENT”, I will be  using git method and getting stable version of OpenWRT.

Create a folder and start working inside it, for this post lets call it as “power”.

NOTE : Complete Openwrt process should be worked by normal user not by root user.

Step 1)Lets get source code from GIT, you can refer to this link below.

Main Repository :

git clone git://

Run this link inside our “power” directory. which will create a folder called openwrt. Get inside that folder and you will find many folder, use of each folder I will be explaining in my following post.

Step 2) Now as we have the source code which is stable lets latest updates by running below command.

./scripts/feeds update -a

“This above command will get all latest updates”

To know more type : ./scripts/feeds update -help

Step 3) Let install all the these latest packages so that it will be available while we compile our firmware.

./scripts/feeds install -a

Step 4) Check if all the packages are install properly and if we missed out any dependency.

make prereq

Now we have all the packages ready lets try to compile our first image 🙂

Step 5) Now lets define all feature which we need in our firmware

make menuconfig

Above command will bring up a dialog box and you need to check required configuration, I will be compiling a firmware for TP-Link MR3020

1) Target Information –  This is target Architecture you will install, I choose it as “Atheros AR7XXX/AR9XXX” because architecture of the AP.

2) Subtarget – Generic

3) Target Profile –  I choose TP-Link TL-MR3020 (press on space bar to select)

4) Target image –   As I am going to install it on AP I will be needing the image to be in squashfs filesystem.

NOTE : This is just basic changes we need to make, you can move around and discover more.

5) make 2>&1 > /tmp/ap.log&

Above command will start compilation and start redirecting error and log to /tmp/ap.log file.


1) You can add V=99 to see in detail whats going on

2) First time will take something around 3 to 4 hours depending on you machine 🙂

Step 6) What after 3 hours ?

If your compilation is successful then you will able to find you image in /bin/<target_architecture> directory.

Install it and try how your firmware is working…

Let me know if you end up in any error, I will be happy to help you when you are in trouble.














3 thoughts on “How to Start of with OpenWRT…

  1. Hi, thank you for your guideline. Could you extend your guideline a bit more detail about how to install it on wireless accesspoint where there is no console interface? Thanks.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s