QEMU: emulasi android: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
Created page with " Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to b..."
 
Onnowpurbo (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.
Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.


  $ dd if=/dev/zero of=flash0.img bs=1M count=64
  dd if=/dev/zero of=flash0.img bs=1M count=64
  $ dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
  dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
  $ dd if=/dev/zero of=flash1.img bs=1M count=64
  dd if=/dev/zero of=flash1.img bs=1M count=64


For emulated VMs (e.g. x86 host)
For emulated VMs (e.g. x86 host)
  $ sudo qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -pflash flash0.img -pflash flash1.img -drive if=none,file=vivid-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac
 
sudo qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -pflash flash0.img -pflash flash1.img -drive if=none,file=vivid-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac
 
 
Format RAW untuk flash0.img & flash1.img
 
sudo qemu-system-arm -m 1024 -cpu cortex-a57 -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0
 
Parameter -cpu max, kalau cortx-a57 tidak ada
 
sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0
 
Parameter format=raw, di input file IMG
 
sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=Aosp-Bullhead-v6.7.img,id=hd0,format=raw -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0
 
Random MAC di ganti dengan static MAC
 
sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=Aosp-Bullhead-v6.7.img,id=hd0,format=raw -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=02:ca:ff:ee:ba:be -netdev type=tap,id=net0
 
 
 
==Pranala Menarik==
 
* [[QEMU]]

Latest revision as of 03:23, 15 September 2020


Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.

dd if=/dev/zero of=flash0.img bs=1M count=64
dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
dd if=/dev/zero of=flash1.img bs=1M count=64

For emulated VMs (e.g. x86 host)

sudo qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -pflash flash0.img -pflash flash1.img -drive if=none,file=vivid-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=$randmac


Format RAW untuk flash0.img & flash1.img

sudo qemu-system-arm -m 1024 -cpu cortex-a57 -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0

Parameter -cpu max, kalau cortx-a57 tidak ada

sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0

Parameter format=raw, di input file IMG

sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=Aosp-Bullhead-v6.7.img,id=hd0,format=raw -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=$randmac -netdev type=tap,id=net0

Random MAC di ganti dengan static MAC

sudo qemu-system-arm -m 1024 -cpu max -M virt -nographic -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -drive if=none,file=Aosp-Bullhead-v6.7.img,id=hd0,format=raw -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0,mac=02:ca:ff:ee:ba:be -netdev type=tap,id=net0


Pranala Menarik