当前位置:网站首页>更换树莓派内核
更换树莓派内核
2022-08-01 01:21:00 【十年哞一剑】
找到合适的内核编译包
1
unzip linux-rpi-5.15.y.zip
cd linux-rpi-5.15.y
2 首先在交叉编译Linux主机上安装所需的依赖和交叉编译工具,如下
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
3 树莓派安装的是32的内核,则安装32位的交叉编译工具链:
注
通过在Pi里运行“file /sbin/busybox” 或其他可执行程序可查看当前内核是32位还是64位的。如果是32位的,会显示如下32-bit 字段,否则为64位的
sudo apt install crossbuild-essential-armhf
4 利用git获取当前git仓库默认Pi的内核源码,如下所示:
git clone --depth=1 https://github.com/raspberrypi/linux
多试几次 比较卡的话
配置内核
32位的(树莓派)
1 cd linux
2 KERNEL=kernel7
3 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
权限不够
切换超级用户
编译内核
32位的(树莓派)
过程漫长 别退出
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
1 vmlinux 有了
2 cd arch/arm/boot
存 有zImage (树莓派内核启动文件)
1 2 都有了 证明成功
挂载sd卡
1
lsblk:查看识别到的TF卡设备节点
很重要
红圈的 不要这个路径 用 linux 替换
sudo mkdir /media/linux/rootfs -p
sudo mkdir /media/linux/boot -p
sudo mount /dev/sdb1 /media/linux/boot
sudo mount /dev/sdb2 /media/linux/rootfs
2 然后将内核模块安装到SD中:
sudo env PATH=$PATH make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/media/linux/rootfs modules_install
查看 内核版本
旧的
新的
边栏推荐
- 解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题
- MYSQL查询截取优化分析
- 软考高级系统架构设计师系列之:系统开发基础知识
- [Data analysis] Based on matlab GUI student achievement management system [including Matlab source code 1981]
- 【数据分析】基于matlab GUI学生成绩管理系统【含Matlab源码 1981期】
- ROS2 series of knowledge (4): understand the concept of [service]
- Rasa 3.x 学习系列-使用查找表改进实体提取
- Super like the keyboard made from zero, IT people love it
- 声称AI存在意识,谷歌工程师遭解雇:违反保密协议
- MYSQL关键字Explain解析
猜你喜欢
Team of Professor Chen Jianyu of Tsinghua University | Contact Safety Reinforcement Learning Framework Based on Contact-rich Robot Operation
SC7A20(士兰微-加速度传感器)示例
解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题
RTL8762DK WDG(六)
声称AI存在意识,谷歌工程师遭解雇:违反保密协议
Blueprint: Yang Hui's Triangular Arrangement
MYSQL Classic Interview Questions
TCP协议详解
leetcode: 1648. Color ball with decreasing sales value [Boundary find by two points]
【数据分析】基于matlab GUI学生成绩管理系统【含Matlab源码 1981期】
随机推荐
Rasa 3.x 学习系列- Rasa - Issues 4898 学习笔记
RTL8762DK RTC(五)
Rasa 3.x Study Series - Rasa - Issues 4898 Study Notes
解决安装MySQL后,Excel打开很慢的问题
By Value or By Reference
IDEA调试
TCP协议详解
软考高级系统架构设计师系列之:系统开发基础知识
MYSQL二阶段提交
Super like the keyboard made from zero, IT people love it
【密码学/密码分析】基于TMTO的密码分析方法
RTL8762DK UART(二)
What practical projects can machine learning beginners learn?
Cmake introductory study notes
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
OSF understands the agile development model in one minute
The IDEA can't find or unable to load The main class or Module "*" must not contain The source root "*" The root already belongs to The Module "*"
RTL8762DK WDG(六)
Rasa 3.x Study Series - Rasa - Issues 4918 Study Notes
Blueprint: Yang Hui's Triangular Arrangement