I thought I’d give Nerves a spin (to follow along with Build a Weather Station with Elixir and Nerves (PragProg)) but have thus far fallen at the first hurdle.
I’m doing all this under Windows 10, wsl2. I’ve managed to build the firmware but can’t burn it. Because of the oddities of how wsl2 accesses block devices (via p9) I gave up trying to write direct to the device. If I can just create the firmware image, that’s easy enough to get onto the SD card.
mix burn help suggests I can create such an image, via
mix burn --device <filename>, but that nets this error:
Start-Process : This command cannot be run due to the error: The system cannot find the file specified. At line:1 char:1 + Start-Process fwup -Verb runAs -Wait -ArgumentList "-a -i \\wsl$\Ubun ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
That’s obviously powershell output, so I thought as all I’m trying to do here is write to a file it might be simpler to use the linux fwup (which I also have installed). So I removed the windows fwup.exe from my path, and now I get:
❯ mix burn --device ./image.img ==> nerves ==> sensor_hub Nerves environment MIX_TARGET: rpi0 MIX_ENV: dev ** (Mix) fwup.exe is required by the Nerves tooling. Please see https://hexdocs.pm/nerves/installation.html for installation instructions.
Can I force
mix burn to allow me to use the linux fwup so I can just write to a local filesystem image?