一,树莓派内核源码的获取和交叉编译工具的获取
树莓派的github主页:https://github.com/raspberrypi
,里面包含了linux源码、交叉编译工具链等内容。
对于我们要用到的有下面两个内容:
https://github.com/raspberrypi/linux 内核源码
https://github.com/raspberrypi/tools 交叉编译工具链(仅在交叉编译时用到)
可以在官网下载也可以直接在命令终端输入
获取linux内核源码:
git clone github.com:raspberrypi/linux
交叉编译工具:
git clone github.com:raspberrypi/tools
二,配置交叉编译工具
https://editor.csdn.net/md/?articleId=108924134
三,配置.config
文件
概述:配置的最终目标会生成 .config
文件,该文件指导Makefile
去把有用东西组织成内核
树莓派3的工程是bcm2709_defconfig
。
想要安装一些会用到库:
sudo apt-get install bc
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install zlib1g:i386
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 li