* [Buildroot] Buildroot on Windows Subsystem for Linux (WSL)
@ 2021-01-14 9:08 Christian Stewart
2021-01-18 20:15 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Christian Stewart @ 2021-01-14 9:08 UTC (permalink / raw)
To: buildroot
Hi all,
Windows Subsystem for Linux 1.0 runs a userspace without a kernel, and
2.0 runs a full Linux Kernel inside a VM.
SkiffOS, using Buildroot, now supports WSL with the "virt/wsl" package.
This could be extracted from Skiff and submitted to mainline Buildroot
as a "board" configuration as well.
https://github.com/skiffos/SkiffOS/tree/master/configs/virt/wsl
The Buildroot system works as expected in the WSL environment. The
buildroot output tar.gz can be imported directly into WSL 2.0. WSL 1.0
requires using the WSL-DistroLauncher project to load the distribution
via a Windows Appx.
This is an interesting way to use Buildroot under Windows.
Best regards,
Christian Stewart
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Buildroot on Windows Subsystem for Linux (WSL)
2021-01-14 9:08 [Buildroot] Buildroot on Windows Subsystem for Linux (WSL) Christian Stewart
@ 2021-01-18 20:15 ` Peter Korsgaard
2021-01-19 3:52 ` Christian Stewart
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2021-01-18 20:15 UTC (permalink / raw)
To: buildroot
>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:
> Hi all,
> Windows Subsystem for Linux 1.0 runs a userspace without a kernel, and
> 2.0 runs a full Linux Kernel inside a VM.
> SkiffOS, using Buildroot, now supports WSL with the "virt/wsl" package.
> This could be extracted from Skiff and submitted to mainline Buildroot
> as a "board" configuration as well.
> https://github.com/skiffos/SkiffOS/tree/master/configs/virt/wsl
> The Buildroot system works as expected in the WSL environment. The
> buildroot output tar.gz can be imported directly into WSL 2.0. WSL 1.0
> requires using the WSL-DistroLauncher project to load the distribution
> via a Windows Appx.
> This is an interesting way to use Buildroot under Windows.
Cute. Besides the fact that you are booting a (heavily patched) Linux
kernel, is there any specific advantages to just creating a docker
container or a classic VM from a Buildroot build?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Buildroot on Windows Subsystem for Linux (WSL)
2021-01-18 20:15 ` Peter Korsgaard
@ 2021-01-19 3:52 ` Christian Stewart
2021-01-19 7:06 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Christian Stewart @ 2021-01-19 3:52 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Mon, Jan 18, 2021 at 12:15 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Christian" == Christian Stewart <christian@paral.in> writes:
> > The Buildroot system works as expected in the WSL environment. The
> > buildroot output tar.gz can be imported directly into WSL 2.0. WSL 1.0
> > requires using the WSL-DistroLauncher project to load the distribution
> > via a Windows Appx.
>
> > This is an interesting way to use Buildroot under Windows.
>
> Cute. Besides the fact that you are booting a (heavily patched) Linux
> kernel, is there any specific advantages to just creating a docker
> container or a classic VM from a Buildroot build?
By my (limited) understanding, WSL2 promises tighter integration
between Linux and the Windows OS.
I haven't tested it, but docs say you can override the kernel image.
It forces a wsl-provided /init binary, which forks several times to
consume PID 1, 2, 3.
https://github.com/microsoft/WSL2-Linux-Kernel/issues/30#issuecomment-698922943
According to this, Windows 10 insider builds 20201 or above, you can
add a custom init process:
Adding to /etc/wsl.conf inside the VM:
[boot]
command = "/my-init"
However, the my-init binary will not run as PID 1.
I am working on a workaround similar to the "systemd-genie" project to
create a PID namespace and run systemd as PID 1 inside that.
Best regards,
Christian Stewart
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Buildroot on Windows Subsystem for Linux (WSL)
2021-01-19 3:52 ` Christian Stewart
@ 2021-01-19 7:06 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2021-01-19 7:06 UTC (permalink / raw)
To: buildroot
>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:
> Hi Peter,
> On Mon, Jan 18, 2021 at 12:15 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>>
>> >>>>> "Christian" == Christian Stewart <christian@paral.in> writes:
>> > The Buildroot system works as expected in the WSL environment. The
>> > buildroot output tar.gz can be imported directly into WSL 2.0. WSL 1.0
>> > requires using the WSL-DistroLauncher project to load the distribution
>> > via a Windows Appx.
>>
>> > This is an interesting way to use Buildroot under Windows.
>>
>> Cute. Besides the fact that you are booting a (heavily patched) Linux
>> kernel, is there any specific advantages to just creating a docker
>> container or a classic VM from a Buildroot build?
> By my (limited) understanding, WSL2 promises tighter integration
> between Linux and the Windows OS.
> I haven't tested it, but docs say you can override the kernel image.
You haven't tested it? Didn't the defconfig you point to build a Linux
kernel as well?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-19 7:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 9:08 [Buildroot] Buildroot on Windows Subsystem for Linux (WSL) Christian Stewart
2021-01-18 20:15 ` Peter Korsgaard
2021-01-19 3:52 ` Christian Stewart
2021-01-19 7:06 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox