2

I compiled my custom kernel with different configs and images like u,zImages. But when I try to run qemu with my image, qemu showing only black screen.

Also I looked at this post but it didn't help me.

EDIT

I just tried to compile kernel with these commands.

make ARCH=arm distclean

make ARCH=arm integrator_defconfig

make ARCH=arm menuconfig

NOTE: I used default menuconfig.

make ARCH=arm CROSS_COMPILE=arm-none-eabi- zImage

qemu-system-arm -M integratorcp -kernel arch/arm/boot/zImage

And last i tried this command;

qemu-system-arm -M integratorcp -kernel arch/arm/boot/zImage -append 'console=ttyAMA0 earlyprintk=ttyAMA0' -serial stdio

NOTE: when i try to use -dtb, qemu giving to me "Unable to copy device tree in memory." error.

Community
  • 1
  • 1

1 Answers1

2

"QEMU does nothing with a black screen" almost always means "QEMU is running fine, but the guest code crashed or stopped early in the boot process without sending any output". Almost certainly either your kernel is misconfigured, or your QEMU command line is wrong. You don't give enough information to say which. You need to tell us at least:

  • what the kernel is you're running and what machine you've configured it for
  • what the QEMU command line you're using is

Given your updated question with a command line, some suggestions:

  • tell your guest to use the serial port (use the QEMU option -append 'console=ttyAMA0' to set the guest kernel command line)
  • either check the serial output view in the GUI, or send it to stdout with -nographic or -serial stdio
  • enable any earlyprintk or earlycon options in the guest config that you can and on the guest command line, so if the guest fails early you have more chance to catch it
  • pass the device tree for the kernel with -dtb integratorcp.dtb (use the one from your kernel tree; you'll probably have to tell the kernel makefiles to build it for you)

PS: integratorcp is an absolutely ancient development board -- why do you want to use it?

Peter Maydell
  • 9,707
  • 1
  • 19
  • 25
  • I wanna try different architectures. Also i tried ur suggestions. U cna see my last command in main post. – Oğuz KAHRAMAN Mar 08 '18 at 11:01
  • integratorcp is a terrible choice for looking at the Arm architecture though. Upstream's suggestions for picking a board model are here: https://wiki.qemu.org/Documentation/Platforms/ARM (with links to working tutorials for the 'virt' board) – Peter Maydell Mar 08 '18 at 11:07
  • Which board do you suggets for first linux embedded system application ? I am new at kernel embedded systems. – Oğuz KAHRAMAN Mar 08 '18 at 11:11