歡迎您光臨本站 註冊首頁
問題描述:
部分linux發行版安裝在筆記本上時可能會出現類似如下錯誤提示:
pci 0000:01:00.0: BAR 6: no parent found for of device
pci 0000:01:00.0: BAR 0: no parent found for of device
pci 0000:01:00.0: BAR 2: no parent found for of device
pci 0000:01:00.0: BAR 0: no parent found for of device
這是kernel載入時,檢查設備出現的錯誤提示,但是好像不影響使用,所以只要修改下內核,屏蔽掉此錯誤提示,然後重新編譯安裝新內核即可.
我使用的事fedora 12,此次重新編譯內核選擇2.6.32.9

解決步驟:
1.下載新內核www.kernel.org,並解壓(最好去使用的發行版官方下載伺服器下載內核)
#tar xvf linux-2.6.32.9.tar.bz2 -C /usr/src
2.進入新內核目錄,修改dirvers/pci/setup-res.c源碼
#vi drivers/pci/setup-res.c
先找到111行,我出現的只有
pci 0000:01:00.0: BAR 0: no parent found for of device
pci 0000:01:00.0: BAR 2: no parent found for of device
pci 0000:01:00.0: BAR 0: no parent found for of device
這兩個錯誤提示(BAR 0 和BAR 2),所以我修改為:
if (err && (resource != 0) && (resource != 2) ) {
如果你的錯誤提示有含有BAR 6這個欄位,則寫成如下:
if (err && (resource != 0) && (resource != 2) && (resource != 6)) {
再找到113行,修改成如下:(就是刪除掉of)
dev_err(&dev->dev, "BAR %d: %s %s %pRn",
3.編譯安裝新內核
先拷貝系統內核的配置文件到當前內核目錄下,並改名為.config:
#cp /boot/config-2.6.31~~~ /usr/src/linux-2.6.32.9/.config
#make menuconfig
載入剛才的.config,確定退出
#make all
#make modules_install
#make install (執行此步驟前,保證/boot目錄剩餘100M左右空間)
#vi /boot/grub/grub.conf (確定grub.conf已經正確配置,能引導新內核)


4.完成,重新啟動即可.
完成這些,感謝1024crak給與提示!網友轉載請註明出處.


[火星人 ] 解決部分linux發行版內核載入時出現 pci 0000:01:00.0: BAR 6: no parent found for of device已經有282次圍觀

http://coctec.com/docs/linux/show-post-51938.html