Create custom OpenWrt image for Thomson Technicolor TG582n

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 ~/Downloads/openwrt-imagebuilder-19.07.3-brcm63xx-generic.Linux-x86_64.tar.xz
cd openwrt-imagebuilder-19.07.3-brcm63xx-generic.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="nano pciutils diffutils iw-full iwinfo wpad"
mypkgs+=" cgi-io kmod-lib-crc-ccitt kmod-lib-cordic kmod-slhc"
mypkgs+=" libiwinfo libjson-c2"
mypkgs+=" kmod-b43"
mypkgs+=" libiwinfo-lua liblua5.1.5"
mypkgs+=" liblucihttp-lua liblucihttp0 libubus-lua lua luci"
mypkgs+=" luci-app-firewall luci-app-opkg luci-base luci-lib-ip"
mypkgs+=" luci-lib-jsonc luci-lib-nixio luci-mod-admin-full"
mypkgs+=" luci-mod-network luci-mod-status luci-mod-system"
mypkgs+=" luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap"
mypkgs+=" rpcd rpcd-mod-file rpcd-mod-iwinfo rpcd-mod-luci"
mypkgs+=" rpcd-mod-rrdns uhttpd"
mypkgs+=" -wpad-basic"
mypkgs+=" -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe"
mydsrvs="dnsmasq firewall odhcpd"

To save some more flash ROM space you may want to remove any unused packages, for example:

mypkgs+=" -dnsmasq -odhcpd -odhcpd-ipv6only"

Finally, make the images:

make clean
make image PROFILE="A4001N" PACKAGES="$mypkgs" DISABLED_SERVICES="$mydsrvs" FILES=files/
make image PROFILE="A4001N1" 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 *