使用qemu在x86上模擬arm64環境

2021-10-05 02:56:54 字數 1172 閱讀 2243

最近要驗證**能否相容arm平台,因此需要在本地模擬乙個arm環境,目前虛擬化中,看起來只有qemu能滿足在x86伺服器上虛擬arm環境

qemu編譯

# 基礎依賴安裝

yum install zlib-devel glib2-devel pixman-devel -y

# clone qemu原始碼

git clone

cd qemu

git submodule init

git submodule update --recursive

# 不需要指定target-list,缺省會編譯所有

./configure

make -j 40

make

install

啟動arm系統,需要uefi支援

wget

# 格式化出乙個系統盤

qemu-img create ubuntu16.0.4arm64.img 100g

# 安裝系統

qemu-system-aarch64 -m 8096 -cpu cortex-a57 -smp 2 -m virt -bios qemu_efi.fd -nographic -drive if=none,file=ubuntu-16.04.6-server-armarm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=ubuntu16.0.4arm64.img,id=hd0 -device virtio-blk-device,drive=hd0

# 關閉後重新啟動

qemu-system-aarch64 -m 8096 -cpu cortex-a57 -smp 8 -m virt -bios qemu_efi.fd -nographic -drive if=none,file=ubuntu16.0.4arm64.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,hostfwd=tcp::5555-:22,id=netdev0, -device e1000,netdev=netdev0

遠端ssh

ssh [email protected] -p5555

讓x86的android模擬器能模擬arm架構系統

2019年展月6日更新 1 最近發現了乙個能在linux下模擬arm的模擬器 xdroid,特別好用。直接模擬arm。我的雲盤裡有其可執行程式。這個需要 5g 的根目錄空間,不推薦,太大了,這個是linux上執行,不是模擬器內執行。2 這個也不錯。如何使用 如下是使用方法的描述 3 anbox,也不...

C語言在x86上使用堆疊的方式

堆疊區是同一片空間,但堆向上生長,棧向下生長,中間是空閒區域。esp棧指標暫存器,其內存放著乙個指標,該指標永遠指向系統棧最上面乙個棧幀 當前正在使用的棧幀 的棧頂 邏輯上是棧頂,但物理上是最低的位置。在該堆疊保留區域中該位置以下的所有內容都是空閒的。將值壓入堆疊需要減少棧指標,然後將值寫入棧指標指...

在QE MU上模擬SD Card Rootfs

1.編譯 busybox的 arm版本。2.拷貝必要的動態庫檔案到 install lib下面。rwxr xr x 1 charles charles 93476 oct 7 2011 ld 2.13.so lrwxrwxrwx 1 charles charles 10 apr 25 2012 ld...