Message ID | 20240214122809.3541505-2-Sai.Sathujoda@toshiba-tsip.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Upload .swu file and firmware for LAVA testing | expand |
On 14.02.24 13:28, Sai.Sathujoda@toshiba-tsip.com wrote: > From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com> > > Currently software update testing is enabled for QEMU security targets, > so if "USE_SWU" switch is enabled then only the .swu file is uploaded > ignoring the v2 .wic image. U-boot binaries for qemu-arm64 and qemu-arm > targets are also uploaded for usage in LAVA job definitions. > > Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com> > --- > scripts/deploy-cip-core.sh | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh > index 7f6cbe9..17d4ed0 100755 > --- a/scripts/deploy-cip-core.sh > +++ b/scripts/deploy-cip-core.sh > @@ -15,6 +15,7 @@ TARGET=$2 > EXTENSION=$3 > DTB=$4 > REF=$5 > +USE_SWU=$6 > > BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET > if [ "${EXTENSION}" != "none" ]; then > @@ -33,7 +34,16 @@ if [ -f "${BASE_PATH}.wic" ]; then > xz -9 -k -T0 "${BASE_PATH}.wic" > > echo "Uploading artifacts..." > - aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" > + # Condition check to avoid deploying v2 base image and prefer only it's .swu artifact > + if [ "$USE_SWU" = "enable" ]; then > + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}" > + else > + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" > + fi So, there is no case where we want both base image and SWU? What about testing version rollbacks (or their prevention)? > + # Upload firmware for arm64 & armhf security targets required to boot security image in LAVA environment riscv64 should be added to this already, even if the build is currently broken again. Feature-wise, it is on eye-level with the other archs. > + if [ "$EXTENSION" = "security" ] && { [ "$TARGET" = "qemu-arm64" ] || [ "$TARGET" = "qemu-arm" ]; } then How about uploading firmware.bin if it exists? Then we would not even have to maintain this long list (+riscv). > + aws s3 cp --no-progress --acl public-read "build/tmp/deploy/images/$TARGET/firmware.bin" "${S3_TARGET}" > + fi > else > if [ -f "${BASE_PATH}.tar.gz" ]; then > echo "Uploading artifacts..." Jan
Hi Jan, Thanks for your comments. Currently we are using wic of v1 and .swu of v2. We are maintaining using use_swu variable. When it comes to version rollback scenarios, we are doing it directly in the test job instead of depending on a .swu file which shall introduce a service file causing kernel panic during reboot. Thanks and Regards, Sai Ashrith -----Original Message----- From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On Behalf Of Jan Kiszka via lists.cip-project.org Sent: Wednesday, February 14, 2024 6:06 PM To: ashrith sai(TSIP) <Sai.Sathujoda@toshiba-tsip.com>; cip-dev@lists.cip-project.org Cc: dinesh kumar(TSIP TMIEC ODG Porting) <dinesh.kumar@toshiba-tsip.com>; hayashi kazuhiro(林 和宏 DME ○DIG□MPS○MP4) <kazuhiro3.hayashi@toshiba.co.jp>; Quirin Gylstorff <quirin.gylstorff@siemens.com> Subject: Re: [cip-dev] [isar-cip-core 1/2] deploy-cip-core.sh: Upload only .swu file for v2 QEMU security targets On 14.02.24 13:28, Sai.Sathujoda@toshiba-tsip.com wrote: > From: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com> > > Currently software update testing is enabled for QEMU security > targets, so if "USE_SWU" switch is enabled then only the .swu file is > uploaded ignoring the v2 .wic image. U-boot binaries for qemu-arm64 > and qemu-arm targets are also uploaded for usage in LAVA job definitions. > > Signed-off-by: Sai Sathujoda <Sai.Sathujoda@toshiba-tsip.com> > --- > scripts/deploy-cip-core.sh | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh > index 7f6cbe9..17d4ed0 100755 > --- a/scripts/deploy-cip-core.sh > +++ b/scripts/deploy-cip-core.sh > @@ -15,6 +15,7 @@ TARGET=$2 > EXTENSION=$3 > DTB=$4 > REF=$5 > +USE_SWU=$6 > > BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET > if [ "${EXTENSION}" != "none" ]; then @@ -33,7 +34,16 @@ if [ -f > "${BASE_PATH}.wic" ]; then > xz -9 -k -T0 "${BASE_PATH}.wic" > > echo "Uploading artifacts..." > - aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" > + # Condition check to avoid deploying v2 base image and prefer only it's .swu artifact > + if [ "$USE_SWU" = "enable" ]; then > + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}" > + else > + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" > + fi So, there is no case where we want both base image and SWU? What about testing version rollbacks (or their prevention)? > + # Upload firmware for arm64 & armhf security targets required to > +boot security image in LAVA environment riscv64 should be added to this already, even if the build is currently broken again. Feature-wise, it is on eye-level with the other archs. > + if [ "$EXTENSION" = "security" ] && { [ "$TARGET" = "qemu-arm64" ] > +|| [ "$TARGET" = "qemu-arm" ]; } then How about uploading firmware.bin if it exists? Then we would not even have to maintain this long list (+riscv). > + aws s3 cp --no-progress --acl public-read "build/tmp/deploy/images/$TARGET/firmware.bin" "${S3_TARGET}" > + fi > else > if [ -f "${BASE_PATH}.tar.gz" ]; then > echo "Uploading artifacts..." Jan -- Siemens AG, Technology Linux Expert Center
diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh index 7f6cbe9..17d4ed0 100755 --- a/scripts/deploy-cip-core.sh +++ b/scripts/deploy-cip-core.sh @@ -15,6 +15,7 @@ TARGET=$2 EXTENSION=$3 DTB=$4 REF=$5 +USE_SWU=$6 BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET if [ "${EXTENSION}" != "none" ]; then @@ -33,7 +34,16 @@ if [ -f "${BASE_PATH}.wic" ]; then xz -9 -k -T0 "${BASE_PATH}.wic" echo "Uploading artifacts..." - aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" + # Condition check to avoid deploying v2 base image and prefer only it's .swu artifact + if [ "$USE_SWU" = "enable" ]; then + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.swu" "${S3_TARGET}" + else + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" + fi + # Upload firmware for arm64 & armhf security targets required to boot security image in LAVA environment + if [ "$EXTENSION" = "security" ] && { [ "$TARGET" = "qemu-arm64" ] || [ "$TARGET" = "qemu-arm" ]; } then + aws s3 cp --no-progress --acl public-read "build/tmp/deploy/images/$TARGET/firmware.bin" "${S3_TARGET}" + fi else if [ -f "${BASE_PATH}.tar.gz" ]; then echo "Uploading artifacts..."