You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/Building in Windows 10 or 11 with Linux Subsystem.md
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Building in Windows 10 with Linux subsystem [Recommended]
1
+
# Building in Windows 10/11 with Linux subsystem (WSL)[Recommended]
2
2
3
-
Linux subsystem for Windows 10 is probably the simplest way of building INAV under Windows 10.
3
+
Linux subsystem for Windows (WSL) 10/11 is probably the simplest way of building INAV under Windows.
4
4
5
5
## Setting up the environment
6
6
@@ -9,7 +9,6 @@ run `windows features`
9
9
enable `windows subsytem for linux`
10
10
reboot
11
11
12
-
13
12
Install Ubuntu:
14
13
1. Go to Microsoft store https://www.microsoft.com/en-gb/store/b/home
15
14
1. Search and install most recent Ubuntu LTS version
@@ -56,12 +55,12 @@ You can fix this with by remounting the drive using the following commands
56
55
1.`sudo umount /mnt/c`
57
56
2.`sudo mount -t drvfs C: /mnt/c -o metadata`
58
57
59
-
## Building (example):
58
+
## Building with Make (example):
60
59
61
-
For detailed build instrusctions see [Building in Linux](Building%20in%20Linux.md)
60
+
For detailed build instructions see [Building in Linux](Building%20in%20Linux.md)
62
61
63
62
Launch Ubuntu:
64
-
Click Windows Start button then scroll and lauch "Ubuntu"
63
+
Click Windows Start button then scroll and launch "Ubuntu"
65
64
66
65
Building from Ubuntu command line
67
66
@@ -80,6 +79,39 @@ cd build
80
79
make MATEKF722
81
80
```
82
81
82
+
## Building with Ninja (example):
83
+
84
+
[Ninja](https://ninja-build.org/) is a popular cross-platform tool. It is both lightweight and executes parallel builds by default. It is advantageous to use this over the old _make_ method. There are detailed instructions for building with Ninja in [Building in Linux](Building%20in%20Linux.md#building-with-ninja).
85
+
86
+
Launch Ubuntu:
87
+
Click Windows Start button. Then scroll and launch **Ubuntu**.
88
+
89
+
> [!TIP]
90
+
> Before using Ninja, you will need to install it. From the Ubuntu command prompt type `sudo apt-get install ninja-build -y` and press enter.
91
+
92
+
Building from the command line:
93
+
94
+
First, change to the INAV directory with
95
+
```cd /mnt/c/inav```
96
+
97
+
Before building, you will need to prepare the build environment. You only need to do this once, unless you reinstall WSL or cmake.
98
+
99
+
```
100
+
mkdir build
101
+
cd build
102
+
cmake -GNinja ..
103
+
```
104
+
105
+
From then on, you can build your target by calling the following from inside the build directory.
106
+
```
107
+
ninja MATEKF722
108
+
```
109
+
110
+
If you want to build multiple targets. You can use:
0 commit comments