Hey guys, I am trying to create an Ubuntu ARM disk image for aarch64 architecture. However, when I run gem5 with kvm enabled, it always complains for "end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance".
I created the disk image using qemu: qemu-system-aarch64 \ -cpu host \ -device virtio-scsi-device \ -device scsi-cd,drive=cdrom \ -device virtio-blk-device,drive=hd0 \ -drive "file=ubuntu-16.04.5-server-arm64.iso,id=cdrom,if=none,media=cdrom" \ -drive "if=none,format=qcow2,file=ubuntu-16.04.5-server-arm64.img,id=hd0" \ -pflash "ubuntu-16.04.5-server-arm64-flash0.img" \ -pflash "ubuntu-16.04.5-server-arm64-flash1.img" \ -m 1G \ -machine virt \ -enable-kvm \ -nographic \ -net virtio-net-device,netdev=n1 \ -netdev user,id=n1 \ ; Convert the qcow2 image to raw format and make sure it works (e.g., reboot the raw format image via qemu-system-aarch64) Make m5 using: cd gem5/util/m5 make -f Makefile.arm scp m5 to the guest arm system under /sbin/. Create a link /sbin/gem5 point to /sbin/m5 on the guest system. Then I setup the gem5.service and create gem5init as shown in Jason's guide " http://www.lowepower.com/jason/setting-up-gem5-full-system.html". I also remove some conf files from the guest arm linux system's /etc/init folder as described on http://gem5.org/Ubuntu_Disk_Image_for_ARM_Full_System. However, I didn't follow this guide since both host and guest arm linux systems I used are quite different. Build the arm linux kernel: git clone https://gem5.googlesource.com/arm/linux git checkout -b gem5/v4.4 make ARCH=arm gem5_defconfig make ARCH=arm -j `nproc` I didn't use a cross-platform compiler since I built the kernel on an arm board. Then I tried to run the command: "build/ARM/gem5.fast --listener-mode=on -d /home/rock64/tmp/arm_ configs/example/fs.py --machine-type=VExpress_GEM5_V1 --kernel=vmlinux.arm.4.4 --disk-image=ubuntu-16.04.5-server-arm64.img --mem-size=1GB --cpu-type=ArmV8KvmCPU --generate-dtb -n 1". It gave me a panic: 2.641819] gem5 DVFS handler is disabled [ 2.641822] gem5-energy-ctrl loaded at ffffff800899e000 [ 2.641825] gem5_energy_ctrl_mc: gem5_mc_init: DVFS handler in energy controller is disabled, ARM gem5 multi-cluster cpufreq driver will not be registered [ 2.642190] usbcore: registered new interface driver usbhid [ 2.642191] usbhid: USB HID core driver [ 2.642322] NET: Registered protocol family 17 [ 2.916496] scsi 0:0:0:0: Direct-Access ATA M5 IDE Disk n/a PQ: 0 ANSI: 5 [ 2.935127] sd 0:0:0:0: [sda] 16777216 512-byte logical blocks: (8.59 GB/8.00 GiB) [ 2.952327] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 2.964648] sd 0:0:0:0: [sda] Write Protect is off [ 2.975518] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 2.986957] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 3.101444] sda: sda1 sda2 sda3 [ 3.109804] sd 0:0:0:0: [sda] Attached SCSI disk [ 3.452824] VFS: Mounted root (vfat filesystem) on device 8:1. [ 3.466085] devtmpfs: error mounting -2 [ 3.475091] Freeing unused kernel memory: 384K [ 3.485519] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. [ 3.516805] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0+ #2 [ 3.530257] Hardware name: V2P-CA15 (DT) [ 3.539161] Call trace: [ 3.544930] [<ffffff8008088250>] dump_backtrace+0x0/0x370 [ 3.557065] [<ffffff80080885d4>] show_stack+0x14/0x20 [ 3.568513] [<ffffff800863ffe8>] dump_stack+0x8c/0xac [ 3.579903] [<ffffff80080b7338>] panic+0x11c/0x274 [ 3.590712] [<ffffff8008652244>] kernel_init+0xec/0x100 [ 3.602463] [<ffffff8008084348>] ret_from_fork+0x10/0x18 [ 3.614433] Kernel Offset: disabled [ 3.622386] CPU features: 0x002000 [ 3.630153] Memory Limit: 1024 MB [ 3.637726] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. One difference I do notice is that the arm disk image I created use /dev/vda, but both the arm image downloaded from gem5 website or our x86 disk image use /dev/sda. So, I wonder if this is the problem? Or, something else is wrong? Thanks in advance. best, Da Zhang
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users