I'm trying to run Yocto Linux builds under a WSL2 environment.
I successfully built an image for my embedded system with bitbake imx-image-full
. Then I wanted to create the SDK via bitbake -c populate_sdk imx-image-full
. It starts normally, but after a few minutes of running tasks, bitbake "hangs": several do_compile
tasks are in progress, timers are running, but nothing actually finishes. The system became idle: htop
shows that all CPUs are at 0%, and the fans aren't spinning any faster.
Hitting Ctrl-C causes the following message to appear:
No reply from server in 30s
I restarted the whole system and cleared the caches, to no avail.
I had a closer look at htop
and noticed that all the CPUs go 100%, then the memory usage, first the RAM, then the swap. Then the CPU usage drops to 0 just after the swap bar completely filled up. I suspect that all processes die due to lack of enough memory.
I increased the available RAM for WSL from 16GB to 24GB (my system has 32GB physical RAM), and increased the swap to 48G just to have plenty of buffer.
The build is currently running, with a peak of 21-22GB usage.