1

I'm compiling an image for raspberry-pi in yocto.How can i develop the same image to run in qemu.?

I included meta-raspberrypi in poky(sumo branch) along with its dependencies(meta-openembedded).I don't want to take the image,flash in SD-card and run in the hardware every time for simple tweaks.

MACHINE ??= "raspberrypi2"

This is what I have included in local.conf. So how to run my image in qemu to check the changes are applied.What should I include in local.conf to do this.

Mohammed Harris
  • 326
  • 6
  • 25

2 Answers2

2

The answer above was on the right track but chose the wrong machine. In order to run the image built using the meta-raspberrypi package you need to comment out the raspberrypi2 machine and set the machine to qemuarm. The reason is the processor on the raspi2 is a 32bit arm chip either a Broadcom 2836,or 2837 depending on the version of raspi2 you have. If you have a raspi1 B then likely a Broadcom 2835. You can look up the hardware here (raspi-projects) .

In your local.conf file change the lines to match those below .

    #MACHINE ??= "raspberrypi2"
    MACHINE ??= "qemuarm"

Build the image with

    $ bitbake core-image-base
    # or
    $ bitbake rpi-basic-imag # deprecated

Then you will have a qemu image that can be run with

    $ runqemu qemuarm

I have followed there steps myself and created the image I want, and am in the process of developing the system I need for a project. Hope this helps with others to move forward with similar goals.

wordtronix
  • 61
  • 4
1

Try MACHINE = "qemux86-64", then bitbake your image, then use the runqemu script.