软件源码
在树莓派,我们致力于尽可能开源代码,以便您轻松使用并根据自身需求进行适配。树莓派专门为我们的产品开发和支持软件,并将精力集中在提供最佳用户体验的软件上。例如,优化多媒体加速的驱动程序,包括3D加速、HEVC解码、摄像头成像管道、AI加速、双HDMI及 音频功能。
在树莓派操作系统中查找软件源
在寻找随树莓派操作系统分发的软件时,通常存在上游软件源,我们会对其打补丁以创建下游软件包(即标记为+rpt的软件包)。要查看这些软件包的源代码,通常通过apt获取更为便捷。为此,您需要先编辑apt源列表以包含源代码包。请修改下列文件中所有“Types: deb”行,将其替换为“Types: deb deb-src”:
/etc/apt/sources.list.d/debian.sources(64位镜像)
或
/etc/apt/sources.list.d/raspbian.sources(32位镜像)
以及
/etc/apt/sources.list.d/raspi.sources
随后必须更新软件包列表:
sudo apt update
现在可获取软件包源,例如:
apt source labwc
随后需安装辅助软件包:
sudo apt install devscripts
最后,您可以使用标准的Debian构建流程来构建该软件包。
sudo apt build-dep labwc
cd labwc-0.8.4
debuild -uc -us
我们的 GitHub 组织
您还可以在 GitHub 仓库中以更标准的形式找到我们的软件。我们使用三个 GitHub 组织来存储源代码:
分类源代码列表
以下是精选的、大多数人感兴趣的仓库列表:
核心源代码
https://github.com/raspberrypi/linux
该仓库包含支持所有树莓派版本(从Pi 1到Pi 5)的下行Linux内核源代码。
https://github.com/raspberrypi/firmware
此仓库包含闭源固件,但以下两个链接仍具参考 价值:
https://github.com/raspberrypi/rpi-eeprom
适用于树莓派4和树莓派5引导加载程序EEPROM的安装脚本及二进制文件,包含版本发布和版本说明。
库与应用程序
https://github.com/raspberrypi/utils
包含实用工具集合,如 pinctrl、piolib 和 raspinfo,以及 gpiolib——一种支持树莓派直接访问 GPIO 引脚的方法。
https://github.com/raspberrypi/libcamera
用于控制树莓派 ISP 和摄像头的 libcamera 库实现。
https://github.com/raspberrypi/rpicam-apps
基于libcamera的C++库及应用套件,用于树莓派摄像头的图像/视频处理与编码。
https://github.com/raspberrypi/picamera2
用于操作和 控制树莓派摄像头的Python库。
https://github.com/raspberrypi/drmu
用于直接控制和访问多媒体接口的库。
桌面环境
https://github.com/raspberrypi-ui/rpd-metas
用于创建桌面的元包。
https://github.com/raspberrypi-ui/wf-panel-pi
在基于Wayland的桌面环境运行时,显示于屏幕顶部的任务栏。
https://github.com/raspberrypi-ui/lxpanel-pi
运行传统X窗口系统桌面时显示在屏幕顶部的任务栏。
https://github.com/raspberrypi-ui/pplug-batt
https://github.com/raspberrypi-ui/pplug-bluetooth
https://github.com/raspberrypi-ui/pplug-clock
https://github.com/raspberrypi-ui/pplug-cpu
https://github.com/raspberrypi-ui/pplug-cputemp
https://github.com/raspberrypi-ui/pplug-ejecter
https://github.com/raspberrypi-ui/pplug-gpu
https://github.com/raspberrypi-ui/pplug-menu
https://github.com/raspberrypi-ui/pplug-netman
https://github.com/raspberrypi-ui/pplug-power
https://github.com/raspberrypi-ui/pplug-updater
https://github.com/raspberrypi-ui/pplug-volumepulse
任务栏上显示的插件。
https://github.com/raspberrypi-ui/pcmanfm
https://github.com/raspberrypi-ui/libfm
桌面使用的文件管理器,同时显示桌面背景。
https://github.com/raspberrypi-ui/rpcc
控制中心应用程序。
https://github.com/raspberrypi-ui/rc_gui
控制中心的树莓派配置插件。
https://github.com/raspberrypi-ui/appset
控制中心的外观设置插件。
https://github.com/raspberrypi-ui/rasputin
控制中心的鼠标和键盘设置插件。
https://github.com/raspberrypi-ui/raindrop
控制中心的屏幕配置插件。
https://github.com/raspberrypi-ui/rpinters
控制中心的打印机设置插件。
应用程序
https://github.com/raspberrypi-ui/agnostics
用于检查SD卡的诊断应用程序。
https://github.com/raspberrypi-ui/bookshelf
书架应用程序代码,支持下载并阅读电子书及《树莓派官方杂志》过刊。
https://github.com/raspberrypi-ui/piclone
SD卡复制应用程序,支持克隆存储卡及驱动器。
https://github.com/raspberrypi-ui/rp-prefapps
推荐软件应用程序,可安装或卸载精选程序。
调试
https://github.com/raspberrypi/rpi-analyse-boot
一款启动分析服务,可从多种 不同来源收集启动时指标数据。
工具
https://github.com/raspberrypi/rpi-imager
树莓派映像工具应用程序的代码,用于将操作系统刷写至SD卡。
https://github.com/raspberrypi/rpi-image-gen
用于为嵌入式树莓派系统开发操作系统的构建系统。
https://github.com/raspberrypi/usbboot
通过USB引导树莓派的工具,用于配置计算模块和树莓派设备。
https://github.com/raspberrypi/rpi-sb-provisioner
一款用于批量配置树莓派设备的工具(支持树莓派5、计算模块4和计算模块5)。
反馈渠道
http://github.com/raspberrypi/trixie-feedbackk
专用于当前树莓派操作系统版本的错误报告仓库。
Raspberry Pi Pico
https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico
此处可下载并安装适用于 Raspberry Pi Pico SDK 的 Microsoft Visual Studio Code 扩展。
https://github.com/raspberrypi/pico-setup
用于命令行操作的树莓派Pico SDK快速安装工具。
https://github.com/raspberrypi/pico-sdk
树莓派Pico SDK源代码。
https://github.com/raspberrypi/debugprobe
树莓派调试探针源代码,轻松提供SWD和UART接口。
https://github.com/raspberrypi/openocd
树莓派下游OpenOCD源代码。
https://github.com/raspberrypi/pico-examples
树莓派Pico示例代码库。
https://github.com/raspberrypi/picotool
用于在BOOTSEL模式下与RP系列设备交互的工具。
中文翻译版以英文版相同知识授权方式共享:CC-BY-SA 4.0。交流 Q群:498908352