[Buildroot] Raspberry: sd card image

David elektrolot at wp.pl
Tue Jun 28 11:02:57 UTC 2016


I'm trying to change sdcard image generated by Buildroot for Raspberry and I have few questions.

1) How can I modify size of root filesystem partition? Size option of genimage is not working. I 
always get partition with 5% free space. For example I add size:

partition rootfs {
	partition-type = 0x83
     	image = "rootfs.ext4"
	size = 512M
   }

It does not change anything. The partition size is the same as previously.

2) I want to add third partition and mount it during boot in read-write mode to home directory. 
Root filesystem is in my case mounted as read-only. I tried add to genimage config file:

partition data {
	partition-type = 0x83
	size = 128M
   }

without success. Of course I can do it with other tools (fdisk, mkfs), but I see that genimage is 
now a standard tool in Buildroot to create images.

3) I think that good idea is mount root filesystem with noatime option. Unfortunately 
rootflags=noatime does not work. How can I config this option in Buildroot? I know that I can modify 
/etc/fstab using the overlay, but I think that there is better way to do it. Do I have to modify 
/etc/inittab? I noticed that Buildroot change this file according to 
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW.

4) In my system only third partition is mounted in read-write mode, so I want to run fsck on this 
partition before mount to be sure that file system is not corrupted by power fail. Should I modify 
/etc/inittab for this purpose?

5) BTW. I noticed that command tune2fs is not available when BR2_PACKAGE_E2FSPROGS_TUNE2FS is selected.


More information about the buildroot mailing list