OpenWrt Forum Archive

Topic: building TP-Link wr703n

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I'm trying to seriously build it for tp-link(wr703n). By seriously I mean that if I got router bricked and failed to unbrick it by wiki pages - which will do my best to not to do it - will buy a new one until I learn it :-)

First, for not to go to wrong direction, I'd like to ask if porting files for targeting the build process toward the wr703n is openly available, or what I should do so to obtain my final image ready for wr703n please?

(Last edited by Yaon on 13 Nov 2012, 14:23)

I have one link:
http://www.purinux.org/blog/2012/02/

where I read these:
$ svn co svn://svn.openwrt.org/openwrt/trunk/

$ cd trunk

$ make menu_config

- Set Target System = Atheros AR7xxx/AR9xxx

- Set Target Profile = TP-LINK TL-WR703N
..........................

If this information is reliable, then the question is answered YES! big_smile

But...

I'm too newbie too confirm it,

Hope Pro of the forum kindly do that...

I strongly recommend to have a serial console, so even if your kernel does not boot, you will still have the U-Boot bootloader to restore the router back to work.

You only need a cheap TTL UART/USB converter, like the Nokia CA42 cable you can find everywhere (just cut the Nokia connector side), and solder 3 wires on the tiny little pads described here.

This way, you can always restore a working image or even go back to the orignial firmware (and you don't need to buy tons of routers!).

Thee instructions above are ok, but, I recommend to use the "Attitude Adjustment" branch rather than the "trunk":

svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment

The "AA" branch is more stable than the trunk, which may be broken from time to time... And the "AA" branch contains also the LuCI web admin interface by default, so it is a little bit easier.

You do the "make menuconfig" with these "Target  System" and "Target Profile", then:

make -j 3

The "3" should be your number of CPU on your host machine + 1, so "3" is for a dual-core host.

The first time, it may takes hours to compile, as the toolchain is built first, then the kernel and the rootfs.

You then obtain in the "bin/ar71xx" subdirectory the "openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin" and "openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin" files.

In the case of the TL-WR703N (this is not the case for other platforms), the 2 files are identical, except that the "*factory*" one contains extra 0xff padding at the end to be flashable by the original TP-Link Chinese firmware.

Good luck!

Squonk, thanks for detail response, I first time learned about AA!

If possible, I need to ask 3 questions here:

1. what is the role of 'j' in "make -j 3" please?
2. I will build under Ubuntu, should I check any special point for such build system?

I've used wrt54gl for a year and flashed router for several times, I got a J-Tag but never such problem happened to use it. From your post I learned that J-Tag is of no use in the case of wr703n (correct?).

I cross compiled a small socket server successfully, but I'd like to learn more and if possible, embed my code into the router image, so compiling openwrt, I already have my program compiled in it, may be as a driver.

3. So, which way should I take from these:
3.1. compile for the first time, wait that several hours, try altering openwrt source only after tool chain is built so for repeating, less time for waiting.
3.2. may be fundamental problem for going 3.1., so I should - if altering code - each time build the tool chain?

Sorry if questions are foolish-like, it is the first time ever I'm going to build a LINUX ! :-)

The discussion might have continued from here.