[英]Kernel on x86_64 not boot after upgrading Binutils and GCC
I'm not able to see ANY logs on console (even not the "Decompressing Linux... " message). 我在控制台上看不到任何日志(甚至没有“ Decompressing Linux ...”消息)。
My Questions: 我的问题:
1) Is there other thing I can do to get early boot logs ? 1)还有什么我可以做的以获得早期启动日志?
2) Is there any additional code I need to add to Kernel debug it ? 2)我是否需要向内核调试添加其他代码?
3) Is there any other methodology to debug it ? 3)还有其他方法可以调试吗?
Binutils: 2.26.1 binutils-2.26.1-1.fc25.src.rpm Binutils: 2.26.1 binutils-2.26.1-1.fc25.src.rpm
GCC: 6.4.1 gcc-6.4.1-1.fc25.src.rpm GCC: 6.4.1 gcc-6.4.1-1.fc25.src.rpm
Kernel: 3.10.0-514.21.1 内核: 3.10.0-514.21.1
GRUB configuration GRUB配置
default=0
timeout=3
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=34 serial console
title XIV-System
root (hd0,0)
kernel /boot/vmlinuz init=/system/my_init console=tty0 mce=0 i8042.noaux idle=poll scsi_mod.inq_timeout=2 selinux=0 nohpet console=ttyS0,115200 earlyprintk=ttyS0,115200 kgdboc=ttyS0,115200 ro crashkernel=auto
Kernel configuration 内核配置
- For verbos boot message
CONFIG_X86_VERBOSE_BOOTUP=y
- For early printk
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
- For KGDB
CONFIG_KGDB_LOW_LEVEL_TRAP=y
CONFIG_KGDB_KDB=y
CONFIG_SERIAL_KGDB_NMI=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_TESTS=y
- For KDB
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
I was manage to solve the problem only after debug kernel with gdb (the early boot stage), basically I found out that the kernel fails on: 仅在使用gdb调试内核后(早期启动阶段),我才设法解决问题,基本上我发现内核在以下方面失败:
(gdb) bt
#0 early_idt_handler () at arch/x86/kernel/head_64.S:407
#1 0xffff9fffffffffff in ?? ()
#2 0xffffff07ffffffff in ?? ()
#3 0xffffe0ffffffffff in ?? ()
#4 0x00000e0000000000 in ?? ()
#5 0xffffffff81bee8a0 in ?? ()
#6 0xffff880000014560 in ?? ()
#7 0xffffffff819c0120 in early_idt_handler () at arch/x86/kernel/head_64.S:374
#8 0x0000000000000400 in irq_stack_union ()
#9 0xffffffff81bee8a0 in ?? ()
#10 0x000000000000000f in irq_stack_union ()
#11 0x0000000000000000 in ?? ()
from them I looked into the Kernel source tree (for patch related to head_64.S) and applied it. 从中,我研究了内核源代码树(与head_64.S相关的补丁程序)并将其应用。 you can find the patch and it's related on:
您可以找到补丁,它与以下内容有关:
commit 5f020130d5360e8266e369dc2b5f4e32ec5b05f4 (HEAD -> my_commit)
Author: Andy Lutomirski <luto@kernel.org>
Date: Fri May 22 16:15:47 2015 -0700
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.