1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- --- a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount
- +++ b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount
- @@ -9,5 +9,13 @@ boot() {
- # Unset changed flag after sysupgrade complete
- fw_setenv changed
- ;;
- + redmi,ax6|\
- + xiaomi,ax3600|\
- + xiaomi,ax9000)
- + # OTA handling should not be used. Reset it just in case.
- + fw_setenv flag_ota_reboot 0
- + # Not strictly needed but useful to handle partition crash condition
- + fw_setenv flag_boot_success 1
- + ;;
- esac
- }
-
- --- a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
- +++ b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
- @@ -83,20 +83,29 @@ platform_do_upgrade() {
- redmi,ax6|\
- xiaomi,ax3600|\
- xiaomi,ax9000)
- - # Make sure that UART is enabled
- - fw_setenv boot_wait on
- - fw_setenv uart_en 1
- + part_num="$(fw_printenv -n flag_boot_rootfs)"
- + if [ "$part_num" -eq "1" ]; then
- + CI_UBIPART="rootfs_1"
- + target_num=1
- + # Reset fail flag for the current partition
- + # With both partition set to fail, the partition 2 (bit 1)
- + # is loaded
- + fw_setenv flag_try_sys2_failed 0
- + else
- + CI_UBIPART="rootfs"
- + target_num=0
- + # Reset fail flag for the current partition
- + # or uboot will skip the loading of this partition
- + fw_setenv flag_try_sys1_failed 0
- + fi
- +
- + # Tell uboot to switch partition
- + fw_setenv flag_boot_rootfs "$target_num"
- + fw_setenv flag_last_success "$target_num"
-
- - # Enforce single partition.
- - fw_setenv flag_boot_rootfs 0
- - fw_setenv flag_last_success 0
- - fw_setenv flag_boot_success 1
- - fw_setenv flag_try_sys1_failed 8
- - fw_setenv flag_try_sys2_failed 8
- + # Reset success flag
- + fw_setenv flag_boot_success 0
-
- - # Kernel and rootfs are placed in 2 different UBI
- - CI_KERN_UBIPART="ubi_kernel"
- - CI_ROOT_UBIPART="rootfs"
- nand_do_upgrade "$1"
- ;;
- *)
- --- /dev/null
- +++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
- @@ -0,0 +1,20 @@
- +#!/bin/sh
- +
- +[ -e /lib/firmware/$FIRMWARE ] && exit 0
- +
- +. /lib/functions/caldata.sh
- +
- +board=$(board_name)
- +
- +case "$FIRMWARE" in
- +"ath10k/cal-pci-0000:01:00.0.bin")
- + case "$board" in
- + xiaomi,ax3600)
- + caldata_extract "0:art" 0x33000 0x844
- + ;;
- + esac
- + ;;
- +*)
- + exit 1
- + ;;
- +esac
|