Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/scripts/test_sysupgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2194,8 +2194,9 @@ reset_env; ubi_setup ubifs-kvol
STUB_PIVOT_RC=0
run -z --kernel="$UFIT" --rootfs="$UFS"
if [ "$RC" -ne 0 ] && printf '%s' "$OUT" | grep -q "retired NAND layout with a separate kernel volume" &&
printf '%s' "$OUT" | grep -q "ipctool nand-migrate" &&
nothing_ubi && ! handed_off && ! rebooted; then
ok "ubifs-kvol: refused before anything is touched, reinstall link given"
ok "ubifs-kvol: refused before anything is touched, nand-migrate and reinstall link given"
else
bad "ubifs-kvol must be refused, rc=$RC log='$(cat "$SB/tmp/flash.log")' out='$OUT'"
fi
Expand Down Expand Up @@ -2728,7 +2729,9 @@ default_url_is "$F/openipc.ssc338q-nor-ultimate.tgz" ubi_setup ubiblock
reset_env; UBLOCK_SOC=gk7205v500 ubi_setup ubiblock
STUB_PIVOT_RC=0
run -z --kernel="$UK" --rootfs="$US"
# nand-migrate needs a FIT U-Boot, which a ubiblock camera does not have
if [ "$RC" -ne 0 ] && printf '%s' "$OUT" | grep -q "retired NAND layout with a separate kernel volume" &&
! printf '%s' "$OUT" | grep -q "nand-migrate" &&
nothing_ubi && ! handed_off && ! rebooted; then
ok "ubiblock on gk7205v500: refused before anything is touched, reinstall link given"
else
Expand Down
13 changes: 11 additions & 2 deletions general/overlay/usr/sbin/sysupgrade
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# OpenIPC.org | 2025
scr_version=1.0.71
scr_version=1.0.72

args="$@"
LOCK_FILE=/tmp/sysupgrade.lock
Expand Down Expand Up @@ -2958,8 +2958,17 @@ fi
# that moved to the kernel-in-rootfs one: current images for them carry the
# kernel inside the UBIFS rootfs and size the volumes to it. ubiblock stays
# for the rest (nand_layout_moved).
#
# The first FIT layout (ubifs-kvol) can move over in place: its U-Boot is a
# FIT NAND build, which loads a kernel from UBIFS, so `ipctool nand-migrate`
# rewrites the rootfs, switches bootcmd and drops the kernel volume, with no
# serial console (OpenIPC/ipctool#243). A ubiblock camera's U-Boot predates
# FIT; that one is reinstalled from U-Boot.
if { [ "1" = "$update_kernel" ] || [ "1" = "$update_rootfs" ]; } && [ "$ubi_layout" = "ubifs-kvol" ]; then
die "This camera uses the retired NAND layout with a separate kernel volume; current images carry the kernel inside the rootfs. Move it over without a serial console: copy rootfs.ubifs.* from its -nand- package to /tmp and run 'ipctool nand-migrate /tmp/rootfs.ubifs.<soc>' (it keeps U-Boot and the settings, and reboots), or reinstall it from U-Boot: https://openipc.org/cameras/vendors/$vendor/socs/$model -- nothing was written."
Comment thread
widgetii marked this conversation as resolved.
fi
if { [ "1" = "$update_kernel" ] || [ "1" = "$update_rootfs" ]; } &&
{ [ "$ubi_layout" = "ubifs-kvol" ] || { [ "$ubi_layout" = "ubiblock" ] && nand_layout_moved; }; }; then
[ "$ubi_layout" = "ubiblock" ] && nand_layout_moved; then
die "This camera uses the retired NAND layout with a separate kernel volume; current images carry the kernel inside the rootfs. Reinstall it from U-Boot with the current NAND instructions: https://openipc.org/cameras/vendors/$vendor/socs/$model -- nothing was written."
fi
# On the ubifs layout the kernel is a file in the rootfs: there is no kernel
Expand Down
Loading