mvebu: sysupgrade: sdcard: fix platform_do_upgrade_sdcard
Unconditionally execute the final case statement, even if the disk layout changed. This is necessary, to keep the original Turris Omnia flash instructions working: The disk layout WILL change, when switching from TurrisOS to OpenWRT. Without updating the uboot environment at the same time, the user would end up with an unbootable system. Fixes commit 2e5a0b81ec ("mvebu: sysupgrade: sdcard: keep user added ...") Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
This commit is contained in:
parent
812bad9b13
commit
4b5df88f1c
@ -70,10 +70,7 @@ platform_do_upgrade_sdcard() {
|
|||||||
# will be missing if it overlaps with the old partition 2
|
# will be missing if it overlaps with the old partition 2
|
||||||
partx -d - "/dev/$diskdev"
|
partx -d - "/dev/$diskdev"
|
||||||
partx -a - "/dev/$diskdev"
|
partx -a - "/dev/$diskdev"
|
||||||
|
else
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#write uboot image
|
#write uboot image
|
||||||
get_image "$@" | dd of="$diskdev" bs=512 skip=1 seek=1 count=2048 conv=fsync
|
get_image "$@" | dd of="$diskdev" bs=512 skip=1 seek=1 count=2048 conv=fsync
|
||||||
#iterate over each partition from the image and write it to the boot disk
|
#iterate over each partition from the image and write it to the boot disk
|
||||||
@ -89,6 +86,7 @@ platform_do_upgrade_sdcard() {
|
|||||||
#copy partition uuid
|
#copy partition uuid
|
||||||
echo "Writing new UUID to /dev/$diskdev..."
|
echo "Writing new UUID to /dev/$diskdev..."
|
||||||
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
|
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
|
||||||
|
fi
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
cznic,turris-omnia)
|
cznic,turris-omnia)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user