新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 嵌入式Linux啟動過程中的問題積累

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

        作者: 時間:2016-11-25 來源:網(wǎng)絡 收藏

        1.Bad Magic Number

        本文引用地址:http://www.104case.com/article/201611/321524.htm

        ## Booting image at 33000000 ...

        Bad Magic Number

        OMAP5912 OSK #(tftp下載好kernel的uImage后就停止在這,不能啟動kernel)

        問題原因:啟動參數(shù)設置錯誤,0x30000000處不可以執(zhí)行。

        有的開發(fā)板sdram不是在0x33000000,所以不能把kernel uImage下載到0x33000000中運行。如我之前的bootcmd參數(shù)為:setenv bootcmd tftpboot 33000000 uImage/; bootm 33000000。但板子Omap5912的sdram地址在0x100000000,將參數(shù)改為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.15

        Filename uImage

        Load address: 0x10000000

        Loading: #################################################################

        #################################################################

        done

        Bytes transferred = 2025908 (1ee9b4 hex)

        ## Booting image at 10000000 ...

        Image Name:Linux-2.6.18-mh8_pro500-versatil

        Image Type:ARM Linux Kernel Image (uncompressed)

        Data Size:2025844 Bytes =1.9 MB

        Load Address: 30008000

        Entry Point:30008000

        Verifying Checksum ... OK

        OK

        Starting kernel ...(卡在這里)

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

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

        3.不能啟動kernel

        Starting kernel ...

        Uncompressing Linux.........................................................

        .................... done, booting the kernel.

        問題原因:可能是Bootargs參數(shù)設置錯誤,確認bootargs設置是否正確。

        4.不能掛載nfs

        eth0: link up

        IP-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 upportofRPC100003/2 on 192.168.167.170

        Root-NFS: Unable to get nfsd port number from server, using default

        Looking upportofRPC100005/1 on 192.168.167.170

        Root-NFS: Unable to get mountd port number from server, using default

        mount: server 192.168.167.170 not responding, timed out

        Root-NFS: Server returned error -5 while mounting /work/nfs/rootfs_bluetooth_omap

        VFS: 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 option

        Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

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

        確認uboot的bootargs參數(shù)里和nfs相關的ip地址信息設置是否正確,以及Host機/etc/exports配置無誤,重起nfs服務,重新嘗試連接。另外還需要注意bootargs內(nèi)console和mem兩個參數(shù)的設置。kernel2.6后console最好設置為ttySAC0,mem也要根據(jù)開發(fā)板實際情況設置正確。

        5.文件系統(tǒng)不能啟動問題

        eth0: link up

        IP-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 upportofRPC100003/2 on 192.168.167.170

        Looking upportofRPC100005/1 on 192.168.167.170

        VFS: Mounted root (nfs filesystem).

        Freeing init memory: 128K

        /sbin/initKernel panic - not syncing: Attempted to kill init!

        問題原因:制作的文件系統(tǒng)缺少運行busybox所需的libcrypt.so庫,新版本會有缺庫提示,老版本(1.60)沒有。

        注:運行一個busybox文件系統(tǒng)至少需要如下幾個庫:

        ld-linux.so.x

        libc.so.6

        libcrypt.so.x

        較新版本的busybox可能還需要

        libm.so.6

        libgcc_s.so.x

        (x為版本號)

        6.文件系統(tǒng)不能啟動問題2

        eth0: link up

        IP-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 upportofRPC100003/2 on 192.168.167.170

        Looking upportofRPC100005/1 on 192.168.167.170

        VFS: Mounted root (nfs filesystem).

        Freeing init memory: 128K

        Kernel panic - not syncing: No init found.Try passing init= option to kernel.

        問題原因:對比一個可用的文件系統(tǒng)后發(fā)現(xiàn),缺少了ld-linux.so.x庫,文件系統(tǒng)里只有l(wèi)d-linux.so.x的連接文件,少拷了庫文件。

        8.不能獲得帳戶UID信息

        Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

        Unknown username "root" in message bus configuration file

        Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

        Failed to start message bus: Could not get UID and GID for username "root"

        問題原因:

        情況一:系統(tǒng)帳戶驗證出現(xiàn)問題.懷疑是調(diào)用getuid、getguid時并沒有返回正確值,可能是缺少帳戶驗證相關庫,實際排查后發(fā)現(xiàn),缺少libnss_files庫??截惤徊婢幾g器的libnss_files庫到文件系統(tǒng)后,啟動文件系統(tǒng)成功。

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

        手動創(chuàng)建帳號。

        #vi /etc/passwd

        root:x:0:0:root:/root:/bin/sh

        kyo:x:500:500:kyo:/home/kyo:/bin/bash

        添加組

        #vi group

        root:x:0:root

        9.

        Freeing init memory: 128K

        init started: BusyBox v1.6.1(2007-08-27 14:33:15 CST) multi-call binary

        starting pid 834, tty : /etc/init.d/rcS

        Cannot run /etc/init.d/rcS: No such file or directory

        Please press Enter to activate this console.

        發(fā)現(xiàn)沒有/etc/init.d/rcS文件系統(tǒng)一樣能正常啟動??磥韗cS只是用來設置一些隨機啟動的參數(shù),對文件能否正常運行關系不大。

        注:這個不是錯誤,是偶然發(fā)現(xiàn)! :)



        評論


        技術專區(qū)

        關閉
        主站蜘蛛池模板: 楚雄市| 息烽县| 高尔夫| 凌海市| 那坡县| 通城县| 石河子市| 伊川县| 昆明市| 清流县| 营山县| 昌都县| 鄯善县| 浦东新区| 新密市| 靖边县| 易门县| 青神县| 成都市| 罗江县| 永丰县| 抚松县| 邢台县| 梁河县| 峨眉山市| 资溪县| 武乡县| 美姑县| 莲花县| 阿合奇县| 永城市| 读书| 湖南省| 沿河| 张家港市| 平乐县| 哈巴河县| 二连浩特市| 台中市| 莫力| 湟源县|