Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

The answer is a bit late, but it may be useful to someone else, because this page is the first in google for "armbian qemu".

Running image for orange-pi one - Armbian_5.90_Orangepione_Ubuntu_bionic_next_4.19.57.7z:

Extrart Armbian image:
7z e Armbian_5.90_Orangepione_Ubuntu_bionic_next_4.19.57.7z Armbian_5.90_Orangepione_Ubuntu_bionic_next_4.19.57.img

Extract kernel, initrd and dtb:
7z e boot/vmlinuz-4.19.57-sunxi boot/initrd.img-4.19.57-sunxi boot/dtb-4.19.57-sunxi/sun4i-a10-cubieboard.dtb

Run qemu:
qemu-system-arm \
  -M cubieboard -m 1024 -cpu cortex-a8 -dtb sun4i-a10-cubieboard.dtb \
  -kernel vmlinuz-4.19.57-sunxi -initrd initrd.img-4.19.57-sunxi \
  -append 'earlyprintk loglevel=8 earlycon=uart8250,mmio32,0x1c28000,115200n8 console=ttyS0 root=/dev/sda1' \
  -nographic -serial stdio -monitor none \
  -drive file=Armbian_5.90_Orangepione_Ubuntu_bionic_next_4.19.57.img,format=raw,if=none,id=d1 \
  -device ide-hd,drive=d1 \
  -nic user,model=allwinner-emac,hostfwd=tcp::50022-:22

 

It was tested in qemu 3.1

Link to post
Share on other sites

This answer is even later... 

 

There’s another way to do this, in Linux at least.

Install qemu-user-static and (if not automatically installed) binfmt. Then copy the Armbian rootfs of the Orange Pi model you want to use to a directory on your PC, e.g. opi-rootfs.

You can now chroot into this directory and it will behave (almost) the same as if you’re on a real Orange Pi <Model>

The proper command is ‘sudo chroot opi-rootfs /bin/bash’

You can also mount /dev, /sys, /proc to the same directories in opi-rootfs but for compiling stuff this is not really necessary I think.

Instead of chroot you can also do ‘systemd-nspawn -D opi-rootfs’

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...