You are not logged in.

#1 2022-05-05 12:16:53

broken pipe
Member
Registered: 2010-12-10
Posts: 233

Emulating a Raspberry Pi 4 on Arch

Hi all,

i have already started Raspbian under Arch Linux as a virtual machine and emulated an older Raspberry Pi. Is there a possibility to emulate a newer version as well and also allocate more CPUs and memory?

My command:

virt-install --import --name raspios --arch armv6l --machine versatilepb --cpu arm1176 --vcpus 2 --memory 512 --disk raspios.qcow2,format=qcow2,bus=virtio --network bridge=br0,model=virtio --graphics vnc,listen=0.0.0.0 --noautoconsole --boot 'dtb=qemu-rpi-kernel/versatile-pb-buster.dtb,kernel=qemu-rpi-kernel/kernel-qemu-5.10.63-bullseye,kernel_args=root=/dev/vda2 panic=1' --events on_reboot=destroy --os-varian=debian10

Offline

#2 2022-05-05 12:39:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,701
Website

Re: Emulating a Raspberry Pi 4 on Arch

Is there a possibility to increase the number of cpus amount of memory allotted to the vm ... yes, of course.  Am I missing something, what's really the question here?

Have you just copied and pasted the current command from somewhere without even looking at it?  There are flags specifying exactly what you are asking about: change the values that your command specifies for these flags.

Last edited by Trilby (2022-05-05 12:41:32)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-05-05 12:51:02

broken pipe
Member
Registered: 2010-12-10
Posts: 233

Re: Emulating a Raspberry Pi 4 on Arch

Trilby wrote:

Is there a possibility to increase the number of cpus amount of memory allotted to the vm ... yes, of course.  Am I missing something, what's really the question here?

Have you just copied and pasted the current command from somewhere without even looking at it?  There are flags specifying exactly what you are asking about: change the values that your command specifies for these flags.


Unfortunately you can not increase the cpus and memory because the machine configuration versatilepb does not allow it

Offline

#4 2022-05-05 13:10:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 26,701
Website

Re: Emulating a Raspberry Pi 4 on Arch

Ah, thanks.  So your question is really on which "machine" board emulation can be used?  Wouldn't that depend on how accurate of an emulation you require?  For previous versions of RPi there are specific machines like 'raspi3b' but you were instead using versatilepb - so which hardware features are most important / relevant for your use?

Using 'virt' should "work" to run a kernel / image for the RPi4, but whether it will meet your needs depends on what your requirements actually are.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB