Add sysupgrade changes to support gluebi (#750)

Co-authored-by: viktorxda <viktorxda@users.noreply.github.com>
pull/751/head
viktorxda 2023-04-28 06:38:17 +02:00 committed by GitHub
parent 1266a5c4d0
commit ed0be5d07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -76,14 +76,15 @@ do_update_rootfs() {
do_wipe_overlay() { do_wipe_overlay() {
echo_c 33 "\nOverlayFS" echo_c 33 "\nOverlayFS"
echo "Erase overlay partition" echo "Erase overlay partition"
flash_eraseall -j "$(get_device "rootfs_data")" [ $(ipcinfo -F) = "nand" ] || jffs2="-j"
flash_eraseall $jffs2 "$(get_device "rootfs_data")"
} }
download_firmware() { download_firmware() {
echo_c 33 "\nFirmware" echo_c 33 "\nFirmware"
osr=$(get_system_build) osr=$(get_system_build)
ftype=$(ipcinfo -F 2>/dev/null) ftype=$(ipcinfo -F 2>/dev/null)
[ ${#ftype} -gt 4 ] && ftype=$(get_flash_type) [ ${#ftype} -ge 4 ] && ftype=$(get_flash_type)
build="${soc}-${ftype}-${osr}" build="${soc}-${ftype}-${osr}"
[ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${build}.tgz" [ -z "$url" ] && url="https://github.com/OpenIPC/firmware/releases/download/latest/openipc.${build}.tgz"
echo "Download from $url" echo "Download from $url"