2009年11月12日

Linux開機流程 - 從CONFIG_DEBUG_LL開始談起

利用CONFIG_DEBUG_LL除錯

在網路上查詢CONFIG_DEBUG_LL的結果
http://cateee.net/lkddb/web-lkddb/DEBUG_LL.html
arch/arm/Kconfig

The configuration item CONFIG_DEBUG_LL:

prompt: Kernel low-level debugging functions

type: tristate(三種選擇:yes/no/module)
depends on: CONFIG_DEBUG_KERNEL
(要先選擇此depend後才能有CONFIG_DEBUG_LL選項)


defined in arch/arm/Kconfig
found in Linux Kernels: before 2.6.0 version still available on 2.6.31 release
Help text

Say Y here to include definitions of printascii, printchar, printhex in the kernel. This is helpful if you are debugging code that executes before the console is initialized.

研讀Android 2.6.25原始碼後,亦有DEBUG_LL,存在於Kconfig.debug中
(但是在學長的creator_android_pxa270_defconfig裡面並沒有把此項選擇yes)

release-sourceforge\android-pxa270\kernel\linux-2.6.25-android-1.0_r1\arch\arm\Kconfig.debug
# These options are only for real kernel hackers who want to get their hands dirty.
config DEBUG_LL
 bool "Kernel low-level debugging functions"
 depends on DEBUG_KERNEL

不過在pxa300中的config檔案中就有出現了

所以要解決的事情是:
使pxa300開機時,bootloader和kernel中的machine type號碼要一致

1.到\300\src\preview-kit\linux\arch\arm\tools\mach-types
查看littleton的號碼為:1388,用小算盤換成16進制,0x56C



2.修改\300\src\preview-kit\linux\arch\arm\kernel\head.S中,ENTRY(stext)底下新增一行
LDR     r1,=0x56C


(應該可以吧...還沒測試)

沒有留言:

張貼留言

NO-CARRIER 網卡無法啟動

 工作時,由於想要啟動linux OS的網卡, 發現某張新設定的網卡一直無法啟動,就算下指令UP了,但是也沒有順利啟動 所以爬文後,想要確認該網卡的status, 發現某行為: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu...