Skip to content
Snippets Groups Projects
Commit ba6700ef authored by Vijay Balaji's avatar Vijay Balaji
Browse files

platform_utils : Add trymode support for wifi_fw_mount


Initially, wifi_fw_mount script using old file system to mount
flashed wifi firmware. The change was made to support the
new file system made for trymode.

Change-Id: I025108a55c45a46f4a326d1818bf33f9c91c5bf2
Signed-off-by: default avatarVijay Balaji <quic_vijbal@quicinc.com>
parent e083f9c5
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,28 @@ mount_wifi_fw (){
;;
esac
primaryboot=$(cat /proc/boot_info/$part_name/primaryboot)
local age0=$(cat /proc/boot_info/bootconfig0/age)
local age1=$(cat /proc/boot_info/bootconfig1/age)
local bootname="bootconfig1"
#Try mode
if [ -e /proc/upgrade_info/trybit ]; then
if [ -e /proc/upgrade_info/trymode_inprogress ]; then
if [ $age0 -le $age1 ]; then
bootname="bootconfig0"
else
bootname="bootconfig1"
fi
else
if [ $age1 -ge $age0 ]; then
bootname="bootconfig1"
else
bootname="bootconfig0"
fi
fi
fi
primaryboot=$(cat /proc/boot_info/$bootname/$part_name/primaryboot)
if [ $primaryboot -eq 1 ]; then
part_name="0:WIFIFW_1"
fi
......@@ -404,7 +425,20 @@ stop_wifi_fw() {
wifi_on_rootfs="1"
fi
primaryboot=$(cat /proc/boot_info/$part_name/primaryboot)
local age0=$(cat /proc/boot_info/bootconfig0/age)
local age1=$(cat /proc/boot_info/bootconfig1/age)
local bootname="bootconfig1"
#Try mode
if [ -e /proc/upgrade_info/trybit ]; then
if [ $age1 -ge $age0 ]; then
bootname="bootconfig1"
else
bootname="bootconfig0"
fi
fi
primaryboot=$(cat /proc/boot_info/$bootname/$part_name/primaryboot)
if [ $primaryboot -eq 1 ]; then
part_name="${part_name}_1"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment