Forked from fcicq/openwrt-tplink-uboot-and-hwrev.patch
Created
September 1, 2014 14:45
-
-
Save rlei/1a034fc08d24071b9b3e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c b/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
index ab952b6..effcac7 100644 | |
--- a/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
+++ b/target/linux/ar71xx/files/drivers/mtd/tplinkpart.c | |
@@ -149,7 +149,6 @@ static int tplink_parse_partitions(struct mtd_info *master, | |
parts[0].name = "u-boot"; | |
parts[0].offset = 0; | |
parts[0].size = offset; | |
- parts[0].mask_flags = MTD_WRITEABLE; | |
parts[1].name = "kernel"; | |
parts[1].offset = offset; | |
diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c | |
index a6aab59..46b3559 100644 | |
--- a/tools/firmware-utils/src/mktplinkfw.c | |
+++ b/tools/firmware-utils/src/mktplinkfw.c | |
@@ -583,16 +583,19 @@ static int check_options(void) | |
} | |
if (layout_id == NULL) | |
layout_id = board->layout_id; | |
- | |
+ ERR("opt_hw_rev %s", opt_hw_rev); | |
hw_id = board->hw_id; | |
- hw_rev = board->hw_rev; | |
+ if (opt_hw_rev) | |
+ hw_rev = strtoul(opt_hw_rev, NULL, 0); | |
+ else | |
+ hw_rev = board->hw_rev; | |
} else { | |
if (layout_id == NULL) { | |
ERR("flash layout is not specified"); | |
return -1; | |
} | |
hw_id = strtoul(opt_hw_id, NULL, 0); | |
- | |
+ ERR("opt_hw_rev %s", opt_hw_rev); | |
if (opt_hw_rev) | |
hw_rev = strtoul(opt_hw_rev, NULL, 0); | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment