Skip to main content

Flash Layout & Partitioning

How does a typical partition table for the NAND OpenWiFi AP look like?

NAND devices use fixed boot partitions followed by a single large UBI container that holds the kernel, root filesystem, persistent data, and certificates as separate logical volumes.

PartitionSizePurpose
mtd0512 KBSBL1 bootloader stage
mtd1512 KBMIBIB partition metadata
mtd2256 KBBOOTCONFIG boot configuration
mtd31 MBQSEE secure firmware
mtd4256 KBDEVCFG device configuration
mtd5256 KBCDT chip/device data
mtd6512 KBAPPSBLENV U-Boot environment
mtd71.5 MBAPPSBL U-Boot
mtd81 MBART RF calibration (protected)
mtd9~120 MBUBI firmware container

UBI volumes inside mtd9 typically include:

  • kernel – Linux kernel
  • rootfs – Read-only root filesystem
  • rootfs_data – Writable overlay
  • certificates – Device certificates and keys

How does a typical partition table for NOR OpenWiFi access point look like?

NOR-flash OpenWiFi access points use a flat, fixed MTD layout (no UBI) because NOR flash supports direct random access and does not suffer from bad blocks. This layout is common across OpenWrt/OpenWiFi devices.

Flash details: 32 MB SPI-NOR with 64 KB erase blocks.

PartitionSizePurpose
mtd0512 KBu-boot bootloader
mtd1256 KBu-boot-env U-Boot environment
mtd2256 KBart RF calibration (protected)
mtd320 MBfirmware (kernel + squashfs rootfs)
mtd410 MBrootfs_data writable overlay
mtd5~1 MBcertificates device identity

Boot and firmware

  • u-boot and u-boot-env are read by the bootloader at power-on.
  • firmware is a combined image containing:
    • Linux kernel
    • SquashFS root filesystem
  • U-Boot boots directly from this partition.

Filesystems

  • Root filesystem: SquashFS (read-only, inside firmware)
  • Overlay: JFFS2 or F2FS on rootfs_data
  • Certificates: Stored in a dedicated partition to survive upgrades and resets