1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Example fstool spec: a Raspberry Pi SD-card image.
#
# fstool build examples/raspberry-pi.toml -o /tmp/rpi.img
# fstool info /tmp/rpi.img # lists the MBR partitions
# fstool ls /tmp/rpi.img:1 / # the FAT boot partition
# fstool ls /tmp/rpi.img:2 / # the ext4 root partition
#
# The classic Raspberry Pi layout: an MBR disk with a FAT32 *boot* partition
# (the GPU firmware only reads FAT) followed by an ext4 *root* partition.
# fstool lays out the partitions and formats both filesystems; populate them
# from host directories by uncommenting the `source` lines below.
[]
# Total card size. Use the smallest real card you target; the root
# partition grows to fill whatever is left.
= "2GiB"
= "mbr"
# --- Partition 1: boot (FAT32) -------------------------------------------
# Holds the firmware (bootcode.bin, start*.elf, fixup*.dat), the kernel
# (kernel*.img), config.txt and cmdline.txt. MBR type "fat" = 0x0C
# (W95 FAT32 LBA), which the Pi firmware looks for.
[[]]
= "boot"
= "fat"
= "256MiB"
[]
= "fat32"
= "boot"
# source = "./boot" # firmware + kernel + config.txt + cmdline.txt
# --- Partition 2: root (ext4) --------------------------------------------
# `size = "remaining"` fills the rest of the card. Must be the last entry.
[[]]
= "root"
= "linux"
= "remaining"
[]
= "ext4"
= "rootfs"
# Pre-populate /dev so the system has console/null/zero/tty/… on first boot.
= "standard"
# source = "./rootfs" # your root tree (point cmdline.txt root= at /dev/mmcblk0p2)