diff mbox series

[isar-cip-core,2/3] deploy-cip-core.sh: Workaround to search for swupdate initrd image name

Message ID 20230830044115.1112349-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State Superseded
Headers show
Series Enabling additional features in security image | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com Aug. 30, 2023, 4:41 a.m. UTC
From: Sai <Sai.Sathujoda@toshiba-tsip.com>

Since the security image is now included with swupdate feature, deployment
of initrd image will fail in CI due to name mismatch. So this workaround
will search for initrd image name as defined in read-only-rootfs.bbclass

Signed-off-by: Sai <Sai.Sathujoda@toshiba-tsip.com>
---
 scripts/deploy-cip-core.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Jan Kiszka Aug. 30, 2023, 6:39 a.m. UTC | #1
On 30.08.23 06:41, Sai.Sathujoda@toshiba-tsip.com wrote:
> From: Sai <Sai.Sathujoda@toshiba-tsip.com>
> 
> Since the security image is now included with swupdate feature, deployment
> of initrd image will fail in CI due to name mismatch. So this workaround
> will search for initrd image name as defined in read-only-rootfs.bbclass

Let's not do this as workaround: Some images, now the security image as
well, are not delivered in broken-up form but only as complete disk
images. There is no point in deploying anything else than that for them,
not even the kernel.

So, let's pass a switch to deploy-cip-core.sh if extra artifacts should
be uploaded as well and disable that for the security images.

Jan

> 
> Signed-off-by: Sai <Sai.Sathujoda@toshiba-tsip.com>
> ---
>  scripts/deploy-cip-core.sh | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
> index eaa8974..868e28e 100755
> --- a/scripts/deploy-cip-core.sh
> +++ b/scripts/deploy-cip-core.sh
> @@ -46,9 +46,16 @@ KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
>  if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
>  	KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
>  fi
> +
> +INITRD_IMAGE="${BASE_PATH}-initrd.img"
> +# swupdate image initrd search workaround
> +if [ -f "build/tmp/deployimages/$TARGET/cip-core-initramfs-cip-core-$RELEASE-$TARGET.initrd.img" ]; then
> +	INITRD_IMAGE=build/tmp/deploy/images/$TARGET/cip-core-initramfs-cip-core-$RELEASE-$TARGET.initrd.img
> +fi
> +
>  # shellcheck disable=SC2086
>  aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
> -aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
> +aws s3 cp --no-progress --acl public-read "${INITRD_IMAGE}" "${S3_TARGET}"
>  
>  if [ "$DTB" != "none" ]; then
>  	aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
diff mbox series

Patch

diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
index eaa8974..868e28e 100755
--- a/scripts/deploy-cip-core.sh
+++ b/scripts/deploy-cip-core.sh
@@ -46,9 +46,16 @@  KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
 if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
 	KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
 fi
+
+INITRD_IMAGE="${BASE_PATH}-initrd.img"
+# swupdate image initrd search workaround
+if [ -f "build/tmp/deployimages/$TARGET/cip-core-initramfs-cip-core-$RELEASE-$TARGET.initrd.img" ]; then
+	INITRD_IMAGE=build/tmp/deploy/images/$TARGET/cip-core-initramfs-cip-core-$RELEASE-$TARGET.initrd.img
+fi
+
 # shellcheck disable=SC2086
 aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
-aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
+aws s3 cp --no-progress --acl public-read "${INITRD_IMAGE}" "${S3_TARGET}"
 
 if [ "$DTB" != "none" ]; then
 	aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"