diff options
Diffstat (limited to 'target/linux/mvebu/base-files/lib/upgrade/sdcard.sh')
-rw-r--r-- | target/linux/mvebu/base-files/lib/upgrade/sdcard.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh index de6e1a920c..fbf121f33d 100644 --- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh @@ -18,8 +18,20 @@ platform_check_image_sdcard() { } platform_do_upgrade_sdcard() { + local board=$(board_name) + sync get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync + + case "$board" in + armada-385-turris-omnia) + fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait' + fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs cfg80211.freg=$regdomain"; fatload mmc 0 0x01000000 zImage; fatload mmc 0 0x02000000 armada-385-turris-omnia.dtb' + fw_setenv factory_mmcload 'setenv bootargs "$bootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/zImage @; btrload mmc 0 0x02000000 boot/dtb @' + fw_setenv mmcboot 'mw 0xf10184a0 0xfd4d4cfa; run openwrt_mmcload || run factory_mmcload; bootz 0x01000000 - 0x02000000' + ;; + esac + sleep 1 } |