diff options
-rw-r--r-- | meta-aspeed/conf/machine/include/aspeed.inc | 5 | ||||
-rw-r--r-- | meta-aspeed/wic/emmc-aspeed.wks.in | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-aspeed/conf/machine/include/aspeed.inc b/meta-aspeed/conf/machine/include/aspeed.inc index a2316cf6a..c3c5f18c2 100644 --- a/meta-aspeed/conf/machine/include/aspeed.inc +++ b/meta-aspeed/conf/machine/include/aspeed.inc @@ -13,6 +13,11 @@ KERNEL_CLASSES ?= "kernel-fitimage" INITRAMFS_IMAGE ?= "aspeed-image-initramfs" INITRAMFS_FSTYPES ?= "cpio.xz" +WKS_FILE ?= "emmc-aspeed.wks.in" +WKS_FILE_DEPENDS ?= "virtual/kernel" +WKS_HOSTFW_SIZE ?= "5G" +IMAGE_BOOT_FILES ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE};fitImage" + MACHINE_EXTRA_RRECOMMENDS += "udev-aspeed-vuart udev-aspeed-mtd-partitions" MACHINEOVERRIDES =. "aspeed:" diff --git a/meta-aspeed/wic/emmc-aspeed.wks.in b/meta-aspeed/wic/emmc-aspeed.wks.in new file mode 100644 index 000000000..816352176 --- /dev/null +++ b/meta-aspeed/wic/emmc-aspeed.wks.in @@ -0,0 +1,30 @@ +# short-description: Create an image for eMMC +# long-description: Creates an eMMC card image for the User Data Area that can +# be used with the Aspeed SoC family. +# +# Assumes a minimum flash size of 16GB. +# Assumes U-Boot is stored elsewhere, such as an eMMC boot volume or NOR flash. +# +# --- - ----- -------- -------- -------- -------- ------ -------- ------- +# |GPT| | env | boot-a | boot-b | rofs-a | rofs-b | rwfs | hostfw |GPT-sec| +# --- - ----- -------- -------- -------- -------- ------ -------- ------- +# ^ 1MB 64MB 64MB 1GB 1GB 7GB 5GB +# | +# 0x5000 +# +# Primary GPT size (Beginning of image): +# 512B (Protective MBR) + 512B (Primary Header) + 16KB (Primary Table) +# First partition (u-boot-env) is 4K-aligned, which puts it at offset 0x5000 +# +# Secondary GPT size (End of image): +# 16KB (Secondary Table) + 512B (Secondary Header) + +bootloader --ptable gpt + +part --align 4 --fixed-size 1M --label u-boot-env +part --fstype=ext4 --fixed-size 64M --source bootimg-partition --label boot-a +part --fstype=ext4 --fixed-size 64M --source bootimg-partition --label boot-b +part --fstype=ext4 --fixed-size 1G --source rootfs --label rofs-a +part --fstype=ext4 --fixed-size 1G --source rootfs --label rofs-b +part --fstype=ext4 --fixed-size 7G --label rwfs +part --fstype=ext4 --fixed-size ${WKS_HOSTFW_SIZE} --label hostfw |