# Disk image for Microchip SAMA7G5EK (sama7g5 evaluation kit)

image boot.vfat {
	vfat {
		files = {
			"boot.bin",
			"u-boot.bin"
		}
	}

	size = 16M
}

image cfg.ext4 {
	empty = true
	temporary = true
	size = 16M

	ext4 {
		label = "cfg"
                use-mke2fs = true
                features = "uninit_bg"
                extraargs = "-m 0 -i 4096"
	}
}

# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
	empty = true
	temporary = true
	size = 128M

	ext4 {
		label = "var"
                use-mke2fs = true
                features = "uninit_bg"
                extraargs = "-m 0 -i 4096"
	}
}

image #INFIX_ID##VERSION#-sama7g54-ek-#TARGET#.img {
	hdimage {
		partition-table-type = "hybrid"
	}

	partition boot {
		partition-type = 0xC
		bootable = "true"
		image = "boot.vfat"
		offset = 1M
	}

	partition aux {
		partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
		image = "aux.ext4"
	}

	partition primary {
		partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
		bootable = true
		size = 250M
		image = "rootfs.squashfs"
	}

	partition secondary {
		partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
		bootable = true
		size = 250M
		image = "rootfs.squashfs"
	}

	partition cfg {
		partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
		image = "cfg.ext4"
	}

	partition var {
		partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
		image = "var.ext4"
	}
}

# Silence genimage warnings
config {}
