summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThibaut VARENE <hacks@slashdirt.org>2017-07-28 12:59:42 +0200
committerMathias Kresin <dev@kresin.me>2017-09-09 09:55:26 +0200
commit66a8c8f04c7ab341aaa65e18c3af276fa70d5b56 (patch)
tree41d816a0da3f79af032748cc59164212797d792a /tools
parent09735db18b6a2e0f18a5c3c567527b251042bb6d (diff)
downloadmtk-20170518-66a8c8f04c7ab341aaa65e18c3af276fa70d5b56.zip
mtk-20170518-66a8c8f04c7ab341aaa65e18c3af276fa70d5b56.tar.gz
mtk-20170518-66a8c8f04c7ab341aaa65e18c3af276fa70d5b56.tar.bz2
tools/firmware-utils: mktplinkfw2: allow parameter override
This patch enables commandline override of board hw_ver and hw_ver_add Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/firmware-utils/src/mktplinkfw2.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c
index 56330c0..7d09477 100644
--- a/tools/firmware-utils/src/mktplinkfw2.c
+++ b/tools/firmware-utils/src/mktplinkfw2.c
@@ -424,17 +424,15 @@ static int check_options(void)
board->hw_id = strtoul(opt_hw_id, NULL, 0);
- if (opt_hw_rev)
- board->hw_rev = strtoul(opt_hw_rev, NULL, 0);
- else
- board->hw_rev = 1;
-
- if (opt_hw_ver_add)
- board->hw_ver_add = strtoul(opt_hw_ver_add, NULL, 0);
- else
- board->hw_ver_add = 0;
+ board->hw_rev = 1;
+ board->hw_ver_add = 0;
}
+ if (opt_hw_rev)
+ board->hw_rev = strtoul(opt_hw_rev, NULL, 0);
+ if (opt_hw_ver_add)
+ board->hw_ver_add = strtoul(opt_hw_ver_add, NULL, 0);
+
layout = find_layout(layout_id);
if (layout == NULL) {
ERR("unknown flash layout \"%s\"", layout_id);