作者wtchen (没有存在感的人)
看板LinuxDev
标题[问题] cross compile的kernel不能在pi上make
时间Sun Jul 26 02:32:19 2015
我会在自己的笔电上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://webptt.com/cn.aspx?n=bbs/LinuxDev/M.1437849142.A.D25.html
※ 编辑: wtchen (90.41.87.13), 07/26/2015 02:36:47
※ 编辑: wtchen (90.41.87.13), 07/26/2015 02:53:22
1F:→ leolarrel: 所谓的"没法编译"是发生什麽事,有错误讯息吗? 07/26 13:12
2F:→ leolarrel: 在目标平台上原生编译driver or kernel 本体一定是可行 07/26 13:13
3F:→ leolarrel: 的,没法编译就是有什麽事情没有做对 07/26 13:14
我猜可能是权限还是git的问题
我的步骤如下:
- 制作开机碟:sudo dd bs=4M if=2015-05-05-raspbian-wheezy.img of=/dev/mmcblk0
- 用GParted把microSD(16G)剩余空间都用上
- mount microSD 的 / 到 /a
- 在 /a/home/pi/src 下:git clone
https://github.com/raspberrypi/linux.git
- umount /a ,用microSD启动 RPi
- 进入 /home/pi/src/linux 执行 make menuconfig --> 显示错误讯息
(因为pi的无线网卡module要另外编译,超麻烦...)
※ 编辑: wtchen (90.41.87.13), 07/26/2015 16:02:39
4F:→ ah7675: 你还是没把关键的错误讯息贴出来啊 07/26 20:10
5F:→ wtchen: 我很想,可是pi现在没网路,我还在努力乔 07/26 23:21
6F:推 PCIT: check if your kernel version agrees with your module 07/26 23:58