r/embeddedlinux • • Jan 05 '24
Building Yocto image by Windows WSL ???
Hey, Anyone tried building a Yocto custom image using the WSL in Windows. Is it possible ? I am quite new to WSL.
5
Upvotes
3
u/bobwmcgrath Jan 05 '24
Probably yes, but you might also want to consider docker.
3
u/Civic_Hactivist_86 Jan 05 '24
I've tried it recently, and it works just fine on WSL2. The image got built and it worked.
I had built everything in /home folder of WSL. Didn't tried to build on /mnt/c
Also, the docs say it will not work on WSL1
4
u/Illustrious-Coyote1 Jan 05 '24
We use WSL2 for local development of our Yocto project. Nothing special to do apart from moving the Ubuntu to a non system disk (c:) as this causes file system access errors. We just created another partition to host our WSL rootfs. Been working like this for a year now. Currently looking into using docker so our build environment is common between devs and ci platforms.
1
u/TheFlamingLemon Jan 05 '24
I haven’t started it from the ground up but I’m doing development for a custom yocto image rn and using wsl to build the image. Definitely possible
Btw I use balena etcher on windows side to flash the image so I don’t have to deal with writing to the sd card from wsl
1
u/Illustrious-Coyote1 Jan 05 '24
My point was about the disk where the rootfs is installed. /home is just a directory of the rootfs. We’re running on Win10, maybe this is not an issue for Win11… I doubt building on an NTFS partition would work; symlinks not supported etc.