Booting Android (Samsung) Kernel in QEMU

0

Trying to boot a Samsung S7 Edge Kernel 3.18.x using QEMU

/usr/local/bin/qemu-system-aarch64  -M virt -cpu cortex-a57  -kernel $HOME/s7boot/boot.emmc.win-zImage -initrd $HOME/s7boot/boot.emmc.win-ramdisk.gz -nographic

Nothing happens

Screen remains as it was.

CPU is at 100% for QEMU process

Using QEMU

/usr/local/bin/qemu-system-aarch64 --version
QEMU emulator version 4.1.0
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

Trying it with -s -S

 /usr/local/bin/qemu-system-aarch64  -M virt -cpu cortex-a57  -kernel $HOME/s7boot/boot.emmc.win-zImage -initrd $HOME/s7boot/boot.emmc.win-ramdisk.gz -nographic -s -S

GDB

Type "apropos word" to search for commands related to "word".
(gdb) target remote:1234
Remote debugging using :1234
warning: while parsing target description (at line 1): Target description specified unknown architecture "aarch64"
warning: Could not load XML target description; ignoring
0x00000000 in ?? ()
(gdb) cont
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x40080000 in ?? ()
(gdb) cont
Continuing.

So I guess it get stuck at 0x4008000

Anynway .... I tried serveral Kernels (downloaded from device, LineageOS, Some other custom, also compiled one from Samsung Sources) with no luck.

Questions:

Anybody booted Samsung/Android Kernel in QEMU?

Thanks,

Related to:

Booting Kernel in QEMU - PFLASH: Possible BUG - Write block confirm

android
qemu
asked on Stack Overflow Nov 4, 2019 by dev

1 Answer

3

This is the same question as Boot Sasmsung S7 Edge extraced Kernel from Device in Android Emulator but for QEMU proper rather than the Android emulator, and the answer is the same -- you need a kernel that's been built to run on the machine type you're using, which in this case is the "virt" board. Trying to boot a random kernel pulled off a different hardware device is never going to work.

answered on Stack Overflow Nov 7, 2019 by Peter Maydell

User contributions licensed under CC BY-SA 3.0