Verify Windows host system requirements
The following table lists the minimum hardware resources the WSL environment needs for Qualcomm Linux builds:| Requirement | Specification |
|---|---|
| Processor architecture | X64 |
| CPU cores | 8 or more |
| RAM | 16 GB or more |
| Storage | 400 GB of free space |
Enable WSL and install Ubuntu
Qualcomm Linux uses the Ubuntu 22.04 Linux distribution. The steps to enable WSL and install Ubuntu differ based on your Windows version. Follow the instructions applicable to your version:- WSL 2 (Windows 10 2004+ and Windows 11)
- WSL 1 (older Windows versions)
For instructions on how to enable WSL 2 and install Ubuntu 22.04, see Install Ubuntu on WSL 2.
Configure Ubuntu settings in WSL
To set up the WSL environment, configure WSL-specific settings in WSL. Use thewsl.conf file to configure the following WSL-specific settings for the Linux distro you installed:
[automount] options = "metadata": Enables Linux-style file permissions[boot] systemd = true: Enables systemd in WSL[boot] command = systemctl start docker: Starts the Docker service automatically when WSL launches
wsl.conf file every time you open it.
To configure WSL-specific settings, do the following:
-
In the Ubuntu terminal, use the
sudocommand to add the following contents in the/etc/wsl.conffile:/etc/wsl.conf -
In Windows PowerShell, run the following command to restart WSL:
PowerShell
Enable USB device access for WSL
WSL 2 runs in a lightweight VM that doesn’t have access to USB devices by default. As a result, commands such aslsusb and flashing tools can’t detect the target device.
To enable USB access for WSL, use usbipd-win to pass the USB device’s traffic from Windows to WSL using USB/IP:
-
Open Windows PowerShell as administrator and run the following command to install
usbipd-win:PowerShell -
Optional: To enable mirrored networking, in Windows PowerShell, run the following command to create the
.wslconfigfile in your user profile:PowerShellOn corporate or Group Policy–managed machines, the default network address translation (NAT) networking mode may block the firewall rule that usbipd requires, causing the device attach to fail. Switching to mirrored networking routes the connection over loopback, bypassing the restriction. -
To restart WSL, run the following command:
PowerShell
-
In the Ubuntu terminal, run the following command to install the USB/IP client tools:
Ubuntu terminal
-
Open Windows PowerShell as administrator and run the following command to list the connected USB devices:
PowerShell
-
Make a note of the
BUSIDof the device you want to flash. For flashing Qualcomm devices,BUSIDis typically the QDLoader 9008 device (05c6:9008, EDL mode) or the Fastboot device.Sample output -
Open Windows PowerShell as administrator and run the following command to bind the device once:
PowerShell
-
Replace
1-4with your actualBUSID. The device’sSTATEchanges toShared. -
In Windows PowerShell, run the following command to attach the device to WSL:
PowerShell
- Re-attach after every replug or mode switch: When a device changes modes during flashing (for example, normal → EDL 9008, or → fastboot), Windows re-enumerates it, often with a new
BUSIDand the WSL attachment drops. Re-runusbipd listand then runusbipd attach --wsl --busid <new-busid>. This is a common source of errors when flashing Qualcomm devices in WSL. - Re-attach after every WSL restart: The attachment doesn’t persist across
wsl --shutdownor a system reboot; only the bind persists.
- Re-attach after every replug or mode switch: When a device changes modes during flashing (for example, normal → EDL 9008, or → fastboot), Windows re-enumerates it, often with a new
-
In the Ubuntu terminal, run the following command to confirm that Ubuntu detects the device:
The device must appear in the list, for example, as follows:Ubuntu terminalThe flashing tool running inside WSL can now detect the device. For flashing instructions, see Qualcomm Linux Build Guide.
-
To detach the device after flashing, run the following command in Windows PowerShell:
PowerShell
Troubleshoot WSL issues
Resolve common issues related to performance, disk space, domain name system (DNS), build errors, and USB pass-through that may occur when using WSL for Qualcomm Linux builds.Performance issues in WSL
If you’re experiencing performance issues in WSL, tune global resource limits, such as memory, CPU, and swap using the.wslconfig file. The resource limits apply to all WSL 2 distributions.
Adjust settings incrementally and validate results after each change. For more information, see Advanced settings configuration in WSL.
Insufficient disk space on the C drive for Qualcomm Linux builds
By default, Ubuntu installs on the C drive. If the C drive doesn’t have enough free space for Qualcomm Linux builds, move the Ubuntu installation to another drive. To move the Ubuntu installation, run the following command in Windows PowerShell as administrator:PowerShell
PowerShell
DNS resolution failures in WSL
WSL may fail to resolve domain names, causing network-dependent operations, such as fetching packages or cloning repositories, to fail with DNS errors. To fix DNS resolution failures, configure DNS settings manually using theresolv.conf file:
-
To disable automatic
resolv.confgeneration, in the Ubuntu terminal, run thesudocommand to add the following contents in the/etc/wsl.conffile:/etc/wsl.conf -
To set DNS servers in
resolv.conf, in the Ubuntu terminal, run thesudocommand to replace the contents of/etc/resolv.confwith your internal DNS server, followed by a public DNS server as a fallback:WSL queries the nameservers in order. Listing the internal DNS server first ensures domains, private package registries, and virtual private network (VPN)-only resources resolve correctly./etc/resolv.conf -
To restart WSL and apply the changes, run the following command in Windows PowerShell:
PowerShell
Git Filename too long error in Yocto builds
When running a Qualcomm Linux Yocto build in WSL, Git may fail with a Filename too long error. The error occurs because Windows enforces a default MAX_PATH limit of 260 characters, which Yocto build paths can exceed.
To fix this error, enable long path support for Git by running the following command in the Ubuntu terminal:
Ubuntu terminal
USB device fails to attach to WSL
Ifusbipd attach fails, becomes unresponsive, or the device doesn’t appear in lsusb, do the following:
-
To confirm that usbipd has bound the device, run
usbipd listin Windows PowerShell as administrator and verify that theSTATEcolumn showsShared. If it’sNot shared, the attach fails. Bind it using theusbipd bind --busid <busid>command in Windows PowerShell as administrator. -
To check the networking mode, confirm that the
usbipd attachoutput reportsDetected networking mode mirrored. If it reportsnat, the corporate firewall or Group Policy is blocking the connection on managed machines. To resolve this, do the following: a. Enable mirrored networking as described in Step 2 of Enable USB device access for WSL. b. Verify that the.wslconfigfilename and path are correct. c. Runwsl --shutdownfor the change to take effect. -
The
BUSIDcan change when you unplug the device or switch modes. If the BUSID has changed, do the following: a. Re-runusbipd listto confirm the currentBUSID. b. Re-runusbipd attach --wsl --busid <new-busid>. c. Confirm that WSL has the USB/IP client tools installed.
If the attach still fails after enabling mirrored networking, Group Policy may be blocking the
usbipd firewall rule entirely. In this case, flash from a native Ubuntu host instead, where USB pass-through isn’t required.
