Reputation: 396
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.
Upvotes: 3
Views: 4297
Reputation: 71
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.
Upvotes: 3
Reputation: 643
Try MACHINE = "qemux86-64", then bitbake your image, then use the runqemu script.
Upvotes: 0