Update build.py to support running on Windows using Docker via WSL2.#44
Update build.py to support running on Windows using Docker via WSL2.#44Josverl wants to merge 1 commit intomattytrentini:mainfrom
Conversation
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
|
Thanks for this (and that gif), works great on my end! NOTE: not sure if it's typer or this wsl patch, but arg parsing seems goofy. To build with a different build container, the cli needs this arrangement: |
Yes, it's a Typer constraint - because there is a second optional argument (board variant) when the board is specified first, the argument parser becomes confused and tries to interpret the There are a few workarounds, but I haven't decided which is the best option yet... |
|
Hi Jos, Sorry for my slow response and thanks for the contribution!
Thanks for this! I was actually in two minds as to whether to make this work - or try and detect that the filesystem was on a windows drive and throw an error (maybe with an option to override). My concern is that folks that are unaware of the performance cost are likely to be frustrated. But making it work is probably a better option. 😜
I think the right solution here is to only support
I have tried this numerous times (even on a new, completely fresh, work laptop) and haven't had any issues. Which terminal are you using? I'm using bash. (You did remember to start a new terminal?)
As in with Debian as the WSL distro? Interesting, I'll need to test - I'm using Ubuntu primarily. |
|
Hi,
I added logic to allow mpbuild to work on Windows + WSL2
for a speedy build the micropython repo needs to be hosted on the WSL2 filesystem, but it also works (given sufficient patience) on just a windows drive.
The changes are mostly path manipulation to translate from Windows to Linux paths, and to select a correct HOME folder.
There are a few things that may need additional attention, but I have not bisected them against pure linux :
mpbuild build BOARD cleandoes not work correctly,mpbuild build BOARD VARIANT cleandoes work , andmpbuild clean BOARDalso