OpenWrt, Create customized full Image

By | December 19, 2016

If you are new to OpenWrt, we encourage you to read the following introduction to OpenWrt.

OpenWrt, Linux into the router.

If you understand OpenWrt and have decided to apply OpenWrt to your router, you need to make sure that OpenWrt supports the model you are building and applying.

Checking for OpenWrt support

If you understand OpenWrt and have decided to build on your router, you can refer to the following procedure.

What it means to build OpenWrt is to modify the code or add new features. To do so, we need to create a reference binary first. This is because the binary that performs the basic operation must be secured before it can be checked for modifications.

In this article, we try to create a binary with the following conditions.

  • HW: TP-Link TL-WDR4300
  • OpenWrt 15.05
  • Includes luci (web interface)
  • Build Environment: Ubuntu 14.04, 16.04

1. First, download the necessary packages for the build. (Root authority)

# Apt-get install build-essential subversion libncurses5-dev zlib1g-dev mercurial gawk unzip gcc-multilib flex git-core gettext libssl-dev

2. Download the OpenWrt 15.05 Source Code required for the build. (No more root privileges in the future)

# Git clone git: //

3. You will get as recent as you got the source code from git, but run the following command to check whether the so called feed (package concept) is up-to-date. (It is not necessary as it is the process of checking and receiving the latest information.)

# cd openwrt
# ./scripts/feeds update -a
# ./scripts/feeds install -a

4. Configure the settings for your router.

# make menuconfig

If you do make menuconfig, the configuration menu will appear as shown below.

  • Target System: Set the type of Chipset of the router.
  • Target Profile: Set the model of the router.
  • LuCI: Enables use of LuCI for Web Interface support.

-. Target System Settings
It is not easy to know which chipset your router uses. Therefore, the information provided by can be used more easily. For the TP-Link TL-WDR4300, you can check the link below.


Select Atheros AR7xxx / AR9xxx in Target System as it is Atheros AR9344 as above.
In this way, you can check and set the chipsets of your router.

-. Target Profile Settings
This is where you set the model you want to build. I selected TP-LINK TL-WDR3500 / 3600/4300/4310 / MW4350R because it is TP-LINK TL_WDR4300 in my case.

-. LuCI
It should be enabled by default, but it is disabled. If LuCI is not enabled, you can not configure the router through the browser. Let’s enable it for a smoother configuration.

[Setting Target System, Target Profile]

[Setting of LuCI]

5. Check again with the following command before building.

# make defconfig
# make prereq

Make defconfig will create a default configuration file if the configuration file (.config) does not exist. You do not need to do this because make menuconfig already created the configuration file. (If you already have a configuration file, make defconfig will not change anything.)

In the case of make prereq, it looks a little unfamiliar and looks at the makefile. Let’s run it once before build.

6. Now let’s proceed with the actual build.

# make


# make V = s


# make -j 2

Basically, the build will proceed even if you just make it. However, if you want to see a more detailed log even if the build fails or is normal, add the “V = s” option. If you want to build faster, you can use the option “-j 2” as an option for the number of CPUs you own.

7. Let’s check the output

# cd bin / ar71xx

The output is under the bin directory. The ar71xx chipset is built with the ar71xx chipset, and the actual output is located under that directory.

The actual binaries are as follows.


Proceed as above to build the actual running OpenWrt binary.

2 thoughts on “OpenWrt, Create customized full Image

  1. Pingback: OpenWrt, building the package part. – TechNote

Leave a Reply

Your email address will not be published. Required fields are marked *