2012-11-05 98 views
1

我需要在2.6內核(普通內核,而不是ubuntu內核)上進行內核開發。我正在運行Ubuntu 12.04,x86。我的第一個障礙是獲得正確的gcc版本來編譯2.6內核。我已經過去了,並且能夠安裝gcc 4.2。然而,當我嘗試做的make menuconfig我得到的錯誤,其中一些我已經貼在下面:編譯Ubuntu 12.04上的2.6內核

/usr/include/arpa/inet.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘inet_lnaof’ 
/usr/include/arpa/inet.h:42: error: expected ‘)’ before ‘__net’ 
/usr/include/arpa/inet.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘inet_netof’ 
/usr/include/arpa/inet.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘inet_network’ 
/usr/include/arpa/inet.h:54: error: storage class specified for parameter ‘inet_ntoa’ 
/usr/include/arpa/inet.h:60: error: storage class specified for parameter ‘inet_pton’ 
/usr/include/arpa/inet.h:66: error: expected declaration specifiers or ‘...’ before ‘socklen_t’ 
/usr/include/arpa/inet.h:67: error: storage class specified for parameter ‘inet_ntop’ 
/usr/include/arpa/inet.h:74: error: storage class specified for parameter ‘inet_aton’ 
/usr/include/arpa/inet.h:78: error: expected ‘)’ before ‘__net’ 
/usr/include/arpa/inet.h:84: error: storage class specified for parameter ‘inet_net_ntop’ 
/usr/include/arpa/inet.h:90: error: storage class specified for parameter ‘inet_net_pton’ 
/usr/include/arpa/inet.h:96: error: storage class specified for parameter ‘inet_nsap_addr’ 
/usr/include/arpa/inet.h:101: error: storage class specified for parameter ‘inet_nsap_ntoa’ 
/usr/include/arpa/inet.h:104: error: expected declaration specifiers before ‘__END_DECLS’ 

我想這是由於這樣的事實,我試圖編譯在2.6內核帶有版本3內核頭文件的系統?

有誰知道我可以在Ubuntu 12.04上編譯我的純2.6內核嗎?

回答

1

Ubuntu並沒有真正使用vanilla內核,您需要修補一個vanilla內核才能夠使用Ubuntu內核的linux源代碼。

參考this link獲取完整指南。