软件源码
在树莓派,我们致力于尽可能开源代码,以便您轻松使用并根据自身需求进行适配。树莓派专门为我们的产品开发和支持软件,并将精力集中在提供最佳用户体验的软件上。例如,优化多媒体加速的驱动程序,包括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
推荐软件应用程序,可安装或卸载精选程序。