Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
move_config() {
|
||||
local board=$(board_name)
|
||||
local partdev
|
||||
|
||||
export_bootdevice && export_partdevice partdev 1 && {
|
||||
mount -o rw,noatime "/dev/$partdev" /mnt
|
||||
[ -f "/mnt/$BACKUP_FILE" ] && {
|
||||
mv -f "/mnt/$BACKUP_FILE" /
|
||||
}
|
||||
umount /mnt
|
||||
}
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
53
target/linux/imx/cortexa53/base-files/lib/upgrade/platform.sh
Executable file
53
target/linux/imx/cortexa53/base-files/lib/upgrade/platform.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
|
||||
enable_image_metadata_check() {
|
||||
case "$(board_name)" in
|
||||
gw,imx8m*)
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
enable_image_metadata_check
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Sysupgrade is not yet supported on $board."
|
||||
return 1
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
export_bootdevice && export_partdevice diskdev 0 || {
|
||||
echo "Unable to find root device."
|
||||
return 1
|
||||
}
|
||||
v "Updating /dev/$diskdev..."
|
||||
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_copy_config() {
|
||||
local board=$(board_name)
|
||||
local partdev
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
export_partdevice partdev 1 && {
|
||||
v "Storing $UPGRADE_BACKUP on /dev/$partdev..."
|
||||
mount -o rw,noatime "/dev/$partdev" /mnt
|
||||
cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
|
||||
umount /mnt
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user