Create custom OpenWrt image for TP-Link TL-WA901NDv2

Fortunately it is straightforward to create a new OpenWrt firmware image – just follow the steps below.

Install build tools:

sudo apt-get install build-essential libncurses5-dev libncursesw5-dev zlib1g-dev gawk git gettext libssl-dev xsltproc wget unzip python

Download and unpack the OpenWrt ImageBuilder package:

tar xvf openwrt-imagebuilder-18.06.8-ar71xx-tiny.Linux-x86_64.tar.xz
cd openwrt-imagebuilder-18.06.8-ar71xx-tiny.Linux-x86_64/

If you already have config files on an other system and want to include them in the new image:

make image FILES=files/
mkdir -p files/etc/config
scp root@ files/etc/config/
scp root@ files/etc/config/
scp root@ files/etc/config/

Specify what packages to include in or exclude from the new image, and what services not to start:

mypkgs="lua luci-base luci-lib-ip luci-lib-jsonc luci-lib-nixio"
mypkgs+=" luci-mod-admin-full luci-proto-ipv6 luci-theme-bootstrap"
mypkgs+=" uhttpd rpcd-mod-rrdns libiwinfo libiwinfo-lua kmod-slhc"
mypkgs+=" kmod-nf-nat kmod-nf-conntrack kmod-nf-conntrack6"
mypkgs+=" kmod-ipt-nat kmod-lib-crc-ccitt kmod-ipt-conntrack"
mypkgs+=" wpad"
mypkgs+=" -wpad-mini -firewall -odhcpd-ipv6only -dnsmasq"
mypkgs+=" -ppp -ppp-mod-pppoe -kmod-ppp -kmod-pppoe -kmod-pppox"
mydsrvs="dnsmasq firewall odhcpd"

Finally, make the images:

make clean
make image PROFILE="tl-wa901nd-v2" PACKAGES="$mypkgs" DISABLED_SERVICES="$mydsrvs" FILES=files/

… and the result:

To see what other targets are available and for general help:

make info
make help

Additional information on-line:

Leave a Reply

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