Category: OpenWRT

TP-Link MR3420 setup OpenWRT v18.06

OpenWrt is a powerful Linux distribution for embedded devices. Especially for routers with reduced memory and performance. This objective has contributed to an extreme level of optimization of this distribution, allowing also a high margin of flexibility and really easy setup.
This distribution usually fits on many embedded devices, the complete list can be found at this link:

Don’t expect magics from this configuration, you can’t install all the available software, simply because we don’t have enough RAM / ROM memory. Sometimes it is possible to overcome some limitations, for example extending the RAM memory with the ZRAM or SWAP file, extending the root filesystem with a USB flash memory device. However, a stable and robust configuration requires a careful evaluation of the installed services and their impact on system resources. Software as imagemagick or ffmpeg, which tries to allocate a large amount of memory, will likely fail with the segmentation error.
However, everything comes from source and everything is customizable. You can even avoid to install web interface and configure everything by ssh console and UCI command line tool, or build your own web GUI or Service supported by a solid and flexible cross-build system.
Thanks to the excellent work of all OpenWrt team, time to time, we have a new and fresh release to build.
Check your system requirements first:
This new release includes linux kernel updates, different security and bug fixes.

Clone v18.06 branche:

git clone -b openwrt-18.06 git:// openwrt-18.06

Or master branche:

git clone git:// openwrt

Next, update feeds:

cd openwrt-18.06/
./scripts/feeds update -a

Configure build system:

make menuconfig

Select router options:
Install LUCI web interface:

./scripts/feeds install luci

Select Luci web interface from menuconfig:

LuCI --->  1. Collections --->  <*> luci

Choose packages carefully, because we have only 4mb of storage. This amount of memory is enough for many specialized device with a limited set of features like a router or AP. In order to take advantage of many of the packages provided by OpenWrt, it is essential to extend the memory with external USB storage. Blockmount package and root overlay filesystem can do this trick:

Select block-mount:

Base system --->  <*> block-mount
Kernel modules --->  USB Support --->  <*> kmod-usb-storage
Kernel modules --->  Filesystems --->  <*> kmod-fs-ext4

Another solution is to remove all ip-v6 support. Is configured by default and also supported from kernel side. Hacking on Kernel configuration is especially useful when support for specific hardware is required or simply to enable debugging features or disable something to save space. 

Linux kernel configuration:

make kernel_menuconfig

Careful with kernel settings, most of them are unsafe. Don’t touch things, if you are not aware about what are they really doing. At best, you’ll get a slow kernel with a lot of useless code.

Build firmware:

make -j8

Finally, we can find all binary files in “bin/targets/ar71xx/tiny/”

1,2K giu 13 12:04 config.seed
2,8K giu 13 12:07 openwrt-ar71xx-tiny-device-tl-mr3420-v1.manifest
2,7M giu 13 12:07 openwrt-ar71xx-tiny-root.squashfs
3,8M giu 13 12:07 openwrt-ar71xx-tiny-tl-mr3420-v1-squashfs-factory.bin
3,6M giu 13 12:07 openwrt-ar71xx-tiny-tl-mr3420-v1-squashfs-sysupgrade.bin
1,2M giu 13 12:07 openwrt-ar71xx-tiny-uImage-lzma.bin
3,5M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.bin
3,5M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.elf
1,2M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux.lzma
1,2M giu 13 12:07 openwrt-ar71xx-tiny-vmlinux-lzma.elf
4,0K giu 13 12:07 packages
1,1K giu 13 12:07 sha256sums

To program the device for the first time is sufficient to upload “factory.bin” to the router, from it’s own classic web interface as usual. For subsequent upgrades from LUCI web interface use “sysupgrade.bin”.

Wait for the router to reboot, connect to “” with any browser or ssh, then you will be able to set up root password. First Login:

Next topics:
1) Serial debug console
2) Customize your build
3) Remote development

All documentation and howto:
Multiple builds in one single checkout:
Detailed build instructions:
Easy patch management:
Creating packages:

TP-Link MR3420 setup OpenWRT

This post is outdated, please refer to next one

OpenWrt is a powerful Linux distribution for embedded devices. Main target is various router boards, but also other small devices like GuruPlug, ALIX Boards, OLPC.

List of all supported hardware:

Using this distribution require little Linux skills and lot of time…
All documentation and howto:

Check system prerequisites:

Next quick setup and build instruction for MR3420 router with 3g/UMTS USB Dongle for WAN connection.

Get source (Chaos Calmer 15.05):

~ $&amp;gt; git clone git:// openwrt

Update source:

~ $&amp;gt; cd openwrt
~/openwrt $&amp;gt; git pull

Update all feeds:

~/openwrt $&amp;gt; ./scripts/feeds update -a

Install useful feeds:

~/openwrt $&amp;gt; ./scripts/feeds install luci luci-proto-3g

Configure buildsystem:

~/openwrt $&amp;gt; make menuconfig

Select router:


Select block-mount:

Base system --->  <*> block-mount
Kernel modules --->  USB Support --->  <*> kmod-usb-storage
Kernel modules --->  Filesystems --->  <*> kmod-fs-ext4

Select Luci web interface:

LuCI --->  
1. Collections --->  <*> luci

Select Dongle kernel support:

Kernel modules ---> USB Support ---> <*> kmod-usb-serial
Kernel modules ---> USB Support ---> <*> kmod-usb-serial-option
LuCI ---> 6. Protocols ---> <*> luci-proto-3g
Utilities ---> <*> usb-modeswitch


make -j4

Finally, we can find all in “bin/ar71xx/”

~/openwrt $&amp;gt; ls -hgG bin/ar71xx/
totale 23M
-rw-r--r-- 1  827 apr 17 16:59 md5sums
-rw-r--r-- 1 2,7M apr 17 16:59 openwrt-ar71xx-generic-root.squashfs
-rw-r--r-- 1 2,6M apr 17 16:59 openwrt-ar71xx-generic-root.squashfs-64k
-rw-r--r-- 1 3,8M apr 17 16:59 openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin
-rw-r--r-- 1 3,4M apr 17 16:59 openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-sysupgrade.bin
-rw-r--r-- 1 1,3M apr 17 16:59 openwrt-ar71xx-generic-uImage-gzip.bin
-rw-r--r-- 1 903K apr 17 16:59 openwrt-ar71xx-generic-uImage-lzma.bin
-rwxr-xr-x 1 2,7M apr 17 16:59 openwrt-ar71xx-generic-vmlinux.bin
-rwxr-xr-x 1 2,8M apr 17 16:59 openwrt-ar71xx-generic-vmlinux.elf
-rw-r--r-- 1 1,3M apr 17 16:59 openwrt-ar71xx-generic-vmlinux.gz
-rw-r--r-- 1 960K apr 17 16:59 openwrt-ar71xx-generic-vmlinux.lzma
-rwxr-xr-x 1 973K apr 17 16:59 openwrt-ar71xx-generic-vmlinux-lzma.elf
drwxr-xr-x 2  16K apr 17 16:58 packages

Working with Feeds:
Multiple targets in one single checkout:
Detailed build instructions:
Easy patch management:
Creating packages:
First Login:
Configuration files: