Skip to content

Commit

Permalink
* pepe2k的更新版本,这是[Jun 19 2013]
Browse files Browse the repository at this point in the history
* 也就是2013-6-19
* 修正了启动偶尔失败的问题
* Pepe2K的更新日志

Jun 19 2013
- fixed problem with booting in some cases on all supported models
- support for TL-MR10U ver. 1.x (tested on ver. 1.0)
- support fot TL-MR3220 ver. 2.x (tested on ver. 2.1)
- support for TL-WR720N ver. 3 (only for Chinese version!)
- support for new flash types/series: Macronix MX25L128 and SST 25VF064C
- version for TL-WR740N v4 was tested also on TL-WR741ND ver. 4.2 (it's almost the same hardware)
  • Loading branch information
screekworkshop committed Jul 19, 2013
1 parent 9dcb703 commit a78e170
Show file tree
Hide file tree
Showing 13 changed files with 210 additions and 107 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Jun 19 2013
- fixed problem with booting in some cases on all supported models
- support for TL-MR10U ver. 1.x (tested on ver. 1.0)
- support fot TL-MR3220 ver. 2.x (tested on ver. 2.1)
- support for TL-WR720N ver. 3 (only for Chinese version!)
- support for new flash types/series: Macronix MX25L128 and SST 25VF064C
- version for TL-WR740N v4 was tested also on TL-WR741ND ver. 4.2 (it's almost the same hardware)

Apr 22 2013
- support for TL-WR740N ver. 4 (tested on ver. 4.23)
- NetConsole
Expand All @@ -10,3 +18,4 @@ Apr 22 2013

Mar 29 2013
- initial release

29 changes: 25 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,55 @@ export AP121_MAX_UBOOT_SIZE=65536
# boot delay (time to autostart boot command)
export AP121_CONFIG_BOOTDELAY=1

mr3020: export UBOOT_FILE_NAME=uboot_for_mr3020
mr3020: export UBOOT_FILE_NAME=uboot_for_tl-mr3020
mr3020:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr3020_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

wr703n: export UBOOT_FILE_NAME=uboot_for_wr703n
wr703n: export UBOOT_FILE_NAME=uboot_for_tl-wr703n
wr703n:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) wr703n_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

wr720n_v3_CH: export UBOOT_FILE_NAME=uboot_for_tl-wr720n_v3_CH
wr720n_v3_CH:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) wr720n_v3_CH_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

mr3040: export UBOOT_FILE_NAME=uboot_for_mr3040
mr3040: export UBOOT_FILE_NAME=uboot_for_tl-mr3040
mr3040:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr3040_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

wr740n_v4: export UBOOT_FILE_NAME=uboot_for_wr740n_v4
mr10u: export UBOOT_FILE_NAME=uboot_for_tl-mr10u
mr10u:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr10u_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

wr740n_v4: export UBOOT_FILE_NAME=uboot_for_tl-wr740n_v4
wr740n_v4:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) wr740n_v4_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

mr3220_v2: export UBOOT_FILE_NAME=uboot_for_tl-mr3220_v2
mr3220_v2:
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) mr3220_v2_config
@cd $(BUILD_TOPDIR)/u-boot/ && $(MAKECMD) ENDIANNESS=-EB V=1 all
@cp $(BUILD_TOPDIR)/u-boot/tuboot.bin $(BUILD_TOPDIR)/bin/temp.bin
@make show_size

show_size:
@echo "\n======= Preparing 64 KB file filled with 0xFF... ======="
@`tr "\000" "\377" < /dev/zero | dd ibs=1k count=64 of=$(BUILD_TOPDIR)/bin/$(UBOOT_FILE_NAME).bin`
Expand Down
5 changes: 4 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ Supported flash chips (recognized automaticly by JEDEC ID):
- EON EN25Q64 (8 MB, JEDEC ID: 1C 3017)*
- Micron M25P64 (8 MB, JEDEC ID: 20 2017)
- Windbond W25Q64 (8 MB, JEDEC ID: EF 4017)*
- Macronix MX25L640 (8 MB, JEDEC ID: C2 2017)
- Macronix MX25L64 (8 MB, JEDEC ID: C2 2017, C2 2617)
- SST 25VF064C (8 MB, JEDEC ID: BF 254B)

16 MiB:
- Winbond W25Q128 (16 MB, JEDEC ID: EF 4018)*
- Macronix MX25L128 (16 MB, JEDEC ID: C2 2018, C2 2618)

* - tested

If you want to use other type, please contact with me: pepe2k@gmail.com

More information about this project:
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/

2 changes: 1 addition & 1 deletion toolchain/README
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Here you should extract toolchain for AR71xx platform (MIPS).
For example: http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2
For example: http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2
42 changes: 41 additions & 1 deletion u-boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ wr703n_config : unconfig hornet_common_config
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR703N\"" >>include/config.h

wr720n_v3_CH_config : unconfig hornet_common_config
@echo '======= Configuring for TL-WR720N v3 CH at:' `date` '======='
@echo "#define CONFIG_PID_WR720N03CH 1" >> include/config.h
@echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
@echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR720N v3 CH\"" >>include/config.h

mr3020_config : unconfig hornet_common_config
@echo '======= Configuring for TL-MR3020 at:' `date` '======='
@echo "#define CONFIG_PID_MR302001 1" >> include/config.h
Expand All @@ -316,6 +324,14 @@ mr3040_config : unconfig hornet_common_config
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR3040\"" >>include/config.h

mr10u_config : unconfig hornet_common_config
@echo '======= Configuring for TL-MR10U at:' `date` '======='
@echo "#define CONFIG_PID_MR10U01 1" >> include/config.h
@echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
@echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR10U\"" >>include/config.h

wr740n_v4_config : unconfig hornet_common_config
@echo '======= Configuring for TL-WR740N v4 at:' `date` '======='
@echo "#define CONFIG_PID_WR740N04 1" >> include/config.h
Expand All @@ -336,7 +352,31 @@ wr740n_v4_config : unconfig hornet_common_config
@echo "#define GPIO_QSS_LED_BIT 1" >> include/config.h
@echo "#define GPIO_QSS_LED_ON 1" >> include/config.h
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR740N(D)v4\"" >>include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR74xN/D v4\"" >>include/config.h

mr3220_v2_config : unconfig hornet_common_config
@echo '======= Configuring for TL-MR3220 v2 at:' `date` '======='
@echo "#define CONFIG_PID_MR322002 1" >> include/config.h
@echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
@echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
@echo "#define GPIO_WLAN_LED_BIT 0" >> include/config.h
@echo "#define GPIO_WLAN_LED_ON 1" >> include/config.h
@echo "#define GPIO_LAN1_LED_BIT 14" >> include/config.h
@echo "#define GPIO_LAN1_LED_ON 1" >> include/config.h
@echo "#define GPIO_LAN2_LED_BIT 15" >> include/config.h
@echo "#define GPIO_LAN2_LED_ON 1" >> include/config.h
@echo "#define GPIO_LAN3_LED_BIT 16" >> include/config.h
@echo "#define GPIO_LAN3_LED_ON 1" >> include/config.h
@echo "#define GPIO_LAN4_LED_BIT 17" >> include/config.h
@echo "#define GPIO_LAN4_LED_ON 0" >> include/config.h
@echo "#define GPIO_INTERNET_LED_BIT 13" >> include/config.h
@echo "#define GPIO_INTERNET_LED_ON 1" >> include/config.h
@echo "#define GPIO_QSS_LED_BIT 1" >> include/config.h
@echo "#define GPIO_QSS_LED_ON 1" >> include/config.h
@echo "#define GPIO_USB_LED_BIT 26" >> include/config.h
@echo "#define GPIO_USB_LED_ON 1" >> include/config.h
@echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
@echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR3220 v2\"" >>include/config.h

#########################################################################
#########################################################################
Expand Down
82 changes: 0 additions & 82 deletions u-boot/board/ar7240/ap121/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,88 +9,6 @@ ifeq ($(BOARD), ap121)
SOBJS += hornet_pll_init.o
endif

#added by zcf, this is specific to each product
ifdef CONFIG_PID_MR302001
CFLAGS += -DCONFIG_PID_MR302001=$(CONFIG_PID_MR302001)
CFLAGS += -DGPIO_PHY_LED_BIT=$(GPIO_PHY_LED_BIT)
CFLAGS += -DGPIO_INTERNET_LED_BIT=$(GPIO_INTERNET_LED_BIT)
CFLAGS += -DGPIO_INTERNET_LED_ON=$(GPIO_INTERNET_LED_ON)
CFLAGS += -DGPIO_JUMPSTART_LED_BIT=$(GPIO_JUMPSTART_LED_BIT)
CFLAGS += -DGPIO_JUMPSTART_LED_ON=$(GPIO_JUMPSTART_LED_ON)
CFLAGS += -DGPIO_WLAN_LED_BIT=$(GPIO_WLAN_LED_BIT)
CFLAGS += -DGPIO_WLAN_LED_ON=$(GPIO_WLAN_LED_ON)
CFLAGS += -DGPIO_RST_BUTTON_BIT=$(GPIO_RST_BUTTON_BIT)
CFLAGS += -DNUM_OF_RJ45=$(NUM_OF_RJ45)
CFLAGS += -DGPIO_RJ45_BASE=$(GPIO_RJ45_BASE)
CFLAGS += -DGPIO_RJ45_ON=$(GPIO_RJ45_ON)
endif

ifdef CONFIG_PID_WR74104
CFLAGS += -DCONFIG_PID_WR74104=$(CONFIG_PID_WR74104)
CFLAGS += -DGPIO_PHY_LED_BIT=$(GPIO_PHY_LED_BIT)
CFLAGS += -DGPIO_SYS_LED_BIT=$(GPIO_SYS_LED_BIT)
CFLAGS += -DGPIO_SYS_LED_ON=$(GPIO_SYS_LED_ON)
CFLAGS += -DGPIO_JUMPSTART_LED_BIT=$(GPIO_JUMPSTART_LED_BIT)
CFLAGS += -DGPIO_JUMPSTART_LED_ON=$(GPIO_JUMPSTART_LED_ON)
CFLAGS += -DGPIO_WLAN_LED_BIT=$(GPIO_WLAN_LED_BIT)
CFLAGS += -DGPIO_WLAN_LED_ON=$(GPIO_WLAN_LED_ON)
CFLAGS += -DNUM_OF_RJ45=$(NUM_OF_RJ45)
CFLAGS += -DGPIO_RJ45_BASE=$(GPIO_RJ45_BASE)
CFLAGS += -DGPIO_RJ45_ON=$(GPIO_RJ45_ON)
endif

ifdef CONFIG_PID_WR74302CN
CFLAGS += -DCONFIG_PID_WR74302CN=$(CONFIG_PID_WR74302CN)
CFLAGS += -DGPIO_SYS_LED_BIT=$(GPIO_SYS_LED_BIT)
CFLAGS += -DGPIO_SYS_LED_ON=$(GPIO_SYS_LED_ON)
CFLAGS += -DGPIO_JUMPSTART_LED_BIT=$(GPIO_JUMPSTART_LED_BIT)
CFLAGS += -DGPIO_JUMPSTART_LED_ON=$(GPIO_JUMPSTART_LED_ON)
CFLAGS += -DGPIO_INTERNET_LED_BIT=$(GPIO_INTERNET_LED_BIT)
CFLAGS += -DGPIO_INTERNET_LED_ON=$(GPIO_INTERNET_LED_ON)
CFLAGS += -DGPIO_WLAN_LED_BIT=$(GPIO_WLAN_LED_BIT)
CFLAGS += -DGPIO_WLAN_LED_ON=$(GPIO_WLAN_LED_ON)
CFLAGS += -DGPIO_RESET_FAC_BIT=$(GPIO_RESET_FAC_BIT)
CFLAGS += -DGPIO_FAC_RST_HOLD_TIME=$(GPIO_FAC_RST_HOLD_TIME)
CFLAGS += -DJUMPSTART_RST_MULTIPLEXED=$(JUMPSTART_RST_MULTIPLEXED)
CFLAGS += -DGPIO_USB_POWER_SUPPORT=$(GPIO_USB_POWER_SUPPORT)
CFLAGS += -DGPIO_USB_POWER_ON=$(GPIO_USB_POWER_ON)
endif

ifdef CONFIG_PID_MR322002
CFLAGS += -DCONFIG_PID_MR322002=$(CONFIG_PID_MR322002)
CFLAGS += -DGPIO_SYS_LED_BIT=$(GPIO_SYS_LED_BIT)
CFLAGS += -DGPIO_SYS_LED_ON=$(GPIO_SYS_LED_ON)
CFLAGS += -DGPIO_JUMPSTART_LED_BIT=$(GPIO_JUMPSTART_LED_BIT)
CFLAGS += -DGPIO_JUMPSTART_LED_ON=$(GPIO_JUMPSTART_LED_ON)
CFLAGS += -DGPIO_INTERNET_LED_BIT=$(GPIO_INTERNET_LED_BIT)
CFLAGS += -DGPIO_INTERNET_LED_ON=$(GPIO_INTERNET_LED_ON)
CFLAGS += -DGPIO_WLAN_LED_BIT=$(GPIO_WLAN_LED_BIT)
CFLAGS += -DGPIO_WLAN_LED_ON=$(GPIO_WLAN_LED_ON)
CFLAGS += -DGPIO_RESET_FAC_BIT=$(GPIO_RESET_FAC_BIT)
CFLAGS += -DGPIO_FAC_RST_HOLD_TIME=$(GPIO_FAC_RST_HOLD_TIME)
CFLAGS += -DJUMPSTART_RST_MULTIPLEXED=$(JUMPSTART_RST_MULTIPLEXED)
CFLAGS += -DGPIO_USB_POWER_SUPPORT=$(GPIO_USB_POWER_SUPPORT)
CFLAGS += -DGPIO_USB_POWER_ON=$(GPIO_USB_POWER_ON)
endif

ifdef CONFIG_PID_WR70301
CFLAGS += -DCONFIG_PID_WR70301=$(CONFIG_PID_WR70301)
CFLAGS += -DGPIO_SYS_LED_BIT=$(GPIO_SYS_LED_BIT)
CFLAGS += -DGPIO_SYS_LED_ON=$(GPIO_SYS_LED_ON)
CFLAGS += -DGPIO_RST_BUTTON_BIT=$(GPIO_RST_BUTTON_BIT)
endif

ifdef CONFIG_PID_MR11U01
CFLAGS += -DCONFIG_PID_MR11U01=$(CONFIG_PID_MR11U01)
CFLAGS += -DGPIO_JUMPSTART_LED_BIT=$(GPIO_JUMPSTART_LED_BIT)
CFLAGS += -DGPIO_JUMPSTART_LED_ON=$(GPIO_JUMPSTART_LED_ON)
CFLAGS += -DGPIO_INTERNET_LED_BIT=$(GPIO_INTERNET_LED_BIT)
CFLAGS += -DGPIO_INTERNET_LED_ON=$(GPIO_INTERNET_LED_ON)
CFLAGS += -DGPIO_RESET_FAC_BIT=$(GPIO_RESET_FAC_BIT)
CFLAGS += -DGPIO_FAC_RST_HOLD_TIME=$(GPIO_FAC_RST_HOLD_TIME)
CFLAGS += -DGPIO_USB_POWER_SUPPORT=$(GPIO_USB_POWER_SUPPORT)
CFLAGS += -DGPIO_USB_POWER_ON=$(GPIO_USB_POWER_ON)
endif
$(LIB): .depend $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS) $(SOBJS)

Expand Down
Loading

0 comments on commit a78e170

Please sign in to comment.