树莓派4B 64位(arm64)系统配置系统源


转自https://blog.csdn.net/baidu_26678247/article/details/108930421

树莓派4B 64位(arm64)系统配置系统源

1、简介

2020年上半年,Raspberry Pi 4 发布了 8GB 内存版本,同时带来 64 位镜像,相较于32位镜像,在性能方面有很大提升。

操作系统镜像方面,现在 Raspberry Pi 支持 64 位,其包含与常规 32 位镜像相同的应用程序集和相同的桌面环境,不过只是针对 Debian arm64 构建的。同时,现在开始,32 位和 64 位操作系统镜像都不再使用“Raspbian”这一名称,改用新的统一的名称:Raspberry Pi OS,这样更便于用户识记。

树莓派镜像烧录不作过多介绍,本博文的Raspbian系统对应Debian10(buster),镜像站选用清华大学开源软件镜像站(tuna)。

2、64位系统配置(arm64版本)

64位镜像可以直接使用debian的系统源,首先需要编辑/etc/apt/sources.list,使用#号注释原内容,然后在末尾添加Debian的系统源:

1
2
3
4
5
6
7
8
9
10
11
12
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
</wyn>
   
    <ul class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li></ul>

接着需要配置树莓派官方的软件源,编辑/etc/apt/sources.list.d/raspi.list,同样的,注释原内容,在末尾添加如下内容:

1
2
3
4
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
</wyn>
   
    <ul class="pre-numbering"><li>1</li></ul>

3、32位系统配置(armhf版本)

两者配置方法一致,都是修改上述两个文件(64位系统也可以下述系统源),具体如下:

编辑 /etc/apt/sources.list 文件,注释原文件内容,用以下内容取代:

1
2
3
4
5
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
</wyn>
   
    <ul class="pre-numbering"><li>1</li><li>2</li></ul>

编辑 /etc/apt/sources.list.d/raspi.list 文件,注释原文件内容,用以下内容取代:

1
2
3
4
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
</wyn>
   
    <ul class="pre-numbering"><li>1</li></ul>

4、系统更新

系统源和软件源配置完成以后,使用下述两条命令更新:

1
2
3
4
5
sudo apt update
sudo apt upgrade -y
</wyn>
   
    <ul class="pre-numbering"><li>1</li><li>2</li></ul>