summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2022-02-08 13:21:35 +0000
committerSamuli Piippo <samuli.piippo@qt.io>2022-02-16 11:54:04 +0000
commit893176f548eaf2d0335c767a1c12225e5410d75b (patch)
tree6f4af2ba524f5f926be887a34cf94f1ba267297e
parent3511858ec2bab8d86115d583884954a15fbb5555 (diff)
wic: update wic support for both boards
Use WIC image configs from upstream layer for disco board, and add support for eval board using WKS files received from ST. Change-Id: Ic38e2bd27d900ffce2294f5491671e5a85a0b907 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
-rw-r--r--conf/distro/include/b2qt.inc9
-rw-r--r--conf/distro/include/stm32mp1-disco.conf9
-rw-r--r--conf/distro/include/stm32mp1-eval.inc14
-rw-r--r--recipes-qt/meta/meta-b2qt-embedded-qbsp.bbappend4
-rw-r--r--wic/sdcard-stm32mp-disco.wks.in26
-rw-r--r--wic/sdcard-stm32mp157c-ev1-trusted-1GB.wks.in28
-rw-r--r--wic/sdcard-stm32mp157c-ev1-trusted-vendorfs-1GB.wks.in28
7 files changed, 79 insertions, 39 deletions
diff --git a/conf/distro/include/b2qt.inc b/conf/distro/include/b2qt.inc
index 005febf..615269d 100644
--- a/conf/distro/include/b2qt.inc
+++ b/conf/distro/include/b2qt.inc
@@ -37,6 +37,15 @@ DISTRO_FEATURES:remove = " vulkan wayland "
IMAGE_FSTYPES:remove = "tar.xz"
+WKS_IMAGE_FSTYPES += "wic wic.xz wic.bmap conf"
+WKS_FILE += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', '${OPTEE_WIC_FILE}', '${TRUSTED_WIC_FILE}', d)}"
+
+DEPLOY_CONF_IMAGE_TYPE = "wic.xz"
+QBSP_IMAGE_CONTENT += "\
+ ${IMAGE_LINK_NAME}.${DEPLOY_CONF_IMAGE_TYPE} \
+ ${IMAGE_LINK_NAME}.conf \
+ "
+
# Define ROOTFS_MAXSIZE to 3GB
IMAGE_ROOTFS_MAXSIZE = "3145728"
diff --git a/conf/distro/include/stm32mp1-disco.conf b/conf/distro/include/stm32mp1-disco.conf
deleted file mode 100644
index 582c5f9..0000000
--- a/conf/distro/include/stm32mp1-disco.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-BOOTSCHEME_LABELS += "optee"
-IMAGE_FSTYPES += "wic ext4"
-WKS_FILE = "sdcard-stm32mp-disco.wks.in"
-WKS_FILE_DEPENDS:remove = " st-image-vendorfs "
-
-QBSP_IMAGE_CONTENT += "\
- ${IMAGE_LINK_NAME}.img \
- ${IMAGE_LINK_NAME}.conf \
- "
diff --git a/conf/distro/include/stm32mp1-eval.inc b/conf/distro/include/stm32mp1-eval.inc
new file mode 100644
index 0000000..e3e5505
--- /dev/null
+++ b/conf/distro/include/stm32mp1-eval.inc
@@ -0,0 +1,14 @@
+# =========================================================================
+# WIC for sdcard raw image
+# =========================================================================
+WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
+WKS_FILE_DEPENDS ?= " \
+ virtual/bootloader \
+ virtual/trusted-firmware-a \
+ ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'virtual/optee-os', '', d)} \
+ st-image-bootfs \
+ ${@bb.utils.contains('ST_VENDORFS','1','st-image-vendorfs', '', d)} \
+ st-image-userfs \
+"
+TRUSTED_WIC_FILE = "${@bb.utils.contains('ST_VENDORFS','1','sdcard-stm32mp157c-ev1-trusted-vendorfs-1GB.wks.in','sdcard-stm32mp157c-ev1-trusted-1GB.wks.in',d)}"
+OPTEE_WIC_FILE ?= ""
diff --git a/recipes-qt/meta/meta-b2qt-embedded-qbsp.bbappend b/recipes-qt/meta/meta-b2qt-embedded-qbsp.bbappend
deleted file mode 100644
index 354ddd4..0000000
--- a/recipes-qt/meta/meta-b2qt-embedded-qbsp.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-create_qbsp:prepend:class-target_stm32mp1-eval() {
- bbwarn "QBSP is not supported for ST stm32mp1-eval hardware"
- exit 0
-}
diff --git a/wic/sdcard-stm32mp-disco.wks.in b/wic/sdcard-stm32mp-disco.wks.in
deleted file mode 100644
index 9f52b0f..0000000
--- a/wic/sdcard-stm32mp-disco.wks.in
+++ /dev/null
@@ -1,26 +0,0 @@
-# short-description: Create SD card image with a boot partition
-# long-description: Creates a partitioned SD card image
-#
-# - ----- --------- -------------- -----------------------------------------------------
-# | | TFA | u-boot | teeh | teed | teex | bootfs | rootfs | userfs |
-# - ----- --------- -------------- -----------------------------------------------------
-# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
-# | | | | | | | | | |
-# 0 17kB 529kB 2.5MB 2.8MB 3MB 3.3MB 67.3MiB XXMb 1024MB
-#
-# Warning: the first stage of boot (here fsbl1, fsbl2, ssbl) MUST be on GPT partition to be detected.
-#
-
-part fsbl1 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl1 --part-type 0x8301 --fixed-size 256K --align 17
-part fsbl2 --source gptcopy --sourceparams="file=tf-a-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label fsbl2 --part-type 0x8301 --fixed-size 256K
-part ssbl --source gptcopy --sourceparams="file=u-boot-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label ssbl --part-type 0x8301 --fixed-size 2048K
-
-part teeh --source gptcopy --sourceparams="file=tee-header_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label teeh --part-type 0x8301 --fixed-size 256K
-part teed --source gptcopy --sourceparams="file=tee-pageable_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label teed --part-type 0x8301 --fixed-size 256K
-part teex --source gptcopy --sourceparams="file=tee-pager_v2-stm32mp157c-dk2-optee.stm32" --ondisk mmcblk --label teex --part-type 0x8301 --fixed-size 256K
-
-part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
-part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs
-part usrfs --source rawcopy --sourceparams="file=st-image-userfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label userfs --active --fixed-size 172M
-
-bootloader --ptable gpt
diff --git a/wic/sdcard-stm32mp157c-ev1-trusted-1GB.wks.in b/wic/sdcard-stm32mp157c-ev1-trusted-1GB.wks.in
new file mode 100644
index 0000000..9c68042
--- /dev/null
+++ b/wic/sdcard-stm32mp157c-ev1-trusted-1GB.wks.in
@@ -0,0 +1,28 @@
+# short-description: Create SD card image with a boot partition (1GB)
+# long-description: Creates a partitioned SD card image (1GB)
+#
+# - ----- --------- -------------- -----------------------------------------------------
+# | | TFA | u-boot | teeh | teed | teex | bootfs | vendorfs | rootfs | userfs |
+# - ----- --------- -------------- -----------------------------------------------------
+# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
+# | | | | | | | | | | |
+# 0 17kB 529kB 2.5MB 2.8MB 3MB 3.3MB 67.3MiB 83.3MB 851.3Mb 1024MB
+#
+# Warning: the first stage of boot (here fsbl1, fsbl2, fip) MUST be on GPT partition to be detected.
+#
+
+part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
+part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/u-boot/u-boot-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
+
+## Please uncomment the 3 following lines if you use an OPTEE config
+#part teeh --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teeh --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-header_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+#part teed --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teed --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pageable_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
+#part teex --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teex --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pager_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+
+
+part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
+part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 768M --uuid e91c4e10-16e6-4c0e-bd0e-77becf4a3582
+part usrfs --source rawcopy --sourceparams="file=st-image-userfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label userfs --active --fixed-size 172M
+
+bootloader --ptable gpt \ No newline at end of file
diff --git a/wic/sdcard-stm32mp157c-ev1-trusted-vendorfs-1GB.wks.in b/wic/sdcard-stm32mp157c-ev1-trusted-vendorfs-1GB.wks.in
new file mode 100644
index 0000000..0324d83
--- /dev/null
+++ b/wic/sdcard-stm32mp157c-ev1-trusted-vendorfs-1GB.wks.in
@@ -0,0 +1,28 @@
+# short-description: Create SD card image with a boot partition (1GB)
+# long-description: Creates a partitioned SD card image (1GB)
+#
+# - ----- --------- -------------- -----------------------------------------------------
+# | | TFA | u-boot | teeh | teed | teex | bootfs | vendorfs | rootfs | userfs |
+# - ----- --------- -------------- -----------------------------------------------------
+# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
+# | | | | | | | | | | |
+# 0 17kB 529kB 2.5MB 2.8MB 3MB 3.3MB 67.3MiB 83.3MB 851.3Mb 1024MB
+#
+# Warning: the first stage of boot (here fsbl1, fsbl2, fip) MUST be on GPT partition to be detected.
+#
+
+part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
+part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+part ssbl --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=ssbl --sourceparams="file=${DEPLOY_DIR_IMAGE}/u-boot/u-boot-stm32mp157c-ev1-trusted.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 2048K
+
+## Please uncomment the 3 following lines if you use an OPTEE config
+#part teeh --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teeh --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-header_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+#part teed --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teed --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pageable_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
+#part teex --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=teex --sourceparams="file=${DEPLOY_DIR_IMAGE}/optee/tee-pager_v2-stm32mp157c-ev1-optee.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
+
+part bootfs --source rawcopy --sourceparams="file=st-image-bootfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label bootfs --active --fixed-size 64M
+part vendorfs --source rawcopy --sourceparams="file=st-image-vendorfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label vendorfs --active --fixed-size 16M
+part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 768M --uuid e91c4e10-16e6-4c0e-bd0e-77becf4a3582
+part usrfs --source rawcopy --sourceparams="file=st-image-userfs-${DISTRO}-${MACHINE}.ext4" --ondisk mmcblk --fstype=ext4 --label userfs --active --fixed-size 172M
+
+bootloader --ptable gpt \ No newline at end of file