aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm53xx/base-files/lib/upgrade/platform.sh')
-rw-r--r--target/linux/bcm53xx/base-files/lib/upgrade/platform.sh43
1 files changed, 41 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
index 40b2ef67be..cbb8290275 100644
--- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
@@ -96,7 +96,7 @@ platform_identify() {
echo "unknown"
}
-platform_check_image() {
+platform_other_check_image() {
[ "$#" -gt 1 ] && return 1
local file_type=$(platform_identify "$1")
@@ -227,6 +227,25 @@ platform_check_image() {
return $error
}
+platform_check_image() {
+ case "$(board_name)" in
+ meraki,mr32)
+ # Ideally, REQUIRE_IMAGE_METADATA=1 would suffice
+ # but this would require converting all other
+ # devices too.
+ nand_do_platform_check meraki-mr32 "$1"
+ return $?
+ ;;
+ *)
+ platform_other_check_image "$1"
+ return $?
+ ;;
+ esac
+
+ return 1
+}
+
+
# $(1): image for upgrade (with possible extra header)
# $(2): offset of trx in image
platform_do_upgrade_nand_trx() {
@@ -393,7 +412,7 @@ platform_img_from_seama() {
echo -n $dir/image-entity.bin
}
-platform_do_upgrade() {
+platform_other_do_upgrade() {
local file_type=$(platform_identify "$1")
local trx="$1"
local cmd=
@@ -424,3 +443,23 @@ platform_do_upgrade() {
default_do_upgrade "$trx" "$cmd"
}
+
+platform_do_upgrade() {
+ case "$(board_name)" in
+ meraki,mr32)
+ CI_KERNPART="part.safe"
+ nand_do_upgrade "$1"
+ ;;
+ *)
+ platform_other_do_upgrade "$1"
+ ;;
+ esac
+}
+
+platform_nand_pre_upgrade() {
+ case "$(board_name)" in
+ meraki,mr32)
+ CI_KERNPART="part.safe"
+ ;;
+ esac
+}