From: bence.balogh@arm.com
To: meta-arm@lists.yoctoproject.org
Cc: Bence Balogh <bence.balogh@arm.com>
Subject: [PATCH 1/3] arm-bsp/corstone1000-flash-firmware-image: add nopt generation
Date: Tue, 16 Apr 2024 18:14:44 +0200 [thread overview]
Message-ID: <20240416161446.217376-2-bence.balogh@arm.com> (raw)
In-Reply-To: <20240416161446.217376-1-bence.balogh@arm.com>
From: Bence Balogh <bence.balogh@arm.com>
The .nopt image is used during the UEFI Update Capsule generation.
This .nopt image was generated manually when it was needed.
Signed-off-by: Bence Balogh <bence.balogh@arm.com>
---
.../images/corstone1000-flash-firmware-image.bb | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
index 73fc1766..5238d1d3 100644
--- a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
+++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
@@ -38,6 +38,11 @@ RE_LAYOUT_WRAPPER_VERSION = "0.0.7"
TFM_SIGN_PRIVATE_KEY = "${libdir}/tfm-scripts/root-RSA-3072_1.pem"
RE_IMAGE_OFFSET = "0x1000"
+# Offsets for the .nopt image generation
+TFM_OFFSET = "102400"
+FIP_OFFSET = "479232"
+KERNEL_OFFSET = "2576384"
+
do_sign_images() {
# Sign TF-A BL2
sign_host_image ${RECIPE_SYSROOT}/firmware/${TFA_BL2_BINARY} \
@@ -56,3 +61,15 @@ do_sign_images() {
do_sign_images[depends] = "\
fiptool-native:do_populate_sysroot \
"
+
+# This .nopt image is not the same as the one which is generated by meta-arm/meta-arm/classes/wic_nopt.bbclass.
+# The meta-arm/meta-arm/classes/wic_nopt.bbclass removes the partition table from the wic image, but keeps the
+# second bank. This function creates a no-partition image with only the first bank.
+create_nopt_image() {
+ dd conv=notrunc bs=1 if=${DEPLOY_DIR_IMAGE}/bl2_signed.bin of=${B}/${MACHINE}_image.nopt
+ dd conv=notrunc bs=1 if=${DEPLOY_DIR_IMAGE}/tfm_s_signed.bin of=${B}/${MACHINE}_image.nopt seek=${TFM_OFFSET}
+ dd conv=notrunc bs=1 if=${DEPLOY_DIR_IMAGE}/signed_fip-corstone1000.bin of=${B}/${MACHINE}_image.nopt seek=${FIP_OFFSET}
+ dd conv=notrunc bs=1 if=${DEPLOY_DIR_IMAGE}/Image.gz-initramfs-${MACHINE}.bin of=${B}/${MACHINE}_image.nopt seek=${KERNEL_OFFSET}
+}
+create_nopt_image[depends] += "mc:firmware:linux-yocto:do_deploy"
+do_image_uefi_capsule[prefuncs] += "create_nopt_image"
--
2.25.1
next prev parent reply other threads:[~2024-04-16 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 16:14 [PATCH 0/3] Use U-Boot tools for capsule generation bence.balogh
2024-04-16 16:14 ` bence.balogh [this message]
2024-04-16 16:14 ` [PATCH 2/3] arm/uefi_capsule: use U-Boot " bence.balogh
2024-04-16 16:14 ` [PATCH 3/3] arm-bsp/documentation: corstone1000: update capsule generation steps bence.balogh
2024-04-20 22:43 ` [PATCH 0/3] Use U-Boot tools for capsule generation Jon Mason
2024-04-23 18:17 ` Jon Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240416161446.217376-2-bence.balogh@arm.com \
--to=bence.balogh@arm.com \
--cc=meta-arm@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).