@@ -141,6 +141,7 @@ task complete {
141
141
include("${NERVES_PROVISIONING}")
142
142
143
143
uboot_setenv(uboot-env, "nerves_fw_active", "a")
144
+ uboot_setenv(uboot-env, "nerves_fw_validated", "1")
144
145
uboot_setenv(uboot-env, "nerves_fw_devpath", ${NERVES_FW_DEVPATH})
145
146
uboot_setenv(uboot-env, "a.nerves_fw_application_part0_devpath", ${NERVES_FW_APPLICATION_PART0_DEVPATH})
146
147
uboot_setenv(uboot-env, "a.nerves_fw_application_part0_fstype", ${NERVES_FW_APPLICATION_PART0_FSTYPE})
@@ -279,14 +280,15 @@ task upgrade.a {
279
280
280
281
# Switch over to boot the new firmware
281
282
uboot_setenv(uboot-env, "nerves_fw_active", "a")
283
+ uboot_setenv(uboot-env, "nerves_fw_validated", "0")
282
284
}
283
285
284
286
on-error {
285
287
}
286
288
}
287
289
288
290
task upgrade.b {
289
- # This task upgrades the A partition
291
+ # This task upgrades the B partition
290
292
require-uboot-variable(uboot-env, "nerves_fw_active", "a")
291
293
292
294
# Require that the running version of firmware has been validated.
@@ -362,6 +364,7 @@ task upgrade.b {
362
364
363
365
# Switch over to boot the new firmware
364
366
uboot_setenv(uboot-env, "nerves_fw_active", "b")
367
+ uboot_setenv(uboot-env, "nerves_fw_validated", "0")
365
368
}
366
369
367
370
on-error {
0 commit comments