How long does the first build take?
How long does the first build take?
The first full build takes approximately 30 to 90 minutes on modern hardware, depending on:
- CPU speed and number of cores (the build uses parallel compilation)
- Whether the toolchain needs to be compiled from scratch (it does on the first run)
- Network speed for downloading source archives
- Disk I/O speed
Why does my build fail with 'No rule to make target'?
Why does my build fail with 'No rule to make target'?
This error almost always means you have not run the feed setup steps. After a fresh clone, you must install the packages from the configured feeds:Then run
make menuconfig to select your target and packages, and rebuild.Other possible causes:- A package dependency references a package that is not installed from any feed
- A package name was changed and your
.configreferences the old name (runmake defconfigto clean it up)
How do I add a package to the firmware image?
How do I add a package to the firmware image?
Run
Press
make menuconfig and navigate to the package category. Packages have three states:| Key | State | Meaning |
|---|---|---|
y | Built-in | Package is compiled into the firmware image |
m | Module | Package is compiled as a .ipk but not included in the image |
n / space | Excluded | Package is not built |
y on a package to include it in the firmware. Press m to build it as an installable package only.Alternatively, set it in a minimal config file:Can I build OpenWrt on Windows?
Can I build OpenWrt on Windows?
No, not directly. OpenWrt requires a case-sensitive filesystem and a POSIX-compatible build environment, which Windows does not provide natively.Supported options:
- WSL2 (Windows Subsystem for Linux 2): Install Ubuntu or Debian from the Microsoft Store. Make sure to work inside the WSL2 filesystem (e.g.,
~/openwrt), not inside/mnt/c/(which is a case-insensitive NTFS mount). - Linux VM: Use VirtualBox, VMware, or Hyper-V with a Linux guest.
- Native Linux: The recommended approach.
- macOS: Supported with Homebrew dependencies, but requires a case-sensitive volume.
How do I update a single package without rebuilding everything?
How do I update a single package without rebuilding everything?
Use the package-specific compile target:To rebuild the final image after recompiling packages:
How do I preserve my configuration across sysupgrade?
How do I preserve my configuration across sysupgrade?
The During a sysupgrade, these files are archived to RAM, the new firmware is flashed, and the files are restored to the overlay.
sysupgrade command reads /etc/sysupgrade.conf to determine which files to back up before flashing and restore afterward.Add files or directories to preserve:Files in
/etc/config/ are preserved by default. Only add extra paths for files outside the standard config location.What is the difference between factory and sysupgrade images?
What is the difference between factory and sysupgrade images?
| Image Type | Used For | Characteristics |
|---|---|---|
| factory | First installation from the device’s original vendor firmware | Often includes a vendor-specific header, checksum, or partition layout required by the vendor’s bootloader or web UI |
| sysupgrade | Upgrading an existing OpenWrt installation | Simpler format; just kernel + rootfs in the layout expected by the OpenWrt sysupgrade script |
factoryimage when flashing from the vendor’s stock firmware for the first timesysupgradeimage when upgrading from an existing OpenWrt installation
How do I enable SSH on a fresh OpenWrt install?
How do I enable SSH on a fresh OpenWrt install?
SSH (via Dropbear) is enabled by default on the LAN interface in a standard OpenWrt installation.To connect:On a fresh install, there is no password for the root account. You will be prompted to set one via the web interface (LuCI) or via the CLI:If SSH is not accessible:
- Verify you are connected to the LAN port (not WAN)
- Check that the firewall is not blocking port 22 on the LAN
- Ensure Dropbear is running:
/etc/init.d/dropbear status
How do I reset OpenWrt to factory defaults?
How do I reset OpenWrt to factory defaults?
To reset OpenWrt to its defaults (clearing the overlay partition):
firstboot calls jffs2reset (or the equivalent for your filesystem) which marks the overlay for erasure. On the next boot, the device starts fresh from the read-only SquashFS base.Alternatively, use the hardware reset button if your device supports it (typically hold for 10 seconds during boot, behavior varies by device).Where are the build logs?
Where are the build logs?
By default, the build outputs to the terminal with minimal verbosity. To capture detailed logs:The
V=s flag enables verbose mode showing every command executed. The 2>&1 redirects stderr (where most build errors appear) to stdout so tee can capture both.If CONFIG_BUILD_LOG=y is set in .config, per-package logs are automatically saved to logs/ in the build root.To find the specific error in a long log: