1;將openwrt14.07中的內核版本從3.10.49更換成3.10.102
a;更改文件include/kernel-version.mk
b;修改文件target/linux/<路由器架構> 下的Makefile,將KERNEL_PATCHVER:= ××那一行的xx改成自己希望的版本系列即可,但不能具體爲3.10.102,應爲3.10。不然會報錯。
c;修改target/linux/generic/patches-3.10中的文件。
在這個網址中可以找到相關補丁: https://dev.openwrt.org/browser/trunk/target/linux?rev=44800&order=name
d;修改target/linux/ramips/patches-3.10中的文件,ramips即make menuconfig中選中的platform。
e;在target/linux/generic/中添加config-3.10
f;在target/linux/ramips/mt7620a中添加config-3.10。(mt7620a爲編譯時選擇的開發板,若更新爲內核3.14,則添加config-3.14)
g:檢查target/linux/generic/files中的文件有沒有被修改。
h;更改package/kernel中的文件
i;還要修改include/中的mk文件
更換內核版本後,可能需要運行make kernel_menuconfig進行設置。
有可能packet/文件中與新的linux內核不相符。將來程序若出bug了,可能與只更換了linux內核版本,而沒有更新packet/中的文件有關。
錯誤處理:
1;編譯時出現錯誤:Parse error at /home/jing/openwrt/openwrt1407/scripts/kconfig.pl line 137.
修改文件target/linux/<路由器架構> 下的Makefile,其中KERNEL_PATCHVER:=3.18,不能是KERNEL_PATCHVER:=3.18.36
2;出現Package kmod-ipt-conntrack is missing dependencies for the following libraries:
nf_conntrack.ko 錯誤時
可以進行make kernel_menuconfig進行配置試試