I'm trying to setup my buildroot image with genimage. This is the default configuration file:
image boot.vfat {
vfat {
files = {
"bcm2710-rpi-3-b.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"kernel-marked/zImage"
}
}
size = 32M
}
image sdcard.img {
hdimage {
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
The nconfig > filesystem images fields are set to the default values. I don't need more freespace on rootfs.
Instead I want to create another ext4 partition, let's say of 100M. So this is the new genimage file I created:
image boot.vfat {
vfat {
files = {
"bcm2710-rpi-3-b.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"kernel-marked/zImage"
}
}
size = 32M
}
image opt.ext4 {
ext4 { }
size = 100M
}
image sdcard.img {
hdimage {
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
partition opt {
partition-type = 0x83
image = "opt.ext4"
}
}
But it returns this error:
genext2fs: couldn't allocate a block (no free space)
ext4(opt.ext4): failed to generate opt.ext4
Where's my mistake? I think I don't need to reserve more space in the buildroot settings because I'm creating a new partition, I'm not resizing the rootfs one!