nerves icon indicating copy to clipboard operation
nerves copied to clipboard

Change `burn` task to Upgrade by default

Open jjcarstens opened this issue 3 years ago • 3 comments

This changes the mix burn (and subsequently mix firmware.burn) to use the FWUP upgrade task by default. If the upgrade fails because the device does not actually have upgradable firmware on it, then the task will fallback to using the complete task to overwrite the device.

You can also now specify --overwrite to force the complete task and wipe the data on the device with the new firmware.

see #679

jjcarstens avatar Dec 28 '21 14:12 jjcarstens

This is really cool. I think this will help so many people. I'll give it a try later today.

fhunleth avatar Dec 28 '21 14:12 fhunleth

I think there's a race condition and there needs to be a pause?

Did you MBP prompt you a second time for a password? I've been unable to reproduce on 3 machines (Linux, MBP, and Mac mini M1), but I get prompted for a password a second time when it does the next task. I'm more just curious now and can easily add in a quick pause to be safe.

jjcarstens avatar Dec 29 '21 14:12 jjcarstens

Before you add a pause, there might be another way. For example, the logic could be put in the fwup.config or fwup could be extended to let you specify a "fallback" task if the main one errors out. That would prevent the need to authenticate twice. I'm not sure if authenticating twice is bad, though, so long as it works the second time.

I should show you live what I ran into when we pair on the ssh issue in case I'm doing something silly.

fhunleth avatar Jan 02 '22 01:01 fhunleth