Skip to content

Commit

Permalink
uboot-mediatek: unifi6lr: mtd erase before write to flash
Browse files Browse the repository at this point in the history
Erase firmware ereas before writing to recovery or production partition
when updating them via the bootloader menu.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
ptpt52 authored and dangowrt committed Apr 28, 2021
1 parent ebed523 commit 43dad22
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -402,8 +402,8 @@
+reset_factory=mtd erase nor0 0xc0000 0x10000 && reset
+nor_read_production=mtd read nor0 $loadaddr 0x1000000 0x1000 && imsz $loadaddr image_size && mtd read nor0 $loadaddr 0x1000000 $image_size
+nor_read_recovery=mtd read nor0 $loadaddr 0x120000 0x1000 && imsz $loadaddr image_size && mtd read nor0 $loadaddr 0x120000 $image_size
+nor_write_production=mtd write nor0 $loadaddr 0x1000000 $filesize
+nor_write_recovery=mtd write nor0 $loadaddr 0x120000 $filesize
+nor_write_production=mtd erase nor0 0x1000000 $filesize && mtd write nor0 $loadaddr 0x1000000 $filesize
+nor_write_recovery=mtd erase nor0 0x120000 0xee0000 && mtd write nor0 $loadaddr 0x120000 $filesize
+_init_env=setenv _init_env ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run ethaddr_factory ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
Expand Down

0 comments on commit 43dad22

Please sign in to comment.