Message ID | CADvTj4pr0H37giebu4B1ydN5z=LL7+MrOhOUfEYyQej9Tb0jjg@mail.gmail.com |
---|---|
State | RFC |
Headers | show |
some comments inline On 30.04.2015 04:08, James Hilliard wrote: > The Antminer S1 and S3 use a controller with a modified version of > OpenWRT which has a single ethernet port and a wifi antenna header. > This is the patch from their GPL source release which appears to break > support for the tl-wr741nd-v4 in order to support their board. What > would be the proper way to differentiate this device and add support > for it? > A separate ARCH file because replacing 741ND-v4 will break that unit This patch contains many different changes so it has to be split up. > Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c > =================================================================== > --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c > (revision 38031) > +++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr741nd-v4.c > (working copy) see above - create new file or make changes so it does not break supported targets > Index: target/linux/ar71xx/files/drivers/mtd/tplinkpart.c > =================================================================== > --- target/linux/ar71xx/files/drivers/mtd/tplinkpart.c (revision 38031) > +++ target/linux/ar71xx/files/drivers/mtd/tplinkpart.c (working copy) > @@ -149,7 +149,7 @@ > parts[0].name = "u-boot"; > parts[0].offset = 0; > parts[0].size = offset; > - parts[0].mask_flags = MTD_WRITEABLE; > + //parts[0].mask_flags = MTD_WRITEABLE; This seems to remove write protection from u-boot. This is dangerous and can result in really bad bricks > Index: target/linux/ar71xx/image/Makefile > =================================================================== > --- target/linux/ar71xx/image/Makefile (revision 38031) > +++ target/linux/ar71xx/image/Makefile (working copy) > @@ -921,7 +921,8 @@ > -$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,4Mlzma)) > +#$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,4Mlzma)) > +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,8Mlzma)) Same as first comment - this breaks/disables the working images of that router > --- package/network/services/dropbear/files/dropbear.config (revision 38031) > +++ package/network/services/dropbear/files/dropbear.config (working copy) > @@ -2,4 +2,5 @@ > option PasswordAuth 'on' > option RootPasswordAuth 'on' > option Port '22' > +# option Interface 'lan' > # option BannerFile '/etc/banner' dropbear change that affects all other platforms - remove > Index: package/base-files/files/lib/functions/uci-defaults.sh > =================================================================== > --- package/base-files/files/lib/functions/uci-defaults.sh (revision 38031) > +++ package/base-files/files/lib/functions/uci-defaults.sh (working copy) afaics this is related to LED and probably not needed > Index: package/base-files/files/etc/rc.button/reset > =================================================================== > --- package/base-files/files/etc/rc.button/reset (revision 38031) > +++ package/base-files/files/etc/rc.button/reset (working copy) > @@ -14,5 +14,5 @@ > elif [ "$SEEN" -gt 5 ] > then > echo "FACTORY RESET" > /dev/console > - jffs2reset -y && reboot & > + jffs2reset -y && reboot -f & as before this would affect other boards too > fi > Index: package/base-files/files/etc/shadow > =================================================================== > --- package/base-files/files/etc/shadow (revision 38031) > +++ package/base-files/files/etc/shadow (working copy) > @@ -1,4 +1,5 @@ > -root:x:0:0:99999:7::: > +root:$1$2zyJL0u3$UjHfNFlkkj9azThzkLaVA0:16013:0:99999:7::: > +admin:*:16013:0:99999:7::: remove (default root password that is antminer device/software specific) Is admin account needed for all other platforms? (add it to the software packages that needs it) > Index: package/base-files/files/etc/profile > =================================================================== > --- package/base-files/files/etc/profile (revision 38031) > +++ package/base-files/files/etc/profile (working copy) > @@ -8,6 +8,7 @@ > > [ -x /bin/more ] || alias more=less > [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi > +[ -x /bin/ls ] && alias ll=ls -l while nice this might waste some bytes > > [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc > > Index: package/base-files/files/etc/config/system > =================================================================== > --- package/base-files/files/etc/config/system (revision 38031) > +++ package/base-files/files/etc/config/system (working copy) > @@ -1,6 +1,8 @@ > config system > - option hostname OpenWrt > - option timezone UTC > + option hostname antMiner > + #option timezone UTC > + option zonename 'Asia/Shanghai' > + option timezone 'CST-8' remove - antMiner firmware specific settings > Index: tools/firmware-utils/src/mktplinkfw.c > =================================================================== > --- tools/firmware-utils/src/mktplinkfw.c (revision 38031) > +++ tools/firmware-utils/src/mktplinkfw.c (working copy) > @@ -269,10 +269,16 @@ the changeset for this file disables working images when it should only add an image for that antminer device > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >
Index: target/linux/ar71xx/files/drivers/mtd/tplinkpart.c =================================================================== --- target/linux/ar71xx/files/drivers/mtd/tplinkpart.c (revision 38031) +++ target/linux/ar71xx/files/drivers/mtd/tplinkpart.c (working copy) @@ -149,7 +149,7 @@ parts[0].name = "u-boot"; parts[0].offset = 0; parts[0].size = offset; - parts[0].mask_flags = MTD_WRITEABLE; + //parts[0].mask_flags = MTD_WRITEABLE; parts[1].name = "kernel"; parts[1].offset = offset; @@ -159,15 +159,24 @@ parts[2].offset = rootfs_offset; parts[2].size = art_offset - rootfs_offset; + parts[4].name = "art"; + parts[4].offset = art_offset; + parts[4].size = TPLINK_ART_LEN; + //part4[3].mask_flags = MTD_WRITEABLE; + + parts[3].name = "firmware"; + parts[3].offset = offset; + parts[3].size = art_offset - offset; + #if 0 parts[3].name = "art"; parts[3].offset = art_offset; parts[3].size = TPLINK_ART_LEN; - parts[3].mask_flags = MTD_WRITEABLE; + //parts[3].mask_flags = MTD_WRITEABLE; parts[4].name = "firmware"; parts[4].offset = offset; parts[4].size = art_offset - offset; - + #endif vfree(header); *pparts = parts; Index: target/linux/ar71xx/image/Makefile =================================================================== --- target/linux/ar71xx/image/Makefile (revision 38031) +++ target/linux/ar71xx/image/Makefile (working copy) @@ -921,7 +921,8 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma)) -$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,4Mlzma)) +#$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,4Mlzma)) +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR743NV2,tl-wr743nd-v2,TL-WR741ND-v4,ttyATH0,115200,0x07430002,1,8Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR941NV6,tl-wr941nd-v6,TL-WDR3500,ttyS0,115200,0x09410006,1,4Mlzma)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma)) Index: target/linux/ar71xx/base-files/etc/uci-defaults/01_leds =================================================================== --- target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (revision 38031) +++ target/linux/ar71xx/base-files/etc/uci-defaults/01_leds (working copy) @@ -181,7 +181,8 @@ ;; tl-wr741nd-v4) - ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1" "link tx rx" + ucidef_set_led_netdev "wanl" "WANL" "tp-link:green:wan_link" "eth1" "link" ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04" ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" Index: package/network/services/dropbear/files/dropbear.config =================================================================== --- package/network/services/dropbear/files/dropbear.config (revision 38031) +++ package/network/services/dropbear/files/dropbear.config (working copy) @@ -2,4 +2,5 @@ option PasswordAuth 'on' option RootPasswordAuth 'on' option Port '22' +# option Interface 'lan' # option BannerFile '/etc/banner' Index: package/base-files/files/lib/functions/uci-defaults.sh =================================================================== --- package/base-files/files/lib/functions/uci-defaults.sh (revision 38031) +++ package/base-files/files/lib/functions/uci-defaults.sh (working copy) @@ -8,7 +8,11 @@ local name=$2 local sysfs=$3 local dev=$4 + local mode="link tx rx" + if [ -n "$5" ]; then + mode=$5 + fi uci -q get system.$cfg && return 0 uci batch <<EOF @@ -17,7 +21,7 @@ set system.$cfg.sysfs='$sysfs' set system.$cfg.trigger='netdev' set system.$cfg.dev='$dev' -set system.$cfg.mode='link tx rx' +set system.$cfg.mode='$mode' EOF UCIDEF_LEDS_CHANGED=1 } Index: package/base-files/files/etc/rc.button/reset =================================================================== --- package/base-files/files/etc/rc.button/reset (revision 38031) +++ package/base-files/files/etc/rc.button/reset (working copy) @@ -14,5 +14,5 @@ elif [ "$SEEN" -gt 5 ] then echo "FACTORY RESET" > /dev/console - jffs2reset -y && reboot & + jffs2reset -y && reboot -f & fi Index: package/base-files/files/etc/shadow =================================================================== --- package/base-files/files/etc/shadow (revision 38031) +++ package/base-files/files/etc/shadow (working copy) @@ -1,4 +1,5 @@ -root:x:0:0:99999:7::: +root:$1$2zyJL0u3$UjHfNFlkkj9azThzkLaVA0:16013:0:99999:7::: +admin:*:16013:0:99999:7::: daemon:*:0:0:99999:7::: ftp:*:0:0:99999:7::: network:*:0:0:99999:7::: Index: package/base-files/files/etc/profile =================================================================== --- package/base-files/files/etc/profile (revision 38031) +++ package/base-files/files/etc/profile (working copy) @@ -8,6 +8,7 @@ [ -x /bin/more ] || alias more=less [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi +[ -x /bin/ls ] && alias ll=ls -l [ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc Index: package/base-files/files/etc/config/system =================================================================== --- package/base-files/files/etc/config/system (revision 38031) +++ package/base-files/files/etc/config/system (working copy) @@ -1,6 +1,8 @@ config system - option hostname OpenWrt - option timezone UTC + option hostname antMiner + #option timezone UTC + option zonename 'Asia/Shanghai' + option timezone 'CST-8' config timeserver ntp list server 0.openwrt.pool.ntp.org Index: tools/firmware-utils/src/mktplinkfw.c =================================================================== --- tools/firmware-utils/src/mktplinkfw.c (revision 38031) +++ tools/firmware-utils/src/mktplinkfw.c (working copy) @@ -269,10 +269,16 @@ .hw_rev = 1, .layout_id = "4M", }, { + /*}, { .id = "TL-WR741NDv4", .hw_id = HWID_TL_WR741ND_V4, .hw_rev = 1, .layout_id = "4Mlzma", + }, {*/ + .id = "TL-WR741NDv4", + .hw_id = HWID_TL_WR741ND_V4, + .hw_rev = 1, + .layout_id = "4Mlzma", }, { .id = "TL-WR740Nv1", .hw_id = HWID_TL_WR740N_V1, @@ -283,16 +289,22 @@ .hw_id = HWID_TL_WR740N_V3, .hw_rev = 1, .layout_id = "4M", - }, { + /*},{ .id = "TL-WR743NDv1", .hw_id = HWID_TL_WR743ND_V1, .hw_rev = 1, .layout_id = "4M", + }, {*/ }, { + .id = "TL-WR743NDv1", + .hw_id = HWID_TL_WR743ND_V2, + .hw_rev = 1, + .layout_id = "8M", + }, { .id = "TL-WR743NDv2", .hw_id = HWID_TL_WR743ND_V2, .hw_rev = 1, - .layout_id = "4Mlzma", + .layout_id = "8Mlzma", }, { .id = "TL-WR841Nv1.5", .hw_id = HWID_TL_WR841N_V1_5,