Iii. compiling firmware 1. Preparing the compilation environment (Ubuntu system recommended)
Take Ubuntu 14.04 x64 as an example to install the tools and libraries you need to compile.
$ sudo apt-get install git-core build-essential libssl-dev Libncurses5-dev Unzip
$ sudo apt-get install subversion mercurial
$ sudo apt-get install build-essential subversion libncurses5-dev Zlib1g-dev gawk gcc-multilib Flex git-core gettext LIBSS L-dev
2. Get the source code
Get the latest source code and upgrade modules from GitHub.
$ git clone git://git.openwrt.org/openwrt.git
$ CD OpenWrt
$./scripts/feeds update-a
$./scripts/feeds Install–a
3. Compiling the configuration
Configure the. config file.
$ make Defconfig
$ make Prereq
$ make Menuconfig
After the option is configured, save to. config and then exit.
Note: Be sure to select the correct hardware model at Target system and target profile, and other modules can choose their own settings.
4. Start compiling
Use make to compile, where multi-core CPUs can be accelerated using the-JN parameter, with parameter V set to 99 or S to show detailed procedures.
$ make–j2 v=99
5. Complete the compilation
After a lengthy compilation process, you can see the following compiled firmware under the openwrt/bin/ar71xx path.
Openwrt-ar71xx-generic-tl-wr720n-v3-squashfs-factory.bin
Openwrt-ar71xx-generic-tl-wr720n-v3-squashfs-sysupgrade.bin
Iv. Modifying the firmware header
According to the official description of OpenWrt, it is possible to replace the v3.0 firmware header information with the firmware of the v4.0.
The hardware of v4.0 is almost the same asv3.0 so firmwares for v3.0 just work. The version number in images to v4.0 is0x07200104 (0x07200103 for v3.0).
1. Modifying tools
The "TP Routing firmware Modification Tool" is recommended here.
Of course, you can also use the 16 binary editor to manually find (requires a certain foundation and experience) and modify.
2. Replace the firmware header information
The official recommendation is to change "07200103" to "07200104" (preferably backing up the original firmware in advance).
Resources:
"1" http://wiki.openwrt.org/doc/howto/buildroot.exigence
"2" http://wiki.openwrt.org/toh/tp-link/tl-wr720n
tl-wr720n and OpenWrt (ii)