在新版linux上編譯老版本的kernel出現kernel/timeconst.h] Error 255


在使用ubuntu16.4編譯Linux-2.6.31內核時出現這樣的錯誤

可以修改timeconst.pl的內容后正常編譯。

以下是編譯錯誤提示的內容:

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.
/opt/ARM/mini6410/linux/linux-2.6.38/kernel/Makefile:140: recipe for target 'kernel/timeconst.h' failed
make[1]: *** [kernel/timeconst.h] Error 255
Makefile:916: recipe for target 'kernel' failed
make: *** [kernel] Error 2

將kernel/timeconst.pl中第373行的defined()去掉只留下@val就可以了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM