firmware-utils: replace GPL 2.0 boilerplate/reference with SPDX
[openwrt/staging/ldir.git] / tools / firmware-utils / src / mktplinkfw2.c
index 35db848bbab9f8315526dfa24ed351ad58878dde..47fe710dffe1aeee0a2e2b08cf8e59fa9235c5d1 100644 (file)
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
  *
  * This tool was based on:
  *   TP-Link WR941 V2 firmware checksum fixing tool.
  *   Copyright (C) 2008,2009 Wang Jian <lark@linux.net.cn>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- *
  */
 
 #include <stdio.h>
@@ -124,6 +120,12 @@ char md5salt_boot[MD5SUM_LEN] = {
 static struct flash_layout layouts[] = {
        {
                .id             = "4Mmtk",
+               .fw_max_len     = 0x3c0000,
+               .kernel_la      = 0x80000000,
+               .kernel_ep      = 0x80000000,
+               .rootfs_ofs     = 0x140000,
+       }, {
+               .id             = "4MLmtk",
                .fw_max_len     = 0x3d0000,
                .kernel_la      = 0x80000000,
                .kernel_ep      = 0x80000000,
@@ -158,6 +160,18 @@ static struct flash_layout layouts[] = {
                .kernel_la      = 0x80000000,
                .kernel_ep      = 0x80000000,
                .rootfs_ofs     = 0x140000,
+       }, {
+               .id             = "8Mqca",
+               .fw_max_len     = 0x7a0000,
+               .kernel_la      = 0x80060000,
+               .kernel_ep      = 0x80060000,
+               .rootfs_ofs     = 0x140000,
+       }, {
+               .id             = "16Mqca",
+               .fw_max_len     = 0xf90000,
+               .kernel_la      = 0x80060000,
+               .kernel_ep      = 0x80060000,
+               .rootfs_ofs     = 0x140000,
        }, {
                /* terminating entry */
        }
@@ -166,7 +180,6 @@ static struct flash_layout layouts[] = {
 static void usage(int status)
 {
        FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
-       struct board_info *board;
 
        fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
        fprintf(stream,