cirosantilli2 / issues

Hello! If you have anything to say to me, feel free to open an issue, and I will reply. For gem5 issues, prefer asking on Stack Overflow or the mailing list: https://www.gem5.org/mailing_lists/ or: https://github.com/cirosantilli2/gem5-issues
1 stars 0 forks source link

Build ARM image for Gem5 FS simulation #16

Open Dauto98 opened 3 years ago

Dauto98 commented 3 years ago

Dear cirosantilli2,

I am building a disk image for Gem5 ARM full system simulation. My goal is to build an image similar to the x86 image, where I can ./m5term localhost 3456 and do whatever I want inside the virtual machine.

However, packer always yields errors. My json file is the same as this, except the qemu is qemu-system-aarch64 and ubuntu server arm64. It and other related files are taken from this tutorial. I also tried packer-builder-arm but it yielded another error related to qemu.

I turned to using qemu directly, but this command line

qemu-system-aarch64 
    -drive file=boot-exit-image/boot-exit.img,format=raw 
    -cdrom packer_cache/d60fab3d2cbda6b0379a55b2ab92292fe6342d41.iso 
    -m 1024 
    -machine virt 
    -cpu cortex-a15 
    -boot d

only a qemu monitor window popup and nothing else happen. I don't know what to do next.

What is the right way to run and build aarch64 image for Gem5?

cirosantilli2 commented 3 years ago

Hi Duc,

I'm not familiar with the Packer setup. It should work in theory, but would need debugging.

What I have been using instead is Buildroot as shown at: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/6efe2fb4e1a9f9f06032560d57011829797c8478#gem5-buildroot-setup-getting-started

Buildroot also builds an image like Packer, but it does everything with cross compilation, without the need for QEMU, which is much neater.

That one I can guarantee it works on Ubuntu host, I've used it countless times, and if you find a problem, I'll likely be able to help out, do open an issue in the repo if it fails.