Skip to contentSkip to conversation

yocto - linaro's lava integration

DISCUSSION alfonso 2 participants 3 messages Oct 10, 2016 – Oct 13, 2016

lore
Share & tools
lore

alfonso

author
#0 lore raw

Hello everyone,

I'm trying to integrate the testing of the resulting yocto images using Linaro's LAVA project.

For now I am only using qemux86 images.

Now, I am quite a newbie in both projects and maybe in general on the subject of images so I might be asking the wrong questions.

So far, to test a qemu image using LAVA it is required a .img file. That would be the simplest configuration. On the other hand, my yocto project produces a .bin kernel file + .ext4 filesystem file. I don't seem to find a proper configuration in LAVA for .bin + .ext4 file testing. I presume there is a way to configure yocto to produce a .img file out of these two guys but I don't seem to find how.

Would anyone have a recommendation?

Thanks in advance for your help :)

Best,
Alfonso

#1 lore raw
Quoted 10 lines · EDT alfonso

Hello everyone,

I'm trying to integrate the testing of the resulting yocto images using Linaro's LAVA project.

For now I am only using qemux86 images.

Now, I am quite a newbie in both projects and maybe in general on the subject of images so I might be asking the wrong questions.

Quoted 8 lines

So far, to test a qemu image using LAVA it is required a .img file. That would be the simplest configuration. On the other hand, my yocto project produces a .bin kernel file + .ext4 filesystem file. I don't seem to find a proper configuration in LAVA for .bin + .ext4 file testing. I presume there is a way to configure yocto to produce a .img file out of these two guys but I don't seem to find how.

Would anyone have a recommendation?

We have been using LAVA to test our Yocto based product for about 1 1/2years now using the produced .ext[34] and bzImage produced from a typical Yocto build. We have been using LAVA 1 however and I am only now starting to move to the latest LAVA 2. We have also been using hardware targets and not qemu but that is overall inconsequential.

Since our move to LAVA 2 is in progress I can't currently give you a step by step guide to accomplishing this. Let me look quickly today to see if the existing definition of the qemu device type will allow for specifying a disk image and kernel. If not then it either needs to be added or a new device type created with allows it. On the bright side the LAVA folks have done a good job about the layout of their code so jumping in to do this may seem to be a big hurdle but once you jump in you will find most things where you would expect them to be.

Alternatively you could use either a chroot or VM to update the .ext4 image with a kernel and grub.

Anyways, sorry for sparse information. Again if you give me some time I can provide you with more details. But definitely go ahead and dig in, you will find that what you want to do is possible.

Mark Asselstine

Quoted 5 lines

Thanks in advance for your help :)

Best,
Alfonso

author
#2 lore raw

Hi Mark,

thanks a lot for replying to my message. On the last few days I managed to find the missing key of the puzzle on some lava slides on the internet. In fact you can boot and test an image having the kernel and fs separately.

here is the job description:

device_type: qemu
job_name: qemu-x86-test

timeouts:
job:
minutes: 6
action:
minutes: 2
priority: medium
visibility: public

context:
arch: i386

actions:
- deploy:
timeout:
minutes: 3
to: tmpfs
images:
kernel:
image_arg: -kernel {kernel} -append "console=ttyS0
root=/dev/vda rw"
url: file:///opt/image/kernel.bin
rootfs:
image_arg: -drive format=raw,file={rootfs},if=virtio
url: file:///opt/image/fs.ext4
os: debian
root_partition: 1

- boot:
method: qemu
timeout:
minutes: 2
media: tmpfs
prompts:
- "root@debian:"
auto_login:
login_prompt: "login:"
username: root

it is as you say, quite intuitive but i had some trouble finding the proper description of this job definition. Now I am focus on how to set up the integration process, how to submit the job after the building process have been triggered in the git repo and so on.

Its actually easy once you find the pieces of information that you need.

Thanks again and let's see how it goes :P

Best,

Alfonso

Quoted 53 lines · Mark Asselstine
Quoted 10 lines · EDT alfonso

Hello everyone,

I'm trying to integrate the testing of the resulting yocto images using Linaro's LAVA project.

For now I am only using qemux86 images.

Now, I am quite a newbie in both projects and maybe in general on the subject of images so I might be asking the wrong questions.

Quoted 8 lines

So far, to test a qemu image using LAVA it is required a .img file. That would be the simplest configuration. On the other hand, my yocto project produces a .bin kernel file + .ext4 filesystem file. I don't seem to find a proper configuration in LAVA for .bin + .ext4 file testing. I presume there is a way to configure yocto to produce a .img file out of these two guys but I don't seem to find how.

Would anyone have a recommendation?

We have been using LAVA to test our Yocto based product for about 1 1/2years now using the produced .ext[34] and bzImage produced from a typical Yocto build. We have been using LAVA 1 however and I am only now starting to move to the latest LAVA 2. We have also been using hardware targets and not qemu but that is overall inconsequential.

Since our move to LAVA 2 is in progress I can't currently give you a step by step guide to accomplishing this. Let me look quickly today to see if the existing definition of the qemu device type will allow for specifying a disk image and kernel. If not then it either needs to be added or a new device type created with allows it. On the bright side the LAVA folks have done a good job about the layout of their code so jumping in to do this may seem to be a big hurdle but once you jump in you will find most things where you would expect them to be.

Alternatively you could use either a chroot or VM to update the .ext4 image with a kernel and grub.

Anyways, sorry for sparse information. Again if you give me some time I can provide you with more details. But definitely go ahead and dig in, you will find that what you want to do is possible.

Mark Asselstine

Quoted 4 lines

Thanks in advance for your help :)

Best,
Alfonso