1. 程式人生 > >編譯linux核心遇到的問題

編譯linux核心遇到的問題

問題一:
編譯linux核心(OK210),多個地方出現這個問題:
error: too few arguments to function 'mmc_suspend_host'
網上查了下mmc_suspend_host函式原型:
http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=28685940&id=3889878

缺少第二個引數 pm_message_t  state  因此只需要根據呼叫函式補上即可。

一般就是state 。



問題二:

error: implicit declaration of function 'kzalloc'
error: implicit declaration of function 'kfree'


新增 #include <linux/slab.h>

問題三:

drivers/scsi/advansys.c:8376: error: implicit declaration of function 'dma_cache_sync'

開啟檔案找到dma_cache_sync ,直接註釋就行了。

參考:http://bbs.chinaunix.net/thread-3645559-1-1.html

問題四:

drivers/scsi/ipr.c:654: error: implicit declaration of function 'writeq'

應該可能在linux/slab.h 在沒有定義 也有人說這個bug 

https://bugzilla.kernel.org/show_bug.cgi?id=17822

暫時沒解決這個問題,直接在配置裡把scsi全關了。。

可能解決的辦法是更新linux庫?