aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-11-26 13:27:00 +0100
committerJohn Crispin <john@phrozen.org>2020-11-26 13:29:42 +0100
commit18a53d43d646290053eff4736ec852efcf6bf510 (patch)
tree017430552d7cd304f40108ee00fb8ed1589f2596 /target/linux/generic/files
parent2b88563ee5aafd9571d965b7f2093a0f58d98a31 (diff)
downloadupstream-18a53d43d646290053eff4736ec852efcf6bf510.tar.gz
upstream-18a53d43d646290053eff4736ec852efcf6bf510.tar.bz2
upstream-18a53d43d646290053eff4736ec852efcf6bf510.zip
kernel: add GS110TPPV1 support to mtdsplit_uimage
The ID is used be a Realtek based switch made by Netgear. Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 281175bae7..57d8b9f420 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -258,6 +258,7 @@ static struct mtd_part_parser uimage_generic_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
};
+#define FW_MAGIC_GS110TPPV1 0x4e474520
#define FW_MAGIC_WNR2000V1 0x32303031
#define FW_MAGIC_WNR2000V3 0x32303033
#define FW_MAGIC_WNR2000V4 0x32303034
@@ -275,6 +276,10 @@ static ssize_t uimage_verify_wndr3700(u_char *buf, size_t len, int *extralen)
uint8_t expected_type = IH_TYPE_FILESYSTEM;
switch (be32_to_cpu(header->ih_magic)) {
+ case FW_MAGIC_GS110TPPV1:
+ case FW_MAGIC_WNR2000V4:
+ expected_type = IH_TYPE_KERNEL;
+ break;
case FW_MAGIC_WNR612V2:
case FW_MAGIC_WNR1000V2:
case FW_MAGIC_WNR1000V2_VC:
@@ -285,9 +290,6 @@ static ssize_t uimage_verify_wndr3700(u_char *buf, size_t len, int *extralen)
case FW_MAGIC_WNDR3700V2:
case FW_MAGIC_WPN824N:
break;
- case FW_MAGIC_WNR2000V4:
- expected_type = IH_TYPE_KERNEL;
- break;
default:
return -EINVAL;
}