OTA Q&A

Q1: Why does it prompt Open device err/Device or resource busy when OTA upgrade.

The partition has not been umounted before upgrading a certain partition, please confirm that it has successfully umounted.

Q2: umount failed, prompt umount: can't umount /customer: Device or resource busy

The corresponding mount is occupied by other applications, use fuser -m /customer to view.

Q3: How to forcibly kill the mount partition during the test phase?

直接使用fuser -km /customer

Q4: How to customize in OTA upgrade?

Choose whether to package start.sh/end.sh when OTA is packaged, start.sh is executed before the upgrade, and end.sh is executed after the upgrade is completed (these files are not available by default, please define by yourself).

Q5: When to use start.sh/end.sh?

start.sh is used for umount; end.sh is used for post-upgrade processing, such as determine whether the upgrade is successful, and how to deal with it later.

start.sh:

fuser -km /dev/fb0
fuser -km /customer 
fuser -km /config
fuser -km /appconfigs
sleep 2
umount /customer
umount /config
umount /appconfigs

end.sh:

echo $OTA_STATUS
if [ $OTA_STATUS -eq 0 ]; then
/etc/fw_setenv use_bak_rootfs 0
else
/etc/fw_setenv use_bak_rootfs 1
fi

Q6: Fastboot version failed to upgrade rootfs partition using OTA, but succeeded from uboot.

When the Fastboot version starts, the size specified by the env variable initrd_size is loaded from the IPL load rootfs partition. OTA upgrade does not change this variable. When the newly upgraded rootfs size is larger than the initrd_size, the load rootfs is missing and the startup fails.

Solution: Load initrd_size according to the actual partition size.