前言
本系列文章主要介绍树莓派的使用
一、 树莓派系统
1. 更新问题
pi@raspberrypi:~ $ sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Reading package lists... Done
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
解决方法:
先执行sudo apt update,都选y
再执行sudo apt-get update就会正常
pi@raspberrypi:~ $ sudo apt update
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [400 kB]
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.8 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [110 kB]
Fetched 13.6 MB in 38s (356 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
425 packages can be upgraded. Run 'apt list --upgradable' to see them.
pi@raspberrypi:~ $ sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
pi@raspberrypi:~ $
2. 更新内核
uname -a查看版本
uname -a
Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
到树莓派github上下载相应大版本的内核,下载linux-rpi-4.19.y (用最新版的有些问题),下载后是实际上是4.19.127
解压后进入目录,可以修改内核代码
树莓派4B输入
make bcm2711_defconfig
树莓派3B输入
make bcm2709_defconfig
输入
make -j4 zImage modules
编译完后:
sudo make modules_install
树莓派4B输入:
sudo cp arch/arm/boot/zImage /boot/kernel7l.img
树莓派3B输入:
sudo cp arch/arm/boot/zImage /boot/kernel7.img
重启后就是更新后的内核了
uname -a确认
uname -a
Linux raspberrypi 4.19.127-v7l #1 SMP Fri Dec 25 14:05:42 GMT 2020 armv7l GNU/Linux
dtb不用编译
新的内核可能存在适配问题,用最新的5.4.xx的版本有部分功能异常,如USB/音频