On 4 September 2014 11:40, Semion Prihodko <semion.ab...@gmail.com> wrote: > Hi guys, > > Need your help. I trying to find a way to compile/link a minimal kernel > which outputs "Hello World" in qemu-system-aarch64. No tutorial found. There > is no problem running the same example in Foundation emulator, but I need > QEMU. > > Trying to reuse axf-file in Foundation example: > > aarch64-linux-gnu-objcopy -O binary hello.axf kernel.bin > qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic -smp 1 -m 3G > -kernel kernel.bin > > I got: > > qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000000000000
If you use "-kernel" and it's not an ELF file, then we assume it's a Linux kernel image with the arm64 Linux image header format. Since in your case this probably isn't true, we're crashing very early on. You probably want: (1) to pass the ELF file directly to QEMU rather than converting it to a binary (2) to make sure your image is linked correctly to work with the "virt" board's memory layout, which is different from that of the Foundation models thanks -- PMM