Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
674 views
in Technique[技术] by (71.8m points)

linux - Just black screen after running Qemu

I have just installed QEMU and compiled linux kernel with ARM support but when I run below command

qemu-system-arm -M versatilepb -m 128M -kernel /home/arit/QEMU/linux-3.8.4/arch/arm/boot/uImage -append "console=tty1"

I could only see Black screen ,I also tried what is being suggested in below thread

Qemu shows a black screen

But still it didn't work.

Following is the output of make command which I run to compile kernel Source

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage -s

 Image Name:   Linux-3.8.4
 Created:      Tue Dec 24 12:49:07 2013
 Image Type:   ARM Linux Kernel Image (uncompressed)
 Data Size:    4406472 Bytes = 4303.20 kB = 4.20 MB
 Load Address: fffffff2
 Entry Point:  fffffff2

Are Load and Entry points OK here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No your Load and Entry points ARE NOT CORRECT. typically below is load and entry address

Image Name:   Linux-3.9.0
Created:      Thu Dec 26 09:50:57 2013
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1908056 Bytes = 1863.34 kB = 1.82 MB
Load Address: 00008000
Entry Point:  00008000

Moreover if you try with your command, kernel will be panic in the absence of rootfs. initrd parameters are missing. Also you might be missing some configuration while building kernel.

Try these steps:

1)make ARCH=arm distclean

2)make ARCH=arm versatile_defconfig

3)make ARCH=arm menuconfig

here you need to enable below feature.

Kernel Features ---> [*] Use the ARM EABI to compile the kernel. (enable this).

4)make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

5)qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/uImage -append "console=tty1"

Here you will get console saying that kernel panic. to avoid this pass your rootfs parameter.

I guess you built rootfs from busybox if so try below command to boot system completely

6)qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/uImage -initrd rootfs.img -append "root=/dev/ram mem=128M rdinit=/sbin/init" -serial stdio.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...