contributed by < Dung-Ru Tsai >
1. Build and Install QEMU
2. Bridge host network with TAP interface
3. Create Disk image
4. Install Ubuntu ISO
QEMU Parameter help
qemu-system-x86_64 -accel ?
qemu-system-x86_64 -netdev ?
127.0.0.1:5900
5. Running the system
Another example
6. Redirect GRUB output to serial console (optional)
/etc/default/grub
, redirect serial message to ttyS07. Connect with ssh
https://www.linuxtechi.com/extend-lvm-partitions/
https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
< obsoleted >
--enable-virtfs
: 使得 VirtIO + 9P 可以運作,
--target-list
: 只產生可以運行 aarch64 架構的 qemu
耐心等待一段時間之後,在 aarch64-softmmu
目錄下可以找到
qemu-system-aarch64
Buildroot Guide
注意最後兩行 -fsdev
and -device
, 是為了掛載 host 的目錄才有的
--enable-virtfs
: 使得 VirtIO + 9P 可以運作,
--target-list
: 只產生可以運行 aarch64 架構的 qemu
耐心等待一段時間之後,在 aarch64-softmmu
目錄下可以找到
qemu-system-aarch64
儲存之後,進行 make。若無異常,可以在 output/images 目錄底下找到 rootfs.cpio
Kernel Source code
Edit the .config for 9P
一切就緒就開始編譯核心
The image path will show at arch/arm64/boot/Image
or linux/vmlinux
-kernel
: 指定第二步驟編譯好的 image path-fsdev, path
: 指定共享目錄的路徑
/home/jake/Workspace/
mount_tag=host_mount
是到時候在 guest 裡面 mount 時會用到.透過 VirtIO + 9P 使得 guest 與 host 共享目錄:
mount -t 9p -o trans=virtio host_mount /mnt
[PASS]
--enable-virtfs
: Enable the virtual file IO system
Check the basic build guide incat README
Check the qemu startup guide
cat board/qemu/x86_64/readme.txt
--enable-virtfs
: Enable the virtual file IO system
cpio the root filesystem (for use as an initial RAM filesystem)
儲存之後,進行 make。若無異常,可以在 output/images 目錄底下找到 rootfs.cpio
Reduce debugging information
option offMODULE_FORCE_UNLOAD
The final image will show in arch/x86/boot/bzImage
.
Try the KGDB
-kernel
: 指定第二步驟編譯好的 image path-fsdev, path
: 指定共享目錄的路徑
/home/dutsai/Workspace_vm
mount_tag=host_mount
在 guest 裡面 mount 時會用.-serial mon:stdio
Send Ctrl+C to guest
Ctrl+a X
to exit qemu.https://wiki.qemu.org/Documentation/9psetup
Try to open another terminal to run gdb.
RISC-V Embedded Linux - Get started with Buildroot/Yocto
Kernel Source code
vim /etc/default/grub
.config
file
sudo apt-get install libssl-dev
.config
file in Linux-4.4.60After install the kernel
initrd.img-4.4.60-rt73
,vmlinuz-4.4.60-rt73
, andconfig-4.4.60-rt73
exist. They should have been created in the previous step.1. Go to see the menuentry in
search your menuentry version and copy it.
CPU Isolation
1st Start
https://github.com/lima-vm/lima
linux-image-5.4.0-109-generic_5.4.0-109.123_arm64.deb
https://hackmd.io/@sysprog/user-mode-linux-env