Adriana Kobylak | 52b2330 | 2020-03-28 12:29:31 -0500 | [diff] [blame] | 1 | # short-description: Create an image for eMMC |
| 2 | # long-description: Creates an eMMC card image for the User Data Area that can |
| 3 | # be used with the Aspeed SoC family. |
| 4 | # |
| 5 | # Assumes a minimum flash size of 16GB. |
| 6 | # Assumes U-Boot is stored elsewhere, such as an eMMC boot volume or NOR flash. |
| 7 | # |
| 8 | # --- - ----- -------- -------- -------- -------- ------ -------- ------- |
| 9 | # |GPT| | env | boot-a | boot-b | rofs-a | rofs-b | rwfs | hostfw |GPT-sec| |
| 10 | # --- - ----- -------- -------- -------- -------- ------ -------- ------- |
| 11 | # ^ 1MB 64MB 64MB 1GB 1GB 7GB 5GB |
| 12 | # | |
| 13 | # 0x5000 |
| 14 | # |
| 15 | # Primary GPT size (Beginning of image): |
| 16 | # 512B (Protective MBR) + 512B (Primary Header) + 16KB (Primary Table) |
| 17 | # First partition (u-boot-env) is 4K-aligned, which puts it at offset 0x5000 |
| 18 | # |
| 19 | # Secondary GPT size (End of image): |
| 20 | # 16KB (Secondary Table) + 512B (Secondary Header) |
| 21 | |
| 22 | bootloader --ptable gpt |
| 23 | |
Adriana Kobylak | 8d6b91c | 2020-07-08 13:47:10 -0500 | [diff] [blame] | 24 | part --align 4 --fixed-size 1M --source rawcopy --sourceparams="file=${DEPLOY_DIR_IMAGE}/u-boot-env.bin" |
Adriana Kobylak | 52b2330 | 2020-03-28 12:29:31 -0500 | [diff] [blame] | 25 | part --fstype=ext4 --fixed-size 64M --source bootimg-partition --label boot-a |
| 26 | part --fstype=ext4 --fixed-size 64M --source bootimg-partition --label boot-b |
| 27 | part --fstype=ext4 --fixed-size 1G --source rootfs --label rofs-a |
| 28 | part --fstype=ext4 --fixed-size 1G --source rootfs --label rofs-b |
| 29 | part --fstype=ext4 --fixed-size 7G --label rwfs |
Adriana Kobylak | 9ced8f1 | 2020-07-12 15:47:11 -0500 | [diff] [blame] | 30 | part --fstype=ext4 --fixed-size ${WKS_HOSTFW_SIZE} --source rootfs --rootfs-dir=${DEPLOY_DIR_IMAGE}/hostfw/image/ --label hostfw |