我需要在 2.6 内核(普通内核,而不是 ubuntu 内核)上进行内核开发。我正在运行 Ubuntu 12.04、x86。我的第一个障碍是获得正确的 gcc 版本来编译 2.6 内核。我已经过去了,并且能够安装 gcc 4.2。但是,当我尝试执行make menuconfig时,会出现错误,其中一些我已在下面发布:
/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’
我认为这是因为我试图在具有版本 3 内核头文件的系统上编译 2.6 内核?
有谁知道我如何在 Ubuntu 12.04 上编译我的普通 2.6 内核?