Download SD Card Image

r2p0 (Ubuntu 16.04) Image

BOOT Partition Configuration

The top-level of the BOOT partition of the r2p0 image does not initially contain any of the board-specific components required to boot. To boot a snickerdoodle with the r2p0 image, the board-specific bootloader and device tree files must be added to the top-level of the BOOT partition. Optionally, a bitstream (system.bit) can be added to be (by default) loaded during the boot process.

The BOOT partition contains boot components for each snickerdoodle variant and multiple baseboards for ease-of-use. To supply the default boot components for a board, copy the bootloader and devictree files from the board subdirectory to the top-level of the BOOT partition. Before booting, the top-level of the BOOT partition should contain the following files:

Load microSD Card on Windows Host

Because Windows does not support reading/writing of Linux filesystems (ext2, etc.), the partitioning and formatting of the microSD card must be done with disk images. The disk image contains all of the information required to define the partition scheme, disk format and file system contents. This includes the boot partition components as well as the root filesystem partition and it's contents.

Format microSD Card

Before load a microSD card with an SD card image, the card must first be formatted. A tool for formatting the microSD card is produced by the SD Association and can be found at SDCard.org. After downloading and installing the SDFormatter software, connect the microSD card to the host machine and run the SDFormatter.

Disk Imager

The Win32 Disk Imager utility is used to write the disk image to the freshly formatted microSD card. Download the utility from SourceForge and install it on the Windows host.

After opening the Win32 Disk Imager, verify the drive letter matches that of the newly formatted card. By selecting the folder button next to the image file path, you will be able to navigate to and select the extracted system image file. After selecting the system image, select 'Write' to begin writing the image to the microSD card.

Manual SD Card Disk Layout

Partitioning the SD Card (fdisk)

Before partitioning the SD card, any partitions that have been mounted on the system must be unmounted. This can be done using the umount command.

umount /dev/sdb1

Once the SD card has been located, we can partition it for the Linux system (BOOT partition) and root filesystem (ROOTFS partition) using fdisk. fdisk must be run with root permissions (sudo) using the disk parent as the argument (do not use the parition number in the argument).

sudo fdisk /dev/sdb

From within the fdisk interface, we can view the parition table at any time using the "p" command. In this example, an 8GB SD card with a single FAT32 partition is being used and will be re-partitioned for snickerdoodle.

BOOT Partition

First, a partition must be allocated for the Linux system binaries and files. This includes BOOT.bin (FSBL, bitstream, U-Boot), uEnv.txt, devicetree.dtb, and the Linux kernel uImage. The partition size for these files is recommended to be 128MB in size which translates to an additional 262144, 512 byte sectors.

Before writing the parition table, you should verify the partition layout by printing it with the ’p’ command. In this example, an 8GB SD card has been partitioned with a 128MB FAT32 BOOT partition and the rest allocated for a Linux ROOTFS partition.

Formatting Partitions

With a partitioned SD card, the partitions need to be formatted with the necessary filesystem type. For the BOOT partition, the filesystem type is VFAT. Formatting the BOOT partition can be done using the mkfs.vfat3. To format a FAT32 filesystem on /dev/sdb1 with a ’BOOT’ disk label, the following command can be used:

mkfs.vfat -n BOOT /dev/sdb1

The format for the ROOTFS partition can be done with mke2fs which will format a Linux partition with an ext2/ext3/ext4 filesystem. To format an ext4 filesystem on /dev/sdb2 with a block size of 1k (1024) and a ’ROOTFS’ disk label, the following command can be used:

If the formatting is successful, the following output with be written to the console (writing superblocks and filesystem accounting information can take some time depending on the size and speed of the SD card):