Re: [問題] cross compile的kernel不能在pi上make

看板LinuxDev作者 (沒有存在感的人)時間10年前 (2015/07/27 20:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
以下是編譯模組make時(kernel 4.0.9+rt patch)的錯誤訊息: (模組來源:https://github.com/kuba-moo/mt7601u) 我用在pi上編譯的kernel 4.0.8或是我筆電本機的kernel3.19確定沒問題 (所以module本身沒問題) 可我不知道為何make時會有Syntax error 感謝指教 make: Warning: File 'Makefile' has modification time 4637885 s in the future make -C /lib/modules/`uname -r`/build M=$PWD make[1]: Entering directory '/home/pi/src/linux' make[1]: Warning: File '.vmlinux.cmd' has modification time 7052597 s in the future make[2]: Warning: File 'scripts/Makefile.lib' has modification time 7050851 s in the future CC [M] /home/pi/src/mt7601u-master/usb.o ./scripts/recordmcount: 1: ./scripts/recordmcount: Syntax error: ")" unexpected scripts/Makefile.build:258: recipe for target '/home/pi/src/mt7601u-master/usb.o' failed make[2]: *** [/home/pi/src/mt7601u-master/usb.o] Error 2 Makefile:1390: recipe for target '_module_/home/pi/src/mt7601u-master' failed make[1]: *** [_module_/home/pi/src/mt7601u-master] Error 2 make[1]: Leaving directory '/home/pi/src/linux' Makefile:8: recipe for target 'default' failed make: *** [default] Error 2 kernel是在筆電上用arm-linux-gnueabihf- cross compile的 ※ 引述《wtchen (沒有存在感的人)》之銘言: : 我會在自己的筆電上cross compile Rpi的kernel(4.0.8),裝到Rpi上也能跑 : 可是我常常要在RPi上編譯自己的module, : 如果用cross compile的kernel(source)就沒法編, : 改成在pi上編的kernel就可以。 : 如果我臨時想改掉.config多加幾個module, : 也得用cross compile不能直接在Rpi上compile : 當然我也可以一律用cross compile,只是這很麻煩(要用nfs或把sd卡接到筆電上)。 : 請問有啥方法可以在Rpi上用cross compile的kernel 編譯自己的module? : 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 90.41.87.13 ※ 文章網址: https://www.ptt.cc/bbs/LinuxDev/M.1438027591.A.015.html
文章代碼(AID): #1Ljez70L (LinuxDev)
討論串 (同標題文章)
文章代碼(AID): #1Ljez70L (LinuxDev)