summaryrefslogtreecommitdiff
path: root/meta-aspeed/wic/emmc-aspeed.wks.in
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
commit8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch)
tree281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-aspeed/wic/emmc-aspeed.wks.in
parentc16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff)
parent5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff)
downloadopenbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-aspeed/wic/emmc-aspeed.wks.in')
-rw-r--r--meta-aspeed/wic/emmc-aspeed.wks.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-aspeed/wic/emmc-aspeed.wks.in b/meta-aspeed/wic/emmc-aspeed.wks.in
new file mode 100644
index 000000000..ee0fbffd8
--- /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 --source rawcopy --sourceparams="file=${DEPLOY_DIR_IMAGE}/u-boot-env.bin"
+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} --source rootfs --rootfs-dir=${DEPLOY_DIR_IMAGE}/hostfw/image/ --label hostfw