Quantcast
Channel: Sky User - The Unofficial Support Forum for everything Sky!
Viewing all articles
Browse latest Browse all 8194

Compile your own Firmware for asus routers for FTTC

$
0
0
Being a bit anal with these things i decided to build my own firmware for my Asus RT-AC66U with my client id and vendorclass hard coded for sky FTTC with a few other tweaks that are optional

I realise this isnt for 99% of people on here but for that 1% of people it will help

and ofc if you blow your router up dont blame me

1) setup a vm follow the guide below
use ubuntu 12.04 lts x64 14.04 is nothing but problems

https://github.com/RMerl/asuswrt-mer...e-using-Ubuntu

2) add missing packages

sudo apt-get install autoconf automake bash bison bzip2 diffutils file flex m4 \
g++ gawk groff-base libncurses-dev libtool libslang2 make patch perl pkg-config \
shtool subversion tar texinfo zlib1g zlib1g-dev git-core gettext libexpat1-dev \
libssl-dev cvs gperf unzip python libxml-parser-perl gcc-multilib gconf-editor \
libxml2-dev g++-4.4 g++-multilib gitk libncurses5 mtd-utils libncurses5-dev \
libstdc++6-4.4-dev libvorbis-dev g++-4.4-multilib git autopoint autogen sed \
build-essential intltool libelf1:i386 libglib2.0-dev lib32z1-dev

3) get root

sudo passwd
su

4) clone asuswrt-merlin and setup


export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm-arm/bin
needs adding every reboot of the vm

cd /root
git clone https://github.com/RMerl/asuswrt-merlin.git

sudo ln -s ~/asuswrt-merlin/tools/brcm /opt/brcm

sudo ln -s ~/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm

export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm-arm/bin

sudo mkdir -p /media/ASUSWRT/

sudo ln -s ~/asuswrt-merlin /media/ASUSWRT/asuswrt-merlin

cd ~/asuswrt-merlin/release/src-rt-6.x


5) if you have more than one cpu edit the lines like below for a faster build

vi /root/asuswrt-merlin/release/src-rt-6.x/platform.mak
#export PARALLEL_BUILD :=
export PARALLEL_BUILD := -j`grep -c '^processor' /proc/cpuinfo`

6) if you want to get rid of the merlin references in the firmware upgrade page

vi /root/asuswrt-merlin/release/src-rt-6.x/router/www/Advanced_FirmwareUpgrade_Content.asp
edit line 349

7) if you want to get rid of the (merlin build) on the main page

vi /root/asuswrt-merlin/release/src-rt-6.x/router/www/state.js
edit line 430 replace with
banner_code +='<span style="font-family:Verdana, Arial, Helvetica, sans-serif;"><#General_x_FirmwareVersion_itemname#></sapn><a href="/Advanced_FirmwareUpgrade_Content.asp" style="color:white;"><span id="firmver" class="title_link"></span></a>\n';

8) set build id to hostname instead of git id

vi /root/asuswrt-merlin/release/src-rt-6.x/Makefile
edit line 127
from
BUILD_INFO := $(shell git log --pretty="%h" -n 1)
to
BUILD_INFO := $(shell hostname)

9) disable logging to jffs as it will add ware to the nand and is unneeded

vi /root/asuswrt-merlin/release/src-rt-6.x/target.mak
JFFS2LOG=n

10) add client id and vendorclass

vi /root/asuswrt-merlin/release/src-rt-6.x/router/rc/udhcpc.c
line 351

"-x", "61:yourclientidhex",
"-x", "60:yourvendorclasshex",

int index = 11; /* first NULL */

see image



11) customize upnpd
in my case i disabled secure mode and set a friendly name

Line 2920 bold lines are replaced

get_wan_ifname(wan_primary_ifunit()),
lanip, lanmask,
upnp_port,
upnp_enable ? "yes" : "no", // upnp enable
upnp_mnp_enable ? "yes" : "no", // natpmp enable
"no", // force secure_mode (only forward to self)
nvram_get_int("upnp_ssdp_interval"),
"Aurora", // force friendly name
rt_version, rt_serialno,
nvram_get("serial_no") ? : et0macaddr

12) build your image

cd ~/asuswrt-merlin/release/src-rt-6.x

make clean

make rt-ac66u

36 mins later on an old e5300 duel core @ 3.33ghz

ctools/trx_asus -i image/linux-lzma.trx -r RT-AC66U,3.0.0.4,image/RT-AC66U_3.0.0.4_374.42_0.trx

Creating ASUS RT-AC66U firmware to image/RT-AC66U_3.0.0.4_374.42_0.trx

TRX Image:
Total Size .... : 26914816 (26284.0 KB) (25.7 MB)
CRC-32 ........ : 36A923CA











Some further info on clientid and such that may be helpful
http://www.skyuser.co.uk/forum/techn...-sky-fttc.html

Viewing all articles
Browse latest Browse all 8194