WSL, or Windows Subsystem for Linux, is a handy feature for Windows users who want to run Linux without all the hassle. It lets you open up a Linux terminal right on your Windows machine, so you can use Linux commands and tools without needing a separate Linux computer or a virtual machine. It's perfect for developers and anyone who likes the flexibility of Linux but prefers sticking with Windows for their day-to-day stuff.
Docker is like having a magic box for your apps. You put your application and everything it needs to run (like code, libraries, and settings) into this box, called a container. Then, you can run this container on any machine with Docker installed, and it will work exactly the same. It's super useful because it means your app can run anywhere, from your laptop to a big server in the cloud, without any weird issues popping up. Plus, it makes sharing your app with others a breeze.. We use Docker for compiling as the container can be started/stopped at will and also resets the rootfs every boot.
WSL and Docker
- Enable WSL and set WSL2 as default.
- Install a Linux distribution from Microsoft Store.
- Install Docker Desktop and enable WSL2 integration.
- Install Git and Make in your WSL terminal.
- Clone a repository and build the Docker image.
Enable WSL: Open PowerShell as Administrator and run:
wsl --install
Set WSL2 as the Default Version:
wsl --set-default-version 2
Restart Your Computer: Restart your computer to apply changes.
Install a Linux Distribution: Open Microsoft Store, search for your preferred Linux distribution (e.g., Ubuntu), and install it.
Set Up Your Linux Distribution: Launch the installed distribution from the Start menu and complete the initial setup (create a user account and set a password).
Download Docker Desktop: Docker's official website
Enable WSL2 Integration: During the installation, ensure the option "Use the WSL 2 based engine" is checked.
Finish Installation: Complete the installation and start Docker Desktop.
Open Docker Desktop: Go to Settings.
Enable WSL2 Integration:
Navigate to Resources
-> WSL Integration
.
Ensure that the Linux distribution you installed is checked to enable integration.
Open WSL Terminal: Open your installed Linux distribution from the Start menu.
Update Package Lists:
sudo apt update
Install Git and Make:
sudo apt install git make
The Union toolchain is a pre-built toolchain by Shauninman. It contains everything you need to compile for the Miyoo Mini(&Plus)
Clone the Repository:
git clone https://github.com/shauninman/union-miyoomini-toolchain.git
Navigate to the Directory:
cd union-miyoomini-toolchain
Build and Run the Docker Container:
make shell
mattpc@MattPC:~/union-miyoomini-toolchain$ make shell
docker run -it --rm -v "/home/mattpc/union-miyoomini-toolchain/workspace":/root/workspace miyoomini-toolchain /bin/bash
root@7ee8499587da:~/workspace#
You're now in a containerised shell and can begin compiling; why not try this script out to compile your first Miyoo compatible binary?
The Hello-Miyoo test app