Untitled

Format: Groovy
 ( View Raw)
Date: Fri, 06 Jan 2023 at 22:50:58


The method of partitioning below results in no "free space" shown before the vfat partition.
-------
genimage.cfg / https://github.com/pengutronix/genimage
-------
image boot.vfat {
	vfat {
		extraargs = "-F 32 -n BATOCERA"
		@files
	}
	size = 4G
}

image userdata.ext4 {
	ext4 {
		label = "SHARE"
		use-mke2fs = "true"
		extraargs = "-m 0"
	}
	size = "256M"
	# include files from TARGET_DIR/userdata
	mountpoint = "/userdata"
}

image batocera.img {
	hdimage {
		align = "1M"
		partition-table-type = "gpt"
	}

        partition part_idbloader {
                in-partition-table = "no"
                image = "../../rock5b/rock5b-idbloader.img"
                offset = 32K
        }

        partition part_uboot {
                in-partition-table = "no"
                image = "../../rock5b/rock5b-uboot.itb"
                offset = 8M
        }

	partition vfat {
		partition-type-uuid = "F"
		image = "boot.vfat"
		offset = 16M
	}

	partition userdata {
		partition-type-uuid = "L"
		image = "userdata.ext4"
	}
}
==============================
The method of partitioning below shows free space exists before the vfat partition.
How is the previous utility doing this? (without creating a partition)
---------------
sudo sgdisk -og test.img
sudo sgdisk -U test.img
sudo sgdisk -n 1:16M:4096M                                                     -t 1:ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 -c 1:boot test.img
sudo sgdisk -n 2:$(sgdisk -f test.img):$(sgdisk -E test.img) -t 2:0fc63daf-8483-4772-8e79-3d69d8477de4 -c 2:root test.img