How to add new types of QEMU machines without changing the source code of the main line?

Is it possible to add a new machine type for qemu-system-arm -M <MachineType> without having to recompile qemu or write code? Are there any documents for this? I would like to be able to emulate raspberry pi and pandaboard using qemu.

I know that meego fork qemu supports pandaboard, but I'm trying to stick to the main qemu thread, which I can handle from the apt-get package manager. qemu main thread now supports beagleboard rev C and beagleboard xm, which were previously only supported in meego fork.

+4
source share
2 answers

without having to recompile qemu or write code?

No. There must be some code that emulates a specific device, for example, for example, a way to implement the video output of a Raspberry Pi or Pandaboard. This does not apply to multiple configuration files.

+2
source

I was able to emulate Pi with -M versatilepb : https://raspberrypi.stackexchange.com/questions/165/emulation-on-a-linux-pc/53991#53991 and -M raspi2 was added later in QEMU 2.6.

Perhaps this opportunity has been implemented, see my experience of adding a new device to the platform: How to add a new device to the QEMU source code?

There I needed to add only one line to attach a new device to versatilepb :

 sysbus_create_simple("lkmc_platform_device", 0x101e9000, pic[18]); 

maybe we can have a configuration file containing lines like:

 type name regid irq sysbus lkmc_platform_device 0x101e9000 18 

Related: external devices: How to create external QEMU devices?

0
source

Source: https://habr.com/ru/post/1440665/


All Articles