嵌入式Linux啟動過程中的問題積累 --補充kernel panic的非EBAI問題__Linux

來源:互聯網
上載者:User

嵌入式Linux啟動過程中的問題積累

博文原地址:http://blog.csdn.net/dzassn/article/details/1953993

1.Bad Magic Number

## Booting image at 33000000 ...Bad Magic NumberOMAP5912 OSK # (tftp下載好kernel的uImage後就停止在這,不能啟動kernel)

問題原因:啟動參數設定錯誤,0x30000000處不可以執行。

有的開發板sdram不是在0x33000000,所以不能把kernel uImage下載到0x33000000中運行。如我之前的bootcmd參數為:setenv bootcmd tftpboot 33000000 uImage/; bootm 33000000。但板子Omap5912的sdram地址在0x100000000,將參數改為setenv bootcmd tftpboot 10000000 uImage/; bootm 10000000後便可以啟動kernel了。

2.啟動停止在"Starting kernel ..."

TFTP from server 192.168.167.170; our IP address is 192.168.167.15Filename 'uImage'Load address: 0x10000000Loading: #################################################################         #################################################################doneBytes transferred = 2025908 (1ee9b4 hex)Booting image at 10000000 ...Image Name:   Linux-2.6.18-mh8_pro500-versatilImage Type:   ARM Linux Kernel Image (uncompressed)Data Size:    2025844 Bytes =  1.9 MBLoad Address: 30008000Entry Point:  30008000Verifying Checksum ... OKOKStarting kernel ...   (卡在這裡)

問題原因:多半是kernel沒編譯成功。

確認configure參數是否配置正確,是否選擇了正確的目標編譯平台,如smdk2410等。

3.不能啟動kernel

Starting kernel ...Uncompressing Linux............................................................................. done, booting the kernel.

問題原因:可能是Bootargs參數設定錯誤,確認bootargs設定是否正確。

4.不能掛載nfs

eth0: link upIP-Config: Complete:     device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,     host=192.168.167.15, domain=, nis-domain=(none),     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=Looking up port of RPC 100003/2 on 192.168.167.170Root-NFS: Unable to get nfsd port number from server, using defaultLooking up port of RPC 100005/1 on 192.168.167.170Root-NFS: Unable to get mountd port number from server, using defaultmount: server 192.168.167.170 not responding, timed outRoot-NFS: Server returned error -5 while mounting /work/nfs/rootfs_bluetooth_omapVFS: Unable to mount root fs via NFS, trying floppy.VFS: Cannot open root device "nfs" or unknown-block(2,0)Please append a correct "root=" boot optionKernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

問題原因:這種情況通常是nfs配置問題。

確認uboot的bootargs參數裡和nfs相關的ip地址資訊設定是否正確,以及Host機/etc/exports配置無誤,重起nfs服務,重新嘗試串連。另外還需要注意bootargs內console和mem兩個參數的設定。kernel2.6後console最好設定為ttySAC0,mem也要根據開發板實際情況設定正確。

5.檔案系統不能啟動問題

eth0: link upIP-Config: Complete:      device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,     host=192.168.167.15, domain=, nis-domain=(none),     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=Looking up port of RPC 100003/2 on 192.168.167.170Looking up port of RPC 100005/1 on 192.168.167.170VFS: Mounted root (nfs filesystem).Freeing init memory: 128K/sbin/initKernel panic - not syncing: Attempted to kill init!
問題原因:製作的檔案系統缺少運行busybox所需的libcrypt.so庫,新版本會有缺庫提示,老版本(1.60)沒有。

註:運行一個busybox檔案系統至少需要如下幾個庫:

ld-linux.so.x

libc.so.6

libcrypt.so.x

較新版本的busybox可能還需要

libm.so.6

libgcc_s.so.x

(x為版本號碼)

6.檔案系統不能啟動問題2

eth0: link upIP-Config: Complete:     device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,     host=192.168.167.15, domain=, nis-domain=(none),     bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=Looking up port of RPC 100003/2 on 192.168.167.170Looking up port of RPC 100005/1 on 192.168.167.170VFS: Mounted root (nfs filesystem).Freeing init memory: 128KKernel panic - not syncing: No init found.  Try passing init= option to kernel.

問題原因1:對比一個可用的檔案系統後發現,缺少了ld-linux.so.x庫,檔案系統裡只有ld-linux.so.x的串連檔案,少拷了庫檔案。

問題原因2:使用的編譯器為4.3.x版本,但是核心沒有添加對EBAI的支援。

解決辦法:

修改Kernel Features  --->
            [*] Use the ARM EABI to compile the kernel                  
            [*]   Allow old ABI binaries to run with this kernel (EXPERIMENTA)
把這個選上。

問題原因3:NAND FLASH啟動時的ECC校正問題.

解決辦法:

修改Device Drivers --->

           [*] Memory Technology Device(MTD) support --->
                   [*] NAND Device Support --->

                            [*] S3C2410 NAND Hardware ECC
8.不能獲得帳戶UID資訊

Could not get password database information for UID of current process: User "???" unknown or no memory to allocatepassword entryUnknown username "root" in message bus configuration fileCould not get password database information for UID of current process: User "???" unknown or no memory to allocatepassword entryFailed to start message bus: Could not get UID and GID for username "root"
問題原因:

情況一:系統帳戶驗證出現問題.懷疑是調用getuid、getguid時並沒有返回正確值,可能是缺少帳戶驗證相關庫,實際排查後發現,缺少libnss_files庫。拷貝交叉編譯器的libnss_files庫到檔案系統後,開機檔案系統成功。

情況二:系統沒有root帳號。可以由whoami命令看出。

手動建立帳號。

#vi /etc/passwdroot:x:0:0:root:/root:/bin/shkyo:x:500:500:kyo:/home/kyo:/bin/bash

添加組

#vi grouproot:x:0:root

9.

Freeing init memory: 128Kinit started: BusyBox v1.6.1 (2007-08-27 14:33:15 CST) multi-call binarystarting pid 834, tty '': '/etc/init.d/rcS'Cannot run '/etc/init.d/rcS': No such file or directoryPlease press Enter to activate this console. 

發現沒有/etc/init.d/rcS檔案系統一樣能正常啟動。看來rcS只是用來設定一些隨機啟動的參數,對檔案能否正常運行關係不大。

註:這個不是錯誤,是偶然發現! :)

10.

linux 核心啟動過程中,自己編寫的字元驅動程式在建立裝置節點時提示lp:driver loaded but no devices found.
目前,這個問題還沒有找到具體原因,其中我使用的是yaffs2檔案系統時才提示這個錯誤,目前初步確定是在配置核心的過程中導致的,具體原因 分析中。。。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.