public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>, isar-users@googlegroups.com
Subject: Re: [RFC: PATCH: needs rebase] ci: run qemuarm64 test booting with efi
Date: Wed, 12 Jan 2022 15:36:26 +0300	[thread overview]
Message-ID: <a2b61ede-9a44-c2e4-5b1d-8d7cf84e3456@ilbers.de> (raw)
In-Reply-To: <20220105211143.02d33688@md1za8fc.ad001.siemens.net>

[-- Attachment #1: Type: text/plain, Size: 3438 bytes --]

05.01.2022 23:11, Henning Schild wrote:
> This is something that used to work well. It has value because it shows
> how to use UEFI booting on aarch64.
>
> I held this back because of the avocado switch and now i have a really
> hard time to apply it again.
>
> Maybe that whole story of fetching stuff with curl and storing it
> somewhere is wrong, and in avocado is would probably have to look a bit
> different.
>
> But if you guys agree that there is value, maybe we can work on that
> together to make it avocado-ready and write the curl bits in python.
>
> regards,
> Henning
>
> Am Wed, 5 Jan 2022 21:08:01 +0100
> schrieb Henning Schild <henning.schild@siemens.com>:
>
>> Signed-off-by: Henning Schild <henning.schild@siemens.com>
>> ---
>>   meta-isar/conf/machine/qemuarm64.conf |  9 ++++-----
>>   scripts/vm_smoke_test                 | 17 +++++++++++++++++
>>   2 files changed, 21 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta-isar/conf/machine/qemuarm64.conf
>> b/meta-isar/conf/machine/qemuarm64.conf index
>> e5e762fff614..bec5a98cf43e 100644 ---
>> a/meta-isar/conf/machine/qemuarm64.conf +++
>> b/meta-isar/conf/machine/qemuarm64.conf @@ -6,15 +6,14 @@ DISTRO_ARCH
>> ?= "arm64" KERNEL_NAME ?= "arm64"
>>   KERNEL_NAME_ubuntu-focal ?= "generic"
>>   
>> -IMAGE_TYPE ?= "ext4-img"
>> -
>> -QEMU_ROOTFS_DEV ?= "vda"
>> +IMAGE_TYPE ?= "wic-img"
>> +WKS_FILE ?= "sdimage-efi"
>> +IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}"
>>   
>>   QEMU_ARCH ?= "aarch64"
>>   QEMU_MACHINE ?= "virt"
>>   QEMU_CPU ?= "cortex-a57"
>> -# TODO: start_vm doesn't support multiline vars
>> -QEMU_DISK_ARGS ?= "-drive
>> file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device
>> virtio-blk-device,drive=hd0" +QEMU_DISK_ARGS ?= "-drive
>> file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device
>> virtio-blk-device,drive=hd0 -pflash ~/.cache/isar-tests/QEMU_EFI.img"
>> MACHINE_SERIAL ?= "ttyAMA0" BAUDRATE_TTY ?= "115200" diff --git
>> a/scripts/vm_smoke_test b/scripts/vm_smoke_test index
>> ce082137fe9b..b0390ee497d1 100755 --- a/scripts/vm_smoke_test
>> +++ b/scripts/vm_smoke_test
>> @@ -15,6 +15,22 @@ ES_BUG=3
>>   
>>   RET=$ES_OK
>>   
>> +get_arm64_qemu_efi() {
>> +
>> SHA256SUM="07b45bba7eb60eaeb79d798f6648bd262cdc6ad39d8f48f73a5f9c8f4885377c"
>> +    mkdir -p ~/.cache/isar-tests/
>> +    cd ~/.cache/isar-tests/
>> +    echo "$SHA256SUM QEMU_EFI.img" > QEMU_EFI.img.sha256
>> +    if ! sha256sum -c QEMU_EFI.img.sha256 > /dev/null 2>&1; then
>> +        # cache miss or update
>> +	curl
>> http://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.img.gz
>> -L | zcat > QEMU_EFI.img
>> +	if ! sha256sum -c QEMU_EFI.img.sha256 > /dev/null 2>&1; then
>> +		echo "FAIL: could not fetch QEMU_EFI.img"
>> +		# no need to set RET or FAIL, qemu will get unhappy
>> +	fi
>> +    fi
>> +    cd -
>> +}
>> +
>>   dump_boot_log() {
>>       echo "Boot log:\n8<--"
>>       cat $CONSOLE_OUTPUT
>> @@ -163,6 +179,7 @@ if [ -z "$FAST_BUILD" ]; then
>>   fi
>>   
>>   # ARM64 machine
>> +get_arm64_qemu_efi
>>   run_test arm64 stretch
>>   
>>   exit $RET

Maybe it's better to use avocado.utils.download.get_file API for the 
download?
It's already has caching and hash checking and can retry on network fails.

Or maybe we even build it inside Isar?

I also propose not to place any files inside user's home but use build 
folder instead.
It can be more preferred for keeping build system clean.


[-- Attachment #2: Type: text/html, Size: 4304 bytes --]

      reply	other threads:[~2022-01-12 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 20:08 Henning Schild
2022-01-05 20:11 ` Henning Schild
2022-01-12 12:36   ` Anton Mikanovich [this message]

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=a2b61ede-9a44-c2e4-5b1d-8d7cf84e3456@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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