Usually NOR flash memory in OpenWRT-based devices is divided in 3 parts:

  • Bootloader (U-Boot) section, where bootloader itself as well as variables used to set its parameters reside
  • OpenWRT section, where OS resides — preloaded image as well as user files
  • ART (Atheros Radio Test) section — Wi-Fi adapter calibration data

Common practice here is to combine U-Boot and its environmental variables into a single section and compress it to save flash space — usually this section is 128 KB in size. Single compressed section makes it impossible to change variables without reflashing the whole bootloader — e.g., from userspace program running atop of OpenWRT. Changing variables may be extremely useful if you want to change board's basic parameters, such as CPU frequency, for the next boot.

That's why in some solutions U-Boot itself and its variables are divided in two separate uncompressed section, which allows to modify bootloader and its settings independently. It takes 256+64 = 320 KB of flash space to store U-Boot and variables both uncompressed.

Black Swift combines the best from both solutions: bootloader itself and its environmental variables are separated into two section, bootloader is compressed while variables are not. It means we are not wasting flash space and at the same time bootloader's environment variables are accessible from the main OS. Total occupied space is 128 + 64 = 192 KB.

Exact partitioning of the NOR flash chip on Black Swift is (address +size):
  • Bootloader section: 0x9F000000 +0x20000
  • Variables section: 0x9F020000 +0x10000
  • OpenWRT section: 0x9F030000 +0xFC0000
  • ART section: 0x9FFF0000 +0x10000