linux编译内核后黑屏,运行Qemu后只是黑屏

小编典典

没有您的负载和入口点不正确。通常在下面是加载和入口地址

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

而且,如果您尝试使用命令,内核将be panic在没有rootfs的情况下使用。initrd参数丢失。同样,在构建内核时,您可能会缺少一些配置。

请尝试以下步骤:

1)make ARCH=arm distclean

2)make ARCH=arm versatile_defconfig

3)make ARCH=arm menuconfig

在这里,您需要启用以下功能。

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"

在这里,您将获得控制台提示说内核崩溃。为了避免这种情况,请传递您的rootfs参数。

我猜你是从busybox构建rootfs的,如果这样,请尝试使用以下命令完全启动系统

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.

2020-06-02

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值