Skip to main content
A target in OpenWrt represents a combination of CPU architecture, SoC (System-on-Chip) family, and the board-specific code needed to build firmware for a particular class of hardware. Selecting the right target is the first step in any OpenWrt build.

What Is a Target?

Every target lives under target/linux/<target>/ and contains:
  • A Makefile declaring the architecture, features, subtargets, and default packages
  • Kernel configuration fragments (config-<version>)
  • Device Tree Source files (dts/) for individual boards
  • Target-specific patches (patches-<version>/)
  • Image generation rules (image/)
When you run make menuconfig and select a Target System, you are choosing one of these directories.

Target vs. Subtarget

Many targets are further divided into subtargets — sub-families that share the same CPU architecture but differ in SoC revision, memory layout, or peripheral set.
TargetSubtargets
ath79generic, mikrotik, nand, tiny
x86generic, legacy, geode, 64
ramipsmt7620, mt7621, mt76x8, rt288x, rt305x, rt3883
mediatekfilogic, mt7622, mt7623, mt7629
A subtarget can restrict the set of supported devices, enable different kernel options, or produce image formats specific to that sub-family.

Major Platform Families

ath79 — Atheros/QCA MIPS

Covers the AR7xxx/AR9xxx/QCA95xx SoC family. Widely used in home routers (TP-Link, D-Link, Ubiquiti). MIPS 24kc architecture.

ramips — MediaTek/Ralink MIPS

Covers Ralink RT2880/RT3xxx and MediaTek MT7620/MT7621/MT76x8 SoCs. Very common in low-cost routers.

mediatek — MediaTek ARM

Covers MediaTek Filogic (MT7981/MT7986/MT7988), MT7622, MT7623, MT7629. Modern ARM-based Wi-Fi 6/6E routers.

qualcommax — Qualcomm IPQ

Covers IPQ5018, IPQ6018, IPQ8074 (and related). ARM-based Qualcomm Wi-Fi 6 platforms used in high-end routers.

ipq40xx — Qualcomm IPQ40xx

ARM Cortex-A7 quad-core SoCs (IPQ4018/4019/4028/4029). Used in mid-range 802.11ac routers.

ipq806x — Qualcomm IPQ806x

ARM Cortex-A15 dual-core (IPQ8062/8064/8065). Used in older Qualcomm 802.11ac platforms.

x86 — x86 / x86-64

PC-compatible hardware, virtual machines, and x86 embedded boards. Subtargets: generic, 64, legacy, geode.

bcm27xx — Raspberry Pi

Broadcom BCM2709/BCM2710/BCM2711/BCM2712 (Raspberry Pi 2/3/4/5). ARM architecture.

rockchip — Rockchip ARM

Covers RK3328, RK3399, RK3568, RK3588 SoCs used in ARM single-board computers and routers.

sunxi — Allwinner ARM

Covers Allwinner H2+/H3/H5/H6/A64 SoCs (Orange Pi, NanoPi, etc.). ARM architecture.

armsr — Generic ARM/AArch64

Generic ARM and AArch64 support using UEFI/ACPI or Device Tree. Suitable for virtual machines and standards-compliant ARM hardware.

bcm47xx / bcm53xx — Broadcom MIPS/ARM

MIPS-based BCM47xx and ARM-based BCM53xx SoCs. Used in older Linksys, Netgear, and ASUS routers.

bcm4908 — Broadcom BCM4908

ARM Cortex-A53 quad-core. Broadcom’s cable gateway SoC family.

lantiq — Lantiq/Intel MIPS

Covers Lantiq Xway DSL SoCs (VR9, AR10, GRX). Used in DSL modem-routers.

mvebu — Marvell EBU

Covers Marvell Armada 370/375/38x/XP. ARM-based network SoCs used in NAS and routers.

at91 — Microchip/Atmel AT91

Covers Microchip/Atmel SAM9/SAMA5/SAMA7 ARM SoCs. Industrial and embedded applications.

Full Target List

The following targets are present in target/linux/ as of the current tree:
airoha    apm821xx  armsr     at91      ath79     bcm27xx   bcm47xx
bcm4908   bcm53xx   bmips     d1        econet    gemini    generic
imx       ipq40xx   ipq806x   ixp4xx    kirkwood  lantiq    layerscape
loongarch64 malta   mediatek  microchipsw mpc85xx mvebu     mxs
octeon    omap      pistachio qoriq     qualcommbe qualcommax ramips
realtek   rockchip  sifiveu   siflower  starfive  stm32     sunxi
tegra     uml       x86       zynq
The generic target contains shared kernel patches and configuration fragments used by all other targets. It is not a buildable target by itself.

Target Makefile Structure

Every target Makefile follows a common pattern. Here is the ath79 target as an example:
# target/linux/ath79/Makefile
include $(TOPDIR)/rules.mk

ARCH:=mips
BOARD:=ath79
BOARDNAME:=Atheros ATH79
CPU_TYPE:=24kc
SUBTARGETS:=generic mikrotik nand tiny

FEATURES:=ramdisk squashfs usbgadget

KERNEL_PATCHVER:=6.12

include $(INCLUDE_DIR)/target.mk

DEFAULT_PACKAGES += \
    kmod-gpio-button-hotplug swconfig \
    kmod-ath9k uboot-envtools

$(eval $(call BuildTarget))
Key variables are described in detail in Adding a Target.

Build docs developers (and LLMs) love