[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-26 Thread Taiyu Zhou via gem5-users
Thanks for you reply. Yes ARM kernel can’t work on X86 gem5.So I make a new X86 linux kernel.It works! But now I got a problem in make a new disk image. I follow this http://www.lowepower.com/jason/setting-up-gem5-full-system.html

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-26 Thread Gabe Black via gem5-users
Whoops, now I did it :-). I meant build/ARM/gem5.opt. Gabe On Sun, Apr 26, 2020 at 4:20 AM Gabe Black wrote: > Hi, I noticed that you're trying to run an ARM kernel on gem5 compiled to > run x86 code. That won't work. You need to either use an x86 kernel, or the > ARM version of gem5, aka

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-26 Thread Gabe Black via gem5-users
Hi, I noticed that you're trying to run an ARM kernel on gem5 compiled to run x86 code. That won't work. You need to either use an x86 kernel, or the ARM version of gem5, aka build/X86/gem5.opt. Gabe On Sat, Apr 25, 2020 at 10:50 PM Taiyu Zhou via gem5-users < gem5-users@gem5.org> wrote: > Hi

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Taiyu Zhou via gem5-users
Hi Ciro. I think that problem may be cause by incompatible. I use Mac to run parralles virtual machine and it is Intel core. I try to mount aarch64-ubuntu-trusty-headless.img on mnt and try to run /sbin/init. It will report that bash: ./sbin/init: cannot execute binary file: Exec format error

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
OK, also quick grep in kernel code and we can see that -8 and -13 are the same as exec syscall error numbers: #define ENOEXEC 8 /* Exec format error */ #define EACCES 13 /* Permission denied */ not 100% sure what those mean, but worth looking into as well. On Sat, Apr 25, 2020 at 7:13 PM Ciro

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
No worries. I would mount the image on host and ensure that the init you think is there is actually there, and that it seems to be right filetype (ISA is ARM, is executable, etc.). And ensure that you are pointing to it with init= kernel CLI parameter. If you don't understand from that, GDB step

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Taiyu Zhou via gem5-users
Hi Ciro. I tried to build my own vmlinux( linux4.3 ),and follow http://www.lowepower.com/jason/setting-up-gem5-full-system.html to make my own ubuntu-16 disk image.I think the ubuntu-16 disk image is too large, because

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
You could download from: http://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries section "Latest Linux Disk Images (recommended)" Personally I normally use Buildroot:

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Taiyu Zhou via gem5-users
Hi Ciro. Thanks for you help. I’ve set the M5_PATH and tried to use full path but it still not work for me. It's really strange. And by the way, how you create a disk image. I follow the tutorial in http://www.lowepower.com/jason/creating-disk-images-for-gem5.html

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
Can you also try to use the full path to vmlinux.arm64 instead of just basename? I suspect it is currently searching for it on M5_PATH (because not slashes in the path) and finding some broken image there. Better still, get rid of M5_PATH altogether if possible. My full non minimized CLI with

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Taiyu Zhou via gem5-users
Hi Ciro. Thanks for you reply.Could you show me the script you run on vmlinux.arm64 and your config? Because I think I don’t run on right command. I run "./build/X86/gem5.opt configs/example/fs.py --kernel=vmlinux.arm64 --disk-image=aarch64-ubuntu-trusty-headless.img" gem5 reports

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
I don't know exactly what is going on, but I've tested aarch-system-201901106/binaries/vmlinux.arm64 in fs.py and it worked fine. So the exact same script works with the old kernel but not new one? Are you sure that the kernel exists at that path? Also try to GDB/PDB debug it a bit. On Sat, Apr