PLL/clocks settings in FLASH and O/C recovery for AR9331, other minor changes, AR9344...
[oweals/u-boot_mod.git] / README.md
1 U-Boot 1.1.4 modification for routers
2 ==========
3
4 Table of contents
5 -----------------
6
7 - [Introduction](#introduction)
8 - [Supported devices](#supported-devices)
9 - [Modifications, changes](#modifications-changes)
10         - [Web server](#web-server)
11         - [Network Console](#network-console)
12         - [Other](#other)
13         - [Supported flash chips](#supported-flash-chips)
14 - [How to install it?](#how-to-install-it)
15         - [Cautions, backups](#cautions-backups)
16         - [Using external programmer](#using-external-programmer)
17         - [Using UART, U-Boot console and TFTP server](#using-uart-u-boot-console-and-tftp-server)
18         - [Using OpenWrt](#using-openwrt)
19         - [Using DD-WRT](#using-dd-wrt)
20 - [How to use it?](#how-to-use-it)
21 - [How to compile the code?](#how-to-compile-the-code)
22 - [FAQ](#faq)
23
24 Introduction
25 ------------
26
27 In short, this project is a deep modification of **U-Boot 1.1.4** sources, mostly from **TP-Link**, but some code fragments were taken also from **D-Link**.
28
29 You can download original sources from the following pages:
30
31 - [TP-Link GPL Code Center](http://www.tp-link.com/en/support/gpl/ "TP-Link GPL Code Center")
32 - [D-Link GPL Source Code Support](http://tsd.dlink.com.tw/GPL.asp "D-Link GPL Source Code Support")
33
34 The concept for this project came from another U-Boot modification, dedicated to small and very popular TP-Link router - model **TL-WR703N**, which includes web fail safe mode: **[wr703n-uboot-with-web-failsafe](http://code.google.com/p/wr703n-uboot-with-web-failsafe/)**. I was using it and decided to make my own version, which could have some improvements, additional capabilities, support for different models and work with all modern web browsers.
35
36 First version of this modification was introduced on **OpenWrt** forum in [this thread](https://forum.openwrt.org/viewtopic.php?id=43237), at the end of March 2013 and was dedicated only for TP-Link routers with **Atheros AR9331** SoC. Now, it supports also models from different manufacturers, devices with **Atheros AR9344** (like **TP-Link TL-WDR3600** and **TL-WDR43x0**) and other (in the near future **Atheros AR9341**) are under development.
37
38 You can find some information about previous versions of this project also on my [blog](http://www.tech-blog.pl), in [this article](http://www.tech-blog.pl/2013/03/29/zmodyfikowany-u-boot-dla-routerow-tp-link-z-atheros-ar9331-z-trybem-aktualizacji-oprogramowania-przez-www-i-konsola-sieciowa-netconsole/). It is in Polish, but [Google Translator](http://translate.google.com/translate?hl=pl&sl=pl&tl=en&u=http%3A%2F%2Fwww.tech-blog.pl%2F2013%2F03%2F29%2Fzmodyfikowany-u-boot-dla-routerow-tp-link-z-atheros-ar9331-z-trybem-aktualizacji-oprogramowania-przez-www-i-konsola-sieciowa-netconsole%2F&sandbox=1) will help you to understand it.
39
40 If you like this project, you may [buy me a beer](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FN3XW36YHSY2S&lc=US&item_name=For%20a%20great%20job%21&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)!
41
42 Supported devices
43 -----------------
44
45 Currently supported devices:
46
47 - **Atheros AR9331**:
48   - 8devices Carambola 2 (for version with development board!), [photos in my gallery](http://galeria.tech-blog.pl/8devices_Carambola_2/)
49   - TP-Link TL-MR3020 v1, [photos in my gallery](http://galeria.tech-blog.pl/TPLINK_TL-MR3020/)
50   - TP-Link TL-MR3040 v1 and v2
51   - TP-Link TL-WR703N v1, [photos in my gallery](http://galeria.tech-blog.pl/TPLINK_TL-WR703N/)
52   - TP-Link TL-WR720N v3 (version for Chinese market)
53   - TP-Link TL-WR710N v1 (version for European market), [photos in my gallery](http://galeria.tech-blog.pl/TP-Link_TL-WR710N-EU/)
54   - TP-Link TL-MR10U v1, [photos in my gallery](http://galeria.tech-blog.pl/TP-Link_TL-MR10U/)
55   - TP-Link TL-WR740N v4 (and similar, like TL-WR741ND v4)
56   - TP-Link TL-MR3220 v2
57
58 - **Atheros AR1311 (similar to AR9331)**
59   - D-Link DIR-505 H/W ver. A1, [photos in my gallery](http://galeria.tech-blog.pl/D-Link_DIR-505/)
60
61 - **Atheros AR9344**:
62   - TP-Link TL-WDR3600 v1
63   - TP-Link TL-WDR43x0 v1
64
65 I tested this modification on most of these devices, with OpenWrt and OFW firmware. If you are not sure about the version of your device, please contact with me **before** you try to make an upgrade. Changing bootloader to a wrong version will probably damage your router and you will need a serial FLASH programmer to fix it, so please, **be very careful**.
66
67 More information about supported devices:
68
69 | Model | SoC | FLASH | RAM | U-Boot image type | U-Boot environment |
70 |:--- | :--- | ---: | ---: | ---: | ---: |
71 | [8devices Carambola 2](http://8devices.com/carambola-2) | AR9331 | 16 MiB | 64 MiB DDR2 | 256 KiB, uncompressed | 64 KiB block, R/W |
72 | [TP-Link TL-MR3020 v1](http://wiki.openwrt.org/toh/tp-link/tl-mr3020) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
73 | [TP-Link TL-MR3040 v1/2](http://wiki.openwrt.org/toh/tp-link/tl-mr3040) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
74 | [TP-Link TL-WR703N](http://wiki.openwrt.org/toh/tp-link/tl-wr703n) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
75 | [TP-Link TL-WR720N v3](http://wiki.openwrt.org/toh/tp-link/tl-wr720n) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
76 | [TP-Link TL-WR710N v1](http://www.tp-link.com/en/products/details/?model=TL-WR710N) | AR9331 | 8 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
77 | [TP-Link TL-MR10U v1](http://wiki.openwrt.org/toh/tp-link/tl-mr10u) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
78 | [TP-Link TL-WR740N v4](http://wiki.openwrt.org/toh/tp-link/tl-wr740n) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
79 | [TP-Link TL-MR3220 v2](http://wiki.openwrt.org/toh/tp-link/tl-mr3420) | AR9331 | 4 MiB | 32 MiB DDR1 | 64 KiB, compressed | embedded, R |
80 | [TP-Link TL-WDR3600 v1](http://wiki.openwrt.org/toh/tp-link/tl-wdr3600) | AR9344 | 8 MiB | 128 MiB DDR2 | 64 KiB, compressed | embedded, R |
81 | [TP-Link TL-WDR43x0 v1](http://wiki.openwrt.org/toh/tp-link/tl-wdr4300) | AR9344 | 8 MiB | 128 MiB DDR2 | 64 KiB, compressed | embedded, R |
82 | [D-Link DIR-505 H/W ver. A1](http://wiki.openwrt.org/toh/d-link/dir-505) | AR1311 | 8 MiB | 64 MiB DDR2 | 64 KiB, compressed | embedded, R |
83
84 *(R/W) - environment exist in separate flash block which allows you to save it and keep after power down the device.*   
85 *(R) - environment is read only, you can change and add new variables only during a runtime. After power down, your changes will be lost.*
86
87 Modifications, changes
88 ----------------------
89
90 ### Web server
91
92 The most important change is an inclusion of a web server, based on **[uIP 0.9 TCP/IP stack](http://www.gaisler.com/doc/net/uip-0.9/doc/html/main.html)**. It allows to upgrade **firmware**, **U-Boot** and **ART** (Atheros Radio Test) images, directly from your web browser, without need to access serial console and running a TFTP server. You can find similar firmware recovery mode, also based on uIP 0.9 TCP/IP stack, in **D-Link** routers.
93
94 Web server contains 7 pages:
95
96 1. index.html (allows to upgrade firmware image, screenshot below)
97 2. uboot.html (allows to upgrade U-Boot image)
98 3. art.html (allows to upgrade ART image)
99 4. flashing.html
100 5. 404.html
101 6. fail.html
102 7. style.css
103
104 ![](http://www.tech-blog.pl/wordpress/wp-content/uploads/2013/08/uboot_mod_firmware_upgrade.jpg)
105
106 ### Network Console
107
108 Second, very useful modification is a network console (it is a part of original U-Boot sources, but none of the manufacturers included it). It allows you to communicate with U-Boot console over the Ethernet, using UDP protocol (default UDP port: 6666, router IP: 192.168.1.1).
109
110 ![](http://www.tech-blog.pl/wordpress/wp-content/uploads/2013/04/u-boot_mod_for_tp-link_with_ar9331_netconsole.jpg)
111
112 ### Other
113
114 Moreover:
115
116 - Faster boot up
117 - Unnecessary information from boot up sequence were removed
118 - Flash chip is automatically recognized (using JEDEC ID)
119 - Ethernet MAC is set from flash (no more "No valid address in Flash. Using fixed address")
120 - Automatic kernel booting can be interrupted using any key
121 - Press and hold reset button to run:
122   - Web server (min. 3 seconds)
123   - U-Boot serial console (min. 5 seconds)
124   - U-Boot network console (min. 7 seconds)
125 - Additional commands (in comparison to the default version; availability depends on router model):
126   -  httpd
127   -  printmac
128   -  setmac
129   -  printmodel
130   -  printpin
131   -  startnc
132   -  startsc
133   -  eraseenv
134   -  ping
135   -  dhcp
136   -  sntp
137   -  iminfo
138 - Overclocking possibilities (for now, only routers with AR9331)
139
140 ### Supported flash chips
141
142 Flash type detection may be very useful for people who has exchanged the flash chip in their routers. You will not need to recompile U-Boot sources, to have access to overall flash space in U-Boot console.
143
144 If you use flash type which is not listed below, this version of U-Boot will use default size for your router and, in most supported models, updating the ART image will not be available.
145
146 Currently supported flash types:
147
148 **4 MiB**:
149
150 - Spansion S25FL032P (4 MiB, JEDEC ID: 01 0215)*
151 - Atmel AT25DF321 (4 MiB, JEDEC ID: 1F 4700)
152 - EON EN25Q32 (4 MiB, JEDEC ID: 1C 3016)*
153 - Micron M25P32 (4 MiB, JEDEC ID: 20 2016)
154 - Windbond W25Q32 (4 MiB, JEDEC ID: EF 4016)
155 - Macronix MX25L320 (4 MiB, JEDEC ID: C2 2016)
156
157 **8 MiB**:
158
159 - Spansion S25FL064P (8 MiB, JEDEC ID: 01 0216)
160 - Atmel AT25DF641 (8 MiB, JEDEC ID: 1F 4800)
161 - EON EN25Q64 (8 MiB, JEDEC ID: 1C 3017)*
162 - Micron M25P64 (8 MiB, JEDEC ID: 20 2017)
163 - Windbond W25Q64 (8 MiB, JEDEC ID: EF 4017)*
164 - Macronix MX25L64 (8 MiB, JEDEC ID: C2 2017, C2 2617)
165 - SST 25VF064C (8 MiB, JEDEC ID: BF 254B)
166
167 **16 MiB**:
168
169 - Winbond W25Q128 (16 MB, JEDEC ID: EF 4018)*
170 - Macronix MX25L128 (16 MB, JEDEC ID: C2 2018, C2 2618)
171
172 (*) tested
173
174 If you want to use other type, please contact with me or make changes in the code, test them and send a pull request or a patch.
175
176 How to install it?
177 ------------------
178
179 ### Cautions, backups
180
181 **You do so at your own risk!**   
182 **If you make any mistake or something goes wrong during upgrade, in worst case, your router will not boot again!**
183
184 It is a good practice to backup your original U-Boot image/partition (especially for TP-Link devices) **before** you make any changes. For example, using OpenWrt (TP-Link TL-WR703N with 16 MiB flash):
185
186 ```
187 cat /proc/mtd
188 ```
189
190 This command will show you all **MTD** (Memory Technology Device) partitions:
191
192 ```
193 dev:    size   erasesize  name
194 mtd0: 00020000 00010000 "u-boot"
195 mtd1: 000eeb70 00010000 "kernel"
196 mtd2: 00ee1490 00010000 "rootfs"
197 mtd3: 00c60000 00010000 "rootfs_data"
198 mtd4: 00010000 00010000 "art"
199 mtd5: 00fd0000 00010000 "firmware"
200 ```
201
202 As you can see, `u-boot` partition size is **0x20000** (128 KiB) and my image for this model has size of **0x10000** (64 KiB) - it is very important difference! You should remember about this if you want to use `mtd` utility, to change U-Boot.
203
204 To backup `u-boot` partition in RAM, run:
205
206 ```
207 cat /dev/mtd0 > /tmp/uboot_backup.bin
208 ```
209
210 And then connect to your router using `SCP protocol` and download from `/tmp` the `uboot_backup.bin` file.
211
212 ### Using external programmer
213
214 If you have an external flash programmer (all supported devices have **SPI NOR flash** chips), you probably know how to use it. Download package with prebuilt images or compile the code, choose right file for your device and put it on flash at the beginning (offset `0x00000`). Remember to first erase block(s) - with high probability, if you use some kind of automatic mode, the programmer will do it for you.
215
216 All prebuilt images are padded with 0xFF, so their size will always be a **multiply of 64 KiB block** and they will not be bigger than the original versions. For example, **TP-Link** uses only first **64 KiB** block to store compressed U-Boot image (in most of their modern devices). In second 64 KiB block they store additional information like MAC address, model number and WPS pin number.
217
218 On the other hand, U-Boot image in **Carambola 2** from **8devices** may have up to **256 KiB** (4x 64 KiB block), they use uncompressed version and environment stored in flash. Immediately after the Carambola 2 U-Boot partition is an area which contains U-Boot environment variables (1x 64 KiB block), called `u-boot-env`:
219
220 ```
221 dev:    size   erasesize  name
222 mtd0: 00040000 00010000 "u-boot"
223 mtd1: 00010000 00010000 "u-boot-env"
224 mtd2: 00f90000 00010000 "firmware"
225 mtd3: 00e80000 00010000 "rootfs"
226 mtd4: 00cc0000 00010000 "rootfs_data"
227 mtd5: 00010000 00010000 "nvram"
228 mtd6: 00010000 00010000 "art"
229 ```
230
231 ### Using UART, U-Boot console and TFTP server
232
233 It is probably the most common method to change firmware in case of any problems. Main disadvantage of this approach is the need to connect with device using a serial port (it does not apply to Carambola 2 with development board, which has already built-in USB-UART adapter, based on FTDI FT232RQ).
234
235 #### Important notice!
236
237 All these devices have an UART interface integrated inside the SoC, operates at TTL 3.3 V (in fact, GPIO pins can work at this voltage, but their real range is < 3 V)!
238
239 Please, **do not** connect any RS232 +/- 12 V cable or any adapter without logic level converter, because it may damage your device. It would be the best if you use any USB to UART adapter with integrated 3.3 V logic level converter. And please, remember that **you should connect only RX, TX and GND signals**. **DO NOT** connect together 3.3 V signals from router and from adapter if you do not know what are you doing, because you may burn out your adapter and/or router! Connect the adapter using USB port in your PC and router with original power supply.
240
241 For a long time I have been using without any problems small and very cheap (about 1-2 USD) **CP2102** based adapter. Go to [Serial Console article in OpenWrt Wiki](http://wiki.openwrt.org/doc/hardware/port.serial) for more, detailed information.
242
243 #### Step by step instruction
244
245 1. Install and configure any **TFTP server** on your PC (on Windows, you can use [TFTP32](http://tftpd32.jounin.net)).
246
247 2. Set a fixed IP address on your PC (in this tutorial we will use **192.168.1.2** for the PC and **192.168.1.1** for the router) and connect it with the router, using RJ45 network cable (in most case you will need to use one of the available LAN ports, but WAN port should also works).
248
249 3. Connect USB to UART adapter to the router and start any application to communicate with it, like [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).   
250 Configure adapter to use the following settings:
251   * Baud rate: 115200
252   * Data bits: 8
253   * Parity control: none
254   * Stop bits: 1
255   * Handshaking: none
256 4. Power on the router, wait for a line like one of the following and interrupt the process of loading a kernel:
257
258   `Autobooting in 1 seconds` (for most **TP-Link** routers, you should enter `tpl` at this point)   
259   `Hit ESC key to stop autoboot:  1` (for **8devices Carambola 2**, use `ESC` key)   
260   `Hit any key to stop autoboot:  1` (for **D-Link DIR-505**, use any key)
261
262 5. Set `ipaddr` and `serverip` environment variables:
263
264   ```
265   hornet> setenv ipaddr 192.168.1.1
266   hornet> setenv serverip 192.168.1.2
267   ```
268 6. Check the changes:
269
270   ```
271   hornet> printenv ipaddr
272   ipaddr=192.168.1.1
273   hornet> printenv serverip
274   serverip=192.168.1.2
275   ```
276
277 7. Download and store in RAM proper image for your router, using `tftpboot` command in U-Boot console (in this example, for **TP-Link TL-MR3020**):
278
279   ```
280   tftpboot 0x80800000 uboot_for_tp-link_tl-mr3020.bin
281
282   eth1 link down
283   Using eth0 device
284   TFTP from server 192.168.1.2; our IP address is 192.168.1.1
285   Filename 'uboot_for_tp-link_tl-mr3020.bin'.
286   Load address: 0x80800000
287   Loading: #############
288   done
289   Bytes transferred = 65536 (10000 hex)
290   hornet>
291   ```
292
293 8. Next step is very risky! You are going to delete existing U-Boot image from flash in your device and copy from RAM the new one. If something goes wrong (for example, a power failure), your router, without bootloader, will not boot again!
294
295   You should also note the size of downloaded image. For supported **TP-Link** and **D-Link** routers it will be always **0x10000** (64 KiB), but for Carambola 2 image size is different: **0x40000** (256 KiB). In all cases, the start address of flash is **0x9F000000** and for RAM: **0x80000000** (as you may noticed, I did not use start address of RAM to store image and you should follow this approach).
296
297   Please, do not make any mistake with offsets and sizes during next steps!
298
299 9. Erase appropriate flash space for new U-Boot image (this command will remove default U-Boot image!):
300
301   ```
302   hornet> erase 0x9F000000 +0x10000   
303
304   First 0x0 last 0x0 sector size 0x10000
305   0
306   Erased 1 sectors
307   ```
308
309 10. Now your router does not have U-Boot, so do not wait and copy to flash the new one, stored earlier in RAM:
310
311   ```
312   hornet> cp.b 0x80800000 0x9F000000 0x10000   
313
314   Copy to Flash... write addr: 9f000000
315   done
316   ```
317
318 11. If you want, you can check content of the flash and compare it to the image on your PC, using `md` command in U-Boot console, which prints indicated memory area (press only ENTER after first execution of this command to move further in memory):
319
320   ```
321   hornet> md 0x9F000000
322
323   9f000000: 100000ff 00000000 100000fd 00000000    ................
324   9f000010: 10000222 00000000 10000220 00000000    ..."....... ....
325   9f000020: 1000021e 00000000 1000021c 00000000    ................
326   9f000030: 1000021a 00000000 10000218 00000000    ................
327   9f000040: 10000216 00000000 10000214 00000000    ................
328   9f000050: 10000212 00000000 10000210 00000000    ................
329   9f000060: 1000020e 00000000 1000020c 00000000    ................
330   9f000070: 1000020a 00000000 10000208 00000000    ................
331   9f000080: 10000206 00000000 10000204 00000000    ................
332   9f000090: 10000202 00000000 10000200 00000000    ................
333   9f0000a0: 100001fe 00000000 100001fc 00000000    ................
334   9f0000b0: 100001fa 00000000 100001f8 00000000    ................
335   9f0000c0: 100001f6 00000000 100001f4 00000000    ................
336   9f0000d0: 100001f2 00000000 100001f0 00000000    ................
337   9f0000e0: 100001ee 00000000 100001ec 00000000    ................
338   9f0000f0: 100001ea 00000000 100001e8 00000000    ................
339   ```
340
341 12. If you are sure that everything went OK, you may reset the board:
342
343   ```
344   hornet> reset
345   ```
346
347 ### Using OpenWrt
348
349 [TODO]
350
351 ### Using DD-WRT
352
353 [TODO]
354
355 How to use it?
356 --------------
357
358 [TODO]
359
360 How to compile the code?
361 ------------------------
362
363 You can use one of the free toolchains:
364
365 - [Sourcery CodeBench Lite Edition for MIPS GNU/Linux](https://sourcery.mentor.com/GNUToolchain/subscription3130?lite=MIPS),
366 - [OpenWrt Toolchain for AR71xx MIPS](http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2),
367 - [ELDK (Embedded Linux Development Kit)](ftp://ftp.denx.de/pub/eldk/),
368 - or any others...
369
370 I am using **Sourcery CodeBench Lite Edition for MIPS GNU/Linux** on **Ubuntu 12.04 LTS** (32-bit, virtual machine) and all released binary images were/will be built using this set.
371
372 All you need to do, after choosing a toolchain, is to modify [Makefile](Makefile) - change or remove `export MAKECMD` and if need add `export PATH`. For example, to use OpenWrt Toolchain instead of Sourcery CodeBench Lite, download it and extract into `toolchain` folder, inside the top dir and change first lines in [Makefile](Makefile):
373
374 ```
375 export BUILD_TOPDIR=$(PWD)
376 export STAGING_DIR=$(BUILD_TOPDIR)/tmp
377
378 export MAKECMD=make --silent ARCH=mips CROSS_COMPILE=mips-openwrt-linux-uclibc-
379 export PATH:=$(BUILD_TOPDIR)/toolchain/bin/:$(PATH)
380 ```
381
382 To build image, run `make model` inside top dir, for example, command:
383
384 ```
385 make tplink_wr703n
386 ```
387
388 will start building U-Boot image for **TP-Link TL-WR703N**.
389
390 FAQ
391 ---
392
393 #### 1. My device is not supported, but has the same hardware as one in the list, can I use this modification?
394
395 *It could be dangerous! I know that a lot of routers uses the same hardware - for example, TP-Link has a battery powered routers set, which contains: TL-MR10U, TL-MR11U (TL-MR3040 in Europe) TL-MR12U and TL-MR13U. All of them has the same platform: Atheros AR9331 with 32 MiB of DDR RAM and 4 MiB of SPI NOR FLASH. But, there may exist a slight difference, like GPIO pin number for reset button or LED(s), that may cause problems.*
396
397 *You can try, but remember that you are doing this only at your own risk!*
398
399 #### 2. I want to overclock my router, how can I do this?
400
401 *Currently, this option is available only for TP-Link routers with Atheros AR9331 (please, look at [ap121.h](u-boot/include/configs/ap121.h) file which contains all information about PLL register configuration and an untypical clocks for CPU, RAM and AHB). What more, you will need to compile the code yourself, because I will not publish images with non-default clocks.*
402
403 *And again, remember that you are doing this only at your own risk!*
404
405 #### 3. Do you test all prebuilt images before you publish them?
406
407 *No, because I don't have all supported devices, only few of them. But, I make tests for every supported SoC types.*
408
409 #### 4. I would like you to add support for device X.
410
411 *You can do it yourself and send me a pull request or a patch. If you do not want to, or do not know how to do it, please contact with me directly.*
412
413 #### 5. My device does not boot after upgrade!
414
415 *I told you... bootloader, in this case the U-Boot, is the most important piece of code inside your device. It is responsible for hardware initialization and booting an OS (kernel in this case). So, if during the upgrade something went wrong, your device will not boot any more. Now you need to remove the flash chip, load proper image using an external programmer and solder it back.*
416
417 License, outdated sources etc.
418 ------------------------------
419
420 **[U-Boot](http://www.denx.de/wiki/U-Boot/WebHome "U-Boot")** project is Free Software, licensed under version 2 of the **GNU General Public License**. All information about license, contributors etc., are included with sources, inside *u-boot* folder.
421
422 You should know, that most routers, especially those based on Atheros SoCs, uses very old versions of U-Boot (1.1.4 is from 2005/2006). So, *these sources are definitely outdated* (do not even try to merge them with official release), but it was easier for me to modify them, than move TP-Link/Atheros changes to the current version. Moreover, lot of unnecessary code fragments and source files were removed for ease of understanding the code.