Skip to content

Instantly share code, notes, and snippets.

@cj1324
Created October 24, 2013 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cj1324/7131925 to your computer and use it in GitHub Desktop.
Save cj1324/7131925 to your computer and use it in GitHub Desktop.
GL-iNet OpenWrt Patch base attitude_adjustment, http://www.gl-inet.com/
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c (revision 38494)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c (working copy)
@@ -21,7 +21,9 @@
#include "dev-wmac.h"
#include "machtypes.h"
-#define TL_WR703N_GPIO_LED_SYSTEM 27
+#define TL_WR703N_GPIO_LED_SYSTEM 13
+#define TL_WR703N_GPIO_LED_GFW 0
+
#define TL_WR703N_GPIO_BTN_RESET 11
#define TL_WR703N_GPIO_USB_POWER 8
@@ -44,6 +46,11 @@
.gpio = TL_WR703N_GPIO_LED_SYSTEM,
.active_low = 1,
},
+ {
+ .name = "tp-link:red:gfw",
+ .gpio = TL_WR703N_GPIO_LED_GFW,
+ .active_low = 0,
+ },
};
static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
@@ -77,10 +84,13 @@
"USB power");
ath79_register_usb();
- ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac, 2);
ath79_register_mdio(0, 0x0);
+
ath79_register_eth(0);
+ ath79_register_eth(1);
ath79_register_wmac(ee, mac);
}
Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile (revision 38494)
+++ target/linux/ar71xx/image/Makefile (working copy)
@@ -875,7 +875,7 @@
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
-$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/network (revision 38494)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/network (working copy)
@@ -158,7 +158,6 @@
tl-mr3040 |\
tl-wa901nd |\
tl-wa901nd-v2 |\
-tl-wr703n |\
wp543)
ucidef_set_interface_lan "eth0"
;;
@@ -170,6 +169,7 @@
pb42 |\
pb44 |\
routerstation|\
+tl-wr703n |\
wpe72)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
Index: package/base-files/files/lib/functions/uci-defaults.sh
===================================================================
--- package/base-files/files/lib/functions/uci-defaults.sh (revision 38494)
+++ package/base-files/files/lib/functions/uci-defaults.sh (working copy)
@@ -172,8 +172,8 @@
set network.lan.ifname='$ifname'
set network.lan.type='bridge'
set network.lan.proto='static'
-set network.lan.ipaddr='192.168.1.1'
-set network.lan.netmask='255.255.255.0'
+set network.lan.ipaddr='172.16.1.253'
+set network.lan.netmask='255.255.254.0'
EOF
}
Index: package/base-files/files/bin/login.sh
===================================================================
--- package/base-files/files/bin/login.sh (revision 38494)
+++ package/base-files/files/bin/login.sh (working copy)
@@ -9,10 +9,7 @@
exit 0
else
cat << EOF
- === IMPORTANT ============================
- Use 'passwd' to set your login password
- this will disable telnet and enable SSH
- ------------------------------------------
+ === Update By HanChen ===
EOF
fi
Index: package/base-files/files/etc/shells
===================================================================
--- package/base-files/files/etc/shells (revision 38494)
+++ package/base-files/files/etc/shells (working copy)
@@ -1 +1,2 @@
/bin/ash
+/bin/mksh
Index: package/base-files/files/etc/openwrt_release
===================================================================
--- package/base-files/files/etc/openwrt_release (revision 38494)
+++ package/base-files/files/etc/openwrt_release (working copy)
@@ -4,3 +4,4 @@
DISTRIB_CODENAME="%n"
DISTRIB_TARGET="%S"
DISTRIB_DESCRIPTION="%D %N %V"
+MODIFY_BY="HanChen"
Index: package/base-files/files/etc/passwd
===================================================================
--- package/base-files/files/etc/passwd (revision 38494)
+++ package/base-files/files/etc/passwd (working copy)
@@ -1,4 +1,4 @@
-root:x:0:0:root:/root:/bin/ash
+root:x:0:0:root:/root:/bin/mksh
daemon:*:1:1:daemon:/var:/bin/false
ftp:*:55:55:ftp:/home/ftp:/bin/false
network:*:101:101:network:/var:/bin/false
Index: package/base-files/files/etc/banner
===================================================================
--- package/base-files/files/etc/banner (revision 38494)
+++ package/base-files/files/etc/banner (working copy)
@@ -1,16 +1,3 @@
- _______ ________ __
- | |.-----.-----.-----.| | | |.----.| |_
- | - || _ | -__| || | | || _|| _|
- |_______|| __|_____|__|__||________||__| |____|
- |__| W I R E L E S S F R E E D O M
- -----------------------------------------------------
- ATTITUDE ADJUSTMENT (%C, %R)
- -----------------------------------------------------
- * 1/4 oz Vodka Pour all ingredients into mixing
- * 1/4 oz Gin tin with ice, strain into glass.
- * 1/4 oz Amaretto
- * 1/4 oz Triple sec
- * 1/4 oz Peach schnapps
- * 1/4 oz Sour mix
- * 1 splash Cranberry juice
- -----------------------------------------------------
+ ___________________
+ [ Update By HanChen ]
+ ^^^^^^^^^^^^^^^^^^^
Index: package/base-files/files/etc/config/system
===================================================================
--- package/base-files/files/etc/config/system (revision 38494)
+++ package/base-files/files/etc/config/system (working copy)
@@ -1,6 +1,7 @@
config system
- option hostname OpenWrt
- option timezone UTC
+ option hostname 'KSHCWrt'
+ option zonename 'Asia/Shanghai'
+ option timezone 'CST-8'
config timeserver ntp
list server 0.openwrt.pool.ntp.org
Index: package/base-files/files/etc/config/network
===================================================================
--- package/base-files/files/etc/config/network (revision 38494)
+++ package/base-files/files/etc/config/network (working copy)
@@ -6,9 +6,16 @@
option ipaddr 127.0.0.1
option netmask 255.0.0.0
-config interface lan
- option ifname eth0
- option type bridge
- option proto static
- option ipaddr 192.168.1.1
- option netmask 255.255.255.0
+config interface 'lan'
+ option ifname 'eth0'
+ option type 'bridge'
+ option proto 'static'
+ option ipaddr '172.16.1.253'
+ option netmask '255.255.254.0'
+
+config interface 'wan'
+ option ifname 'eth1'
+ option _orig_ifname 'eth1'
+ option _orig_bridge 'false'
+ option proto 'dhcp'
+ option hostname 'KSHCWrt'
Index: package/mac80211/files/lib/wifi/mac80211.sh
===================================================================
--- package/mac80211/files/lib/wifi/mac80211.sh (revision 38494)
+++ package/mac80211/files/lib/wifi/mac80211.sh (working copy)
@@ -625,14 +625,16 @@
$dev_id
$ht_capab
# REMOVE THIS LINE TO ENABLE WIFI:
- option disabled 1
+ option disabled 0
config wifi-iface
option device radio$devidx
option network lan
option mode ap
- option ssid OpenWrt
- option encryption none
+ option ssid KSHCWrt
+ option encryption psk2
+ option key HanchenWrt
+ option hidden 1
EOF
devidx=$(($devidx + 1))
Index: tools/firmware-utils/src/mktplinkfw.c
===================================================================
--- tools/firmware-utils/src/mktplinkfw.c (revision 38494)
+++ tools/firmware-utils/src/mktplinkfw.c (working copy)
@@ -287,7 +287,7 @@
.id = "TL-WR703Nv1",
.hw_id = HWID_TL_WR703N_V1,
.hw_rev = 1,
- .layout_id = "4Mlzma",
+ .layout_id = "8Mlzma",
}, {
/* terminating entry */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment