-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.script
More file actions
26 lines (22 loc) · 835 Bytes
/
boot.script
File metadata and controls
26 lines (22 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if test -z "${altbootcmd}"
then
env set altbootcmd 'env set rollback 1; run bootcmd'
env save
fi
if test "${rollback}" = "1" && test "${upgrade_available}" = "1"
then
# Make sure to reset upgrade_available to avoid unnecessary wear
# Note this also makes rollback permanent. aktualizr will reset rollback
# when a new (hopefully better) update comes in.
env set upgrade_available 0
env save
fi
# save default U-Boot devicetree file to use in a rollback situation
env set fdtfile2 "${fdtfile}"
if test -n "${loadaddr}"
then
ext4load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize}
else
ext4load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize}
fi
run bootcmd_run