Roadrunner technical documentation Buy

Run a full working Buildroot Linux using just a 128MB QuadSPI

This article illustrates how to save AT91Bootstrap, the device tree, the Linux Kernel and the Buildroot rootfs filesystem fully on QuadSPI with no use of MicroSD at all.

This example has been tested on a 128MB QuadSPI using a RoadRunner SOM model Q128


Run the at91bootstrap make menuconfig and set this items:

Memory selection  ---> 
    Flash Memory Technology (Dataflash)  --->
    SPI Interface Select (Quad SPI Interface)  ---> 
    QSPI Configuration  ---> 
        QSPI Bus Select (QSPI Bus 0)  --->
        QSPI IOSET Select  --->
            QSPI0 IOSET (QSPI0 IOSET 3)  --->
        [*] Quad SPI NOR flash memory is >16MiB (>128Mib)
        [ ] eXecute In Place

Kernel Image Storage Setup  --->
    (0x0000C000) Flash Offset for Linux Kernel Image
        Flattened Device Tree  --->
            [*] Flattened Device Tree Support
            (0x00003000) The Offset of Flash Device Tree Blob

Compile ad copy the binary file on SAM-BA the directory:

make CROSS_COMPILE=arm-linux-gnueabihf-
cp binaries/sama5d2_roadrunner-dataflashboot-linux-image-dt-3.9.1.bin ../sam-ba_3.3.1/at91bootstrap.bin

To know how to install and use SAM-BA read:

To know how to compile at91bootstrap read:

Linux Kernel

Run the Linux Kernel make menuconfig:

make ARCH=arm menuconfig

and set this items:

Device Drivers  ---> 
    <*> Memory Technology Device (MTD) support  --->
        <*>   SPI-NOR device support  ---> 
            <*>   Atmel Quad SPI Controller

File systems  --->
    <*> F2FS filesystem support

Launch the Kernel compilation and copy the zImage on the SAM-BA directory:

make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
cp arch/arm/boot/zImage ../sam-ba_3.3.1/

To know how to compile the Linux Kernel read:

Device tree

Save this definition inside the device tree file:

Definition to insert inside the apb section:

/* */

qspi0: spi@f0020000 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_qspi0_default>;

    /* conflict with sdmmc1 */
    status = "okay"; 

    flash@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <83000000>;

        at91bootstrap@00000000 {
            label = "at91bootstrap";
            reg = <0x00000000 0x00010000>;

        dtb@00003000 {
            label = "device tree";
            reg = <0x00003000 0x00009000>;

        kernel@00080000 {
            label = "kernel";
            reg = <0x0000C000 0x00500000>;

        rootfs@00400000 {
            label = "rootfs";
            reg = <0x0050C000 0x00000000>;

Definition to insert inside the pinctrl@fc038000 section:

pinctrl_qspi0_default: qspi0_default {
    sck_cs {
        pinmux = <PIN_PA22__QSPI0_SCK>,

    data {
        pinmux = <PIN_PA24__QSPI0_IO0>,

Compile the device tree and copy it on SAM-BA directory:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- acme-roadrunner-qspi.dtb
cp arch/arm/boot/dts/acme-roadrunner-qspi.dtb ../sam-ba_3.3.1/acme-roadrunner-qspi.dtb

Buildroot linux

Create a rootfs image and move it on the SAM-BA directory:

make menuconfig
cp output/images/rootfs.f2fs ../sam-ba_3.3.1/

SAM-BA commands

Move inside the SAM-BA directory and save the binaries on the QuadSPI:

sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c erase
sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c writeboot:at91bootstrap.bin
sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c write:acme-roadrunner-qspi.dtb:0x3000
sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c write:zImage:0xC000
sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c write:rootfs.f2fs:0x50C000

If you need to erase a portion of QuadSPI the update some binaries use these commands:

Erase at91bootstrap area:

sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c erase:0x0:0x3000

Erase dtb area:

sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c erase:0x3000:0x9000

Erase zImage area:

sudo ./sam-ba -p usb -b sama5d2-xplained -a qspiflash -c erase:0xC000:0x500000


Related products

RoadRunner D2

Info Doc Buy

  • CPU Microchip SAMA5D27
  • Cortex A5 @ 500 MHz
  • Very low power consumption:
    396mW in full speed mode
    198mW at Linux prompt
    17mW in standby mode
    10mW in suspend to RAM mode
  • Armhf architecture
  • DDR3L RAM 256 MB
  • QuadSPI 0/16/64/128MB
  • Size: 40x30 mm
  • Plug-in module
  • 200 pins 0.4 mm pitch
  • TFT parallel interface
  • Boot from internal Quad SPI or external uSD/eMMC
  • Linux Kernel 5.15 LTS
  • Debian, Buildroot and Yocto
  • Open source drivers

Info Doc Buy

Single Board Computer based on RoadRunner Linux SOM (Included)

  • Classic "Credit Card" form factor
  • Two USB Host 2.0 ports (one configurable as USB client on the USB-C connector)
  • One 10/100 Mbit/s Lan port
  • 2 Acme Sensor ports
  • Double placements for 2.54mm pitch 20x2 pinstrips (not soldered) for GPIOS, SPI, I2C, Serial etc ports
  • Credit Card footprint

Info Buy

  • All the circuitries you need to test the RoadRunner SOM
  • USB host, USB device, Ethernet port, MicroSD socket
  • Test points for power consumption measurements
  • All the Roadrunner signals exposed on 2.54mm pitch pins
  • On-board supercap for RTC and backup memory circuit

Home page Roadrunner technical documentation Buy