Skip to content

Commit

Permalink
[xiaomi] Restore nvram params for stock firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
remittor committed Jan 22, 2024
1 parent edc3b2a commit 56ad056
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=facinstall
PKG_VERSION:=1.3
PKG_RELEASE:=20240104
PKG_VERSION:=1.4
PKG_RELEASE:=20240122

PKG_MAINTAINER:=remittor <[email protected]>
PKG_LICENSE:=MIT
Expand Down
21 changes: 16 additions & 5 deletions files/xiaomi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,22 @@ fi_flash_images() {
fi
fi

if [ "$FI_RESTORE_ROOTFS2" = "true" ] && [ -n "$FI_RESTORE_NVRAM" ]; then
eval "$FI_RESTORE_NVRAM"
fi
if [ "$FI_RESTORE_UBIFS2" = "true" ]; then
eval "$FI_RESTORE_NVRAM"
if [ "$FI_RESTORE_ROOTFS2" = "true" ] || [ "$FI_RESTORE_UBIFS2" = "true" ]; then
if [ -n "$FI_RESTORE_NVRAM" ]; then
eval "$FI_RESTORE_NVRAM"
fi
#fw_setenv boot_fw1 'run boot_rd_img2;bootm'
fw_setenv flag_try_sys1_failed 0
fw_setenv flag_try_sys2_failed 0
fw_setenv flag_boot_rootfs 0
fw_setenv flag_last_success 0
fw_setenv flag_boot_success 1
fw_setenv flag_ota_reboot 0
fw_setenv ssh_en 1
fw_setenv uart_en 1
fw_setenv boot_wait on
fw_setenv bootdelay 3
fw_setenv bootmenu_delay 5
fi

fi_mtd_write "$FI_KERNEL_PART" "$kernel_offset" "$kernel_size" || {
Expand Down

0 comments on commit 56ad056

Please sign in to comment.