[openwrt/openwrt] ramips: add image checks
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 15 12:47:14 PST 2018
mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/a8054d83dcc37f2b62ef874c18741cc60c219c61
commit a8054d83dcc37f2b62ef874c18741cc60c219c61
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Thu Jan 11 23:43:09 2018 +0800
ramips: add image checks
As long as we can't enforce image metadata, we need to use (platform)
image checks to have at least soem kind of validation.
Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
target/linux/ramips/base-files/lib/upgrade/platform.sh | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index cd21001..e2ab3a6 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -264,9 +264,11 @@ platform_check_image() {
;;
hc5962|\
mir3g|\
- r6220)
- # these boards use metadata images
- return 0
+ r6220|\
+ ubnt-erx|\
+ ubnt-erx-sfp)
+ nand_do_platform_check "$board" "$1"
+ return $?;
;;
re350-v1)
[ "$magic" != "01000000" ] && {
@@ -275,11 +277,6 @@ platform_check_image() {
}
return 0
;;
- ubnt-erx|\
- ubnt-erx-sfp)
- nand_do_platform_check "$board" "$1"
- return $?;
- ;;
wcr-1166ds|\
wsr-1166)
[ "$magic" != "48445230" ] && {
More information about the lede-commits
mailing list