Installing to NAND MTD partitions using mainline (ish) u-boot and kernel

This document contains instructions on how to compile up and install u-boot and a recent linux kernel (3.15 appx) for installing Debian to sunxi MTD NAND partitions, formatted as ubifs. Important things to note:

  • this is NOT the same as the allwinner NAND driver, it is MTD
  • u-boot-spl is installed into a special area at the beginning of the NAND
  • prerequisites are to have a working SD/MMC root filesystem to copy to NAND


  • git clone git://
  • branch required is sunxi-nand-pre-v5
  • example .config is here: [config]

To build:

  • make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
  • make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 zImage dtbs modules