Skip to content

Commit

Permalink
mediatek: replace multiple fw_setenv calls by the bulk one
Browse files Browse the repository at this point in the history
This commit replaces multiple fw_setenv calls by the bulk one to reduce
flash writes.

Thanks @Linaro1985 for the idea.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: openwrt#17580
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  • Loading branch information
csharper2005 authored and hauke committed Jan 20, 2025
1 parent 1d02145 commit a6b0abf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ xiaomi_initial_setup()
return 0
fi

fw_setenv boot_wait on
fw_setenv uart_en 1
fw_setenv flag_boot_rootfs 0
fw_setenv flag_last_success 1
fw_setenv flag_boot_success 1
fw_setenv flag_try_sys1_failed 8
fw_setenv flag_try_sys2_failed 8
fw_setenv -s - <<-EOF
boot_wait on
uart_en 1
flag_boot_rootfs 0
flag_last_success 1
flag_boot_success 1
flag_try_sys1_failed 8
flag_try_sys2_failed 8
EOF

local board=$(board_name)
case "$board" in
Expand Down

0 comments on commit a6b0abf

Please sign in to comment.