brcm63xx: add support for Huawei HG622
[librecmc/librecmc.git] / tools / firmware-utils / src / mktplinkfw.c
index 96fd6a00cd9469a70c000b64d8d60c16ab4d0407..085eb4c39d7ca6438029a8f0c1e6d541fa126931 100644 (file)
@@ -31,8 +31,8 @@
 
 #define HEADER_VERSION_V1      0x01000000
 #define HEADER_VERSION_V2      0x02000000
-#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
@@ -433,6 +433,11 @@ static struct board_info boards[] = {
                .hw_id          = HWID_ANTMINER_S1,
                .hw_rev         = 1,
                .layout_id      = "8Mlzma",
+       }, {
+               .id             = "ANTMINER-S3",
+               .hw_id          = HWID_ANTMINER_S3,
+               .hw_rev         = 1,
+               .layout_id      = "8Mlzma",
        }, {
                /* terminating entry */
        }
@@ -704,13 +709,13 @@ static int check_options(void)
                } else {
                        exceed_bytes = kernel_info.file_size - (rootfs_ofs - sizeof(struct fw_header));
                        if (exceed_bytes > 0) {
-                               ERR("kernel image is too big");
+                               ERR("kernel image is too big by %i bytes", exceed_bytes);
                                return -1;
                        }
 
                        exceed_bytes = rootfs_info.file_size - (fw_max_len - rootfs_ofs);
                        if (exceed_bytes > 0) {
-                               ERR("rootfs image is too big");
+                               ERR("rootfs image is too big by %i bytes", exceed_bytes);
                                return -1;
                        }
                }