Current section

Files

Jump to
nerves_system_rpi nerves_initramfs.conf
Raw

nerves_initramfs.conf

# Debug
# run_repl=true
# These need to match the definitions in fwup.conf
# in order to read the UBoot env variables from
# the correct block of memory
uboot_env.start=16 # UBOOT_ENV_OFFSET
uboot_env.count=16 # UBOOT_ENV_COUNT
loadenv()
fw_active=getenv("nerves_fw_active")
fw_validated=getenv("nerves_fw_validated")
fw_booted=getenv("nerves_fw_booted")
!fw_validated && fw_booted -> {
print("Reverting since ", fw_active, " was tried and wasn't validated\\n")
fwup_revert()
# Need to reboot to use the other kernel
reboot()
}
!fw_booted -> {
setenv("nerves_fw_booted", "1")
saveenv()
}
print("[NervesSystem] Running firmware slot: ", fw_active)