Hi all! I've started with making some progress on trying to see if it's possible to use Windows WSL2 as a reasonable environment to do some work in LuneOS. So far, I have the base operating system itself working, and you can get in and do command line type things just like if you were on a real device. GUI not presently working, although I have hope that it is possible with WSLg.
I'm going to use this to post notes as I discover things, so that I can hopefully bring anyone who might want to come along with me on the ride, and hopefully we can submit a coherent list of changes to make it all work right :-)
First, to get the system working at all in WSL2, you'll need to get an emulator build of LuneOS (though I hope in the future we can actually have a specific build target for it). You'll need the rootfs .tar.gz, so it's probably easiest if you just build the whole thing yourself.
if anyone wanted to replicate getting something operating in wsl: 1) build qemu per the luneos instructions
$$
MACHINE=qemux86-64 bitbake -k luneos-dev-emulator-appliance
$$
find the rootfs.tar.gz
$$
wslpath -a -w tmp-glibc/deply/images/qemux86-64/luneos-dev-image-qemux86.rootfs-testing-(datetime).tar.gz | xclip -sel clip
$$
add it to the system with
$$
wsl --import LuneOS <(directory to store virtual hard disk in)> <paste .tar.gz file path>
$$
BEFORE STARTING IT add /etc/wsl.conf and set systemd true and default user to root (open \wsl.localhost\LuneOS\etc\wsl.conf in an editor and paste, MAKE SURE YOU DO NOT USE WINDOWS CRLF LINE ENDINGS)
$$
[boot]
systemd=true
[user]
default=root
$$
explorer to \\wsl.localhost\LuneOS, find /var/log and delete it. create a new directory for /var/log. (this is to bypass something odd in the symlink you get by default)
… forgive some of the formatting here, I posted this originally on Discord, and Discord and this forum's formatting don't seem to entirely agree with each other. Hopefully you can make sense out of it :-)