summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/start.rst
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2022-10-14 13:50:51 +0200
committerSteve Sakoman <steve@sakoman.com>2024-03-01 05:19:55 -1000
commit54321fcec4a438978034d52fe98bc408f4dc0f0e (patch)
tree9550f08a587c046b33445c47c34912bf9c08e964 /documentation/dev-manual/start.rst
parent2fb92fb14f038d0ea047cf19bf05a11349ca83f1 (diff)
downloadpoky-54321fcec4a438978034d52fe98bc408f4dc0f0e.tar.gz
manuals: updates for building on Windows (WSL 2)
- Use the Wikipedia naming scheme: WSL 2 instead of WSLv2 - Take into account Windows Server 2019 and 2022 which are supported too. - Improve some explanations (From yocto-docs rev: e64c1154c358128d76b1b8e3a5809dbaa8dc6881) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Quentin Schulz <foss@0leil.net> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/dev-manual/start.rst')
-rw-r--r--documentation/dev-manual/start.rst72
1 files changed, 35 insertions, 37 deletions
diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst
index 7d3a25b1f9..7b6026cf42 100644
--- a/documentation/dev-manual/start.rst
+++ b/documentation/dev-manual/start.rst
@@ -254,16 +254,16 @@ development using the Yocto Project. Your build host can be a native
254Linux machine (recommended), it can be a machine (Linux, Mac, or 254Linux machine (recommended), it can be a machine (Linux, Mac, or
255Windows) that uses `CROPS <https://github.com/crops/poky-container>`__, 255Windows) that uses `CROPS <https://github.com/crops/poky-container>`__,
256which leverages `Docker Containers <https://www.docker.com/>`__ or it 256which leverages `Docker Containers <https://www.docker.com/>`__ or it
257can be a Windows machine capable of running Windows Subsystem For Linux 257can be a Windows machine capable of running version 2 of Windows Subsystem
258v2 (WSL). 258For Linux (WSL 2).
259 259
260.. note:: 260.. note::
261 261
262 The Yocto Project is not compatible with 262 The Yocto Project is not compatible with version 1 of
263 `Windows Subsystem for Linux v1 <https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux>`__. 263 `Windows Subsystem for Linux <https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux>`__.
264 It is compatible but not officially supported nor validated with 264 It is compatible but neither officially supported nor validated with
265 WSLv2. If you still decide to use WSL please upgrade to 265 WSL 2. If you still decide to use WSL please upgrade to
266 `WSLv2 <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`__. 266 `WSL 2 <https://learn.microsoft.com/en-us/windows/wsl/install>`__.
267 267
268Once your build host is set up to use the Yocto Project, further steps 268Once your build host is set up to use the Yocto Project, further steps
269are necessary depending on what you want to accomplish. See the 269are necessary depending on what you want to accomplish. See the
@@ -434,35 +434,36 @@ the `Yocto Project BitBake
434<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__ 434<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
435extension accordingly. 435extension accordingly.
436 436
437Setting Up to Use Windows Subsystem For Linux (WSLv2) 437Setting Up to Use Windows Subsystem For Linux (WSL 2)
438----------------------------------------------------- 438-----------------------------------------------------
439 439
440With `Windows Subsystem for Linux 440With `Windows Subsystem for Linux (WSL 2)
441(WSLv2) <https://docs.microsoft.com/en-us/windows/wsl/wsl2-about>`__, 441<https://learn.microsoft.com/en-us/windows/wsl/>`__,
442you can create a Yocto Project development environment that allows you 442you can create a Yocto Project development environment that allows you
443to build on Windows. You can set up a Linux distribution inside Windows 443to build on Windows. You can set up a Linux distribution inside Windows
444in which you can develop using the Yocto Project. 444in which you can develop using the Yocto Project.
445 445
446Follow these general steps to prepare a Windows machine using WSLv2 as 446Follow these general steps to prepare a Windows machine using WSL 2 as
447your Yocto Project build host: 447your Yocto Project build host:
448 448
4491. *Make sure your Windows 10 machine is capable of running WSLv2:* 4491. *Make sure your Windows machine is capable of running WSL 2:*
450 WSLv2 is only available for Windows 10 builds > 18917. To check which 450
451 build version you are running, you may open a command prompt on 451 While all Windows 11 and Windows Server 2022 builds support WSL 2,
452 Windows and execute the command "ver". 452 the first versions of Windows 10 and Windows Server 2019 didn't.
453 :: 453 Check the minimum build numbers for `Windows 10
454 <https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-2---check-requirements-for-running-wsl-2>`__
455 and for `Windows Server 2019
456 <https://learn.microsoft.com/en-us/windows/wsl/install-on-server>`__.
457
458 To check which build version you are running, you may open a command
459 prompt on Windows and execute the command "ver"::
454 460
455 C:\Users\myuser> ver 461 C:\Users\myuser> ver
456 462
457 Microsoft Windows [Version 10.0.19041.153] 463 Microsoft Windows [Version 10.0.19041.153]
458 464
459 If your build is capable of running 4652. *Install the Linux distribution of your choice inside WSL 2:*
460 WSLv2 you may continue, for more information on this subject or 466 Once you know your version of Windows supports WSL 2, you can
461 instructions on how to upgrade to WSLv2 visit `Windows 10
462 WSLv2 <https://docs.microsoft.com/en-us/windows/wsl/wsl2-install>`__
463
4642. *Install the Linux distribution of your choice inside Windows 10:*
465 Once you know your version of Windows 10 supports WSLv2, you can
466 install the distribution of your choice from the Microsoft Store. 467 install the distribution of your choice from the Microsoft Store.
467 Open the Microsoft Store and search for Linux. While there are 468 Open the Microsoft Store and search for Linux. While there are
468 several Linux distributions available, the assumption is that your 469 several Linux distributions available, the assumption is that your
@@ -471,31 +472,28 @@ your Yocto Project build host:
471 making your selection, simply click "Get" to download and install the 472 making your selection, simply click "Get" to download and install the
472 distribution. 473 distribution.
473 474
4743. *Check your Linux distribution is using WSLv2:* Open a Windows 4753. *Check which Linux distribution WSL 2 is using:* Open a Windows
475 PowerShell and run:: 476 PowerShell and run::
476 477
477 C:\WINDOWS\system32> wsl -l -v 478 C:\WINDOWS\system32> wsl -l -v
478 NAME STATE VERSION 479 NAME STATE VERSION
479 *Ubuntu Running 2 480 *Ubuntu Running 2
480 481
481 Note the version column which says the WSL version 482 Note that WSL 2 supports running as many different Linux distributions
482 being used by your distribution, on compatible systems, this can be 483 as you want to install.
483 changed back at any point in time.
484 484
4854. *Optionally Orient Yourself on WSL:* If you are unfamiliar with WSL, 4854. *Optionally Get Familiar with WSL:* You can learn more on
486 you can learn more here -
487 https://docs.microsoft.com/en-us/windows/wsl/wsl2-about. 486 https://docs.microsoft.com/en-us/windows/wsl/wsl2-about.
488 487
4895. *Launch your WSL Distibution:* From the Windows start menu simply 4885. *Launch your WSL Distibution:* From the Windows start menu simply
490 launch your WSL distribution just like any other application. 489 launch your WSL distribution just like any other application.
491 490
4926. *Optimize your WSLv2 storage often:* Due to the way storage is 4916. *Optimize your WSL 2 storage often:* Due to the way storage is
493 handled on WSLv2, the storage space used by the undelying Linux 492 handled on WSL 2, the storage space used by the underlying Linux
494 distribution is not reflected immedately, and since bitbake heavily 493 distribution is not reflected immediately, and since BitBake heavily
495 uses storage, after several builds, you may be unaware you are 494 uses storage, after several builds, you may be unaware you are
496 running out of space. WSLv2 uses a VHDX file for storage, this issue 495 running out of space. As WSL 2 uses a VHDX file for storage, this issue
497 can be easily avoided by manually optimizing this file often, this 496 can be easily avoided by regularly optimizing this file in a manual way:
498 can be done in the following way:
499 497
500 1. *Find the location of your VHDX file:* 498 1. *Find the location of your VHDX file:*
501 499
@@ -549,14 +547,14 @@ your Yocto Project build host:
549 547
550.. note:: 548.. note::
551 549
552 The current implementation of WSLv2 does not have out-of-the-box 550 The current implementation of WSL 2 does not have out-of-the-box
553 access to external devices such as those connected through a USB 551 access to external devices such as those connected through a USB
554 port, but it automatically mounts your ``C:`` drive on ``/mnt/c/`` 552 port, but it automatically mounts your ``C:`` drive on ``/mnt/c/``
555 (and others), which you can use to share deploy artifacts to be later 553 (and others), which you can use to share deploy artifacts to be later
556 flashed on hardware through Windows, but your build directory should 554 flashed on hardware through Windows, but your build directory should
557 not reside inside this mountpoint. 555 not reside inside this mountpoint.
558 556
559Once you have WSLv2 set up, everything is in place to develop just as if 557Once you have WSL 2 set up, everything is in place to develop just as if
560you were running on a native Linux machine. If you are going to use the 558you were running on a native Linux machine. If you are going to use the
561Extensible SDK container, see the ":doc:`/sdk-manual/extensible`" Chapter in the Yocto 559Extensible SDK container, see the ":doc:`/sdk-manual/extensible`" Chapter in the Yocto
562Project Application Development and the Extensible Software Development 560Project Application Development and the Extensible Software Development