Author: blogic
Date: 2015-10-20 21:03:26 +0200 (Tue, 20 Oct 2015)
New Revision: 47242

Modified:
   branches/chaos_calmer/target/linux/ar71xx/base-files/etc/diag.sh
   branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
   
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
   branches/chaos_calmer/target/linux/ar71xx/base-files/lib/ar71xx.sh
   
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
   
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
   branches/chaos_calmer/target/linux/ar71xx/generic/profiles/antminer.mk
   branches/chaos_calmer/target/linux/ar71xx/image/Makefile
   
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
   
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
   branches/chaos_calmer/tools/firmware-utils/src/mktplinkfw.c
Log:
ar71xx: Bitmain Antminer S1 & S3 cleanup

Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Corrects the profile names in the Makefile and changes tabs to spaces
in the Makefile 'define Device/' like the other devices.
Other corrections such as the Machine Name and HWIDs

Signed-off-by: L. D. Pinney <[email protected]>

Modified: branches/chaos_calmer/target/linux/ar71xx/base-files/etc/diag.sh
===================================================================
--- branches/chaos_calmer/target/linux/ar71xx/base-files/etc/diag.sh    
2015-10-20 18:17:12 UTC (rev 47241)
+++ branches/chaos_calmer/target/linux/ar71xx/base-files/etc/diag.sh    
2015-10-20 19:03:26 UTC (rev 47242)
@@ -12,9 +12,11 @@
        all0305)
                status_led="eap7660d:green:ds4"
                ;;
-       antminer-s1|\
+       antminer-s1)
+               status_led="antminer-s1:green:system"
+               ;;
        antminer-s3)
-               status_led="bitmain:green:system"
+               status_led="antminer-s3:green:system"
                ;;
        ap132)
                status_led="ap132:green:status"

Modified: 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds   
    2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds   
    2015-10-20 19:03:26 UTC (rev 47242)
@@ -32,14 +32,14 @@
        ;;
 
 antminer-s1)
-       ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-       ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
+       ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
+       ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
        ;;
 
 antminer-s3)
-       ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
-       ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-       ucidef_set_led_default "lan" "LAN" "bitmain:yellow:lan" "0"
+       ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
+       ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
+       ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
        ;;
 
 ap113)

Modified: 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
    2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
    2015-10-20 19:03:26 UTC (rev 47242)
@@ -322,6 +322,8 @@
        ;;
 
 all0305 |\
+antminer-s1 |\
+antminer-s3 |\
 aw-nr580 |\
 bullet-m |\
 cap4200ag |\
@@ -366,8 +368,6 @@
        ucidef_set_interface_lan "eth0"
        ;;
 
-antminer-s1 |\
-antminer-s3 |\
 dir-505-a1)
        ucidef_set_interface_lan "eth1"
        ;;

Modified: branches/chaos_calmer/target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- branches/chaos_calmer/target/linux/ar71xx/base-files/lib/ar71xx.sh  
2015-10-20 18:17:12 UTC (rev 47241)
+++ branches/chaos_calmer/target/linux/ar71xx/base-files/lib/ar71xx.sh  
2015-10-20 19:03:26 UTC (rev 47242)
@@ -107,11 +107,11 @@
        "015300"*)
                model="EasyLink EL-MINI"
                ;;
-       "04440001"*)
-               model="BITMAIN ANTMINER S1"
+       "044401"*)
+               model="ANTMINER-S1"
                ;;
-       "04440003"*)
-               model="BITMAIN ANTMINER S3"
+       "044403"*)
+               model="ANTMINER-S3"
                ;;
        "120000"*)
                model="MERCURY MAC1200R"
@@ -344,6 +344,12 @@
        *ALL0315N)
                name="all0315n"
                ;;
+       *Antminer-S1)
+               name="antminer-s1"
+               ;;
+       *Antminer-S3)
+               name="antminer-s3"
+               ;;
        *AP113)
                name="ap113"
                ;;

Modified: 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
  2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
  2015-10-20 19:03:26 UTC (rev 47242)
@@ -42,11 +42,11 @@
 
 static struct gpio_led ANTMINER_S1_leds_gpio[] __initdata = {
        {
-               .name           = "bitmain:green:system",
+               .name           = "antminer-s1:green:system",
                .gpio           = ANTMINER_S1_GPIO_LED_SYSTEM,
                .active_low     = 0,
        },{
-               .name           = "bitmain:green:wlan",
+               .name           = "antminer-s1:green:wlan",
                .gpio           = ANTMINER_S1_GPIO_LED_WLAN,
                .active_low     = 0,
        },
@@ -95,4 +95,4 @@
 }
 
 MIPS_MACHINE(ATH79_MACH_ANTMINER_S1, "ANTMINER-S1",
-            "Bitmain Antminer S1", antminer_s1_setup);
+            "Antminer-S1", antminer_s1_setup);

Modified: 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
  2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
  2015-10-20 19:03:26 UTC (rev 47242)
@@ -42,15 +42,15 @@
 
 static struct gpio_led ANTMINER_S3_leds_gpio[] __initdata = {
        {
-               .name           = "bitmain:green:wlan",
+               .name           = "antminer-s3:green:wlan",
                .gpio           = ANTMINER_S3_GPIO_LED_WLAN,
                .active_low     = 0,
        },{
-               .name           = "bitmain:green:system",
+               .name           = "antminer-s3:green:system",
                .gpio           = ANTMINER_S3_GPIO_LED_SYSTEM,
                .active_low     = 0,
        },{
-               .name           = "bitmain:yellow:lan",
+               .name           = "antminer-s3:yellow:lan",
                .gpio           = ANTMINER_S3_GPIO_LED_LAN,
                .active_low     = 0,
        },
@@ -95,4 +95,4 @@
 }
 
 MIPS_MACHINE(ATH79_MACH_ANTMINER_S3, "ANTMINER-S3",
-            "Bitmain Antminer S3", antminer_s3_setup);
+            "Antminer-S3", antminer_s3_setup);

Modified: branches/chaos_calmer/target/linux/ar71xx/generic/profiles/antminer.mk
===================================================================
--- branches/chaos_calmer/target/linux/ar71xx/generic/profiles/antminer.mk      
2015-10-20 18:17:12 UTC (rev 47241)
+++ branches/chaos_calmer/target/linux/ar71xx/generic/profiles/antminer.mk      
2015-10-20 19:03:26 UTC (rev 47242)
@@ -5,24 +5,24 @@
 # See /LICENSE for more information.
 #
 
-define Profile/ANTMINER_S1
-       NAME:=Antminer S1
+define Profile/ANTMINERS1
+       NAME:=Antminer-S1
        PACKAGES:=kmod-usb-core kmod-usb2 kmod-crypto-manager 
kmod-i2c-gpio-custom kmod-usb-hid
 endef
 
 
-define Profile/ANTMINER_S1/Description
+define Profile/ANTMINERS1/Description
        Package set optimized for the Bitmain Antminer S1.
 endef
-$(eval $(call Profile,ANTMINER_S1))
+$(eval $(call Profile,ANTMINERS1))
 
-define Profile/ANTMINER_S3
-       NAME:=Antminer S3
+define Profile/ANTMINERS3
+       NAME:=Antminer-S3
        PACKAGES:=kmod-usb-core kmod-usb2 kmod-crypto-manager 
kmod-i2c-gpio-custom kmod-usb-hid
 endef
 
 
-define Profile/ANTMINER_S1/Description
+define Profile/ANTMINERS3/Description
        Package set optimized for the Bitmain Antminer S3.
 endef
-$(eval $(call Profile,ANTMINER_S3))
+$(eval $(call Profile,ANTMINERS3))

Modified: branches/chaos_calmer/target/linux/ar71xx/image/Makefile
===================================================================
--- branches/chaos_calmer/target/linux/ar71xx/image/Makefile    2015-10-20 
18:17:12 UTC (rev 47241)
+++ branches/chaos_calmer/target/linux/ar71xx/image/Makefile    2015-10-20 
19:03:26 UTC (rev 47242)
@@ -296,19 +296,19 @@
 TARGET_DEVICES += archer-c5 archer-c7-v1 archer-c7-v2
 
 define Device/antminer-s1
-       $(Device/tplink-8mlzma)
-       BOARDNAME := ANTMINER-S1
-       DEVICE_PROFILE := ANTMINER_S1
-       TPLINK_HWID := 0x04440001
-       CONSOLE := ttyATH0,115200
+    $(Device/tplink-8mlzma)
+    BOARDNAME := ANTMINER-S1
+    DEVICE_PROFILE := ANTMINERS1
+    TPLINK_HWID := 0x04440101
+    CONSOLE := ttyATH0,115200
 endef
 
 define Device/antminer-s3
-       $(Device/tplink-8mlzma)
-       BOARDNAME := ANTMINER-S3
-       DEVICE_PROFILE := ANTMINER_S3
-       TPLINK_HWID := 0x04440003
-       CONSOLE := ttyATH0,115200
+    $(Device/tplink-8mlzma)
+    BOARDNAME := ANTMINER-S3
+    DEVICE_PROFILE := ANTMINERS3
+    TPLINK_HWID := 0x04440301
+    CONSOLE := ttyATH0,115200
 endef
 
 define Device/el-m150

Modified: 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
     2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
     2015-10-20 19:03:26 UTC (rev 47242)
@@ -4,7 +4,7 @@
        ATH79_MACH_ALL0258N,            /* Allnet ALL0258N */
        ATH79_MACH_ALL0305,             /* Allnet ALL0305 */
        ATH79_MACH_ALL0315N,            /* Allnet ALL0315N */
-+      ATH79_MACH_ANTMINER_S1, /* Bitmain Antminer S1 */
++      ATH79_MACH_ANTMINER_S1, /* Antminer-S1 */
        ATH79_MACH_AP113,               /* Atheros AP113 reference board */
        ATH79_MACH_AP121,               /* Atheros AP121 reference board */
        ATH79_MACH_AP121_MINI,          /* Atheros AP121-MINI reference board */

Modified: 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
     2015-10-20 18:17:12 UTC (rev 47241)
+++ 
branches/chaos_calmer/target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
     2015-10-20 19:03:26 UTC (rev 47242)
@@ -32,8 +32,8 @@
 @@ -22,6 +22,7 @@ enum ath79_mach_type {
        ATH79_MACH_ALL0305,             /* Allnet ALL0305 */
        ATH79_MACH_ALL0315N,            /* Allnet ALL0315N */
-       ATH79_MACH_ANTMINER_S1, /* Bitmain Antminer S1 */
-+        ATH79_MACH_ANTMINER_S3, /* Bitmain Antminer S3 */
+       ATH79_MACH_ANTMINER_S1, /* Antminer-S1 */
++      ATH79_MACH_ANTMINER_S3, /* Antminer-S3 */
        ATH79_MACH_AP113,               /* Atheros AP113 reference board */
        ATH79_MACH_AP121,               /* Atheros AP121 reference board */
        ATH79_MACH_AP121_MINI,          /* Atheros AP121-MINI reference board */

Modified: branches/chaos_calmer/tools/firmware-utils/src/mktplinkfw.c
===================================================================
--- branches/chaos_calmer/tools/firmware-utils/src/mktplinkfw.c 2015-10-20 
18:17:12 UTC (rev 47241)
+++ branches/chaos_calmer/tools/firmware-utils/src/mktplinkfw.c 2015-10-20 
19:03:26 UTC (rev 47242)
@@ -30,8 +30,8 @@
 #define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); })
 
 #define HEADER_VERSION_V1      0x01000000
-#define HWID_ANTMINER_S1       0x04440001
-#define HWID_ANTMINER_S3       0x04440003
+#define HWID_ANTMINER_S1       0x04440101
+#define HWID_ANTMINER_S3       0x04440301
 #define HWID_GL_INET_V1                0x08000001
 #define HWID_GS_OOLITE_V1      0x3C000101
 #define HWID_ONION_OMEGA       0x04700001
@@ -431,6 +431,11 @@
                .hw_rev         = 1,
                .layout_id      = "8Mlzma",
        }, {
+               .id             = "ANTMINER-S3",
+               .hw_id          = HWID_ANTMINER_S3,
+               .hw_rev         = 1,
+               .layout_id      = "8Mlzma",
+       }, {
                /* terminating entry */
        }
 };
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to