From Fedora Project Wiki
Line 123: Line 123:
= 常见问题( FAQ ) =
= 常见问题( FAQ ) =


=== Why do I get a rainbow display when I try and power on my Raspberry Pi? ===
=== 为什么当我启动树莓派后显示器上会出现「彩虹条」? ===


There's a number of different reasons you might get rainbow output on the display when you're trying to boot as Raspberry Pi. The three common ones we see are:
多种原因可能会导致这种情况,常见以下三种:
* The power supply isn't strong enough. See [[Raspberry_Pi#Prerequisites | Prerequisites]] above.
* 电源供电不足。请参考上述[[Raspberry_Pi#Prerequisites | 前期准备]]部分。
* There's no OS installed. Check the SD card is properly in place and you've followed the instructions to write out the card.
* 没有安装系统。请检查 SD 卡是否正确安装且系统亦正确写入。
* Wrong edition of the Raspberry Pi. If you try and use Fedora on a Raspberry Pi 1 or Zero you'll get this as we don't support ARMv6 SoCs.
* 树莓派版本错误。由于 Fedora 不支持 ARMv6 芯片,所以在树莓派 1 代或树莓派零上会出现此类错误。


=== What desktop environments are supported? ===
=== 哪些桌面环境可用? ===


Both 3D/2D work out of the box and all desktops as shipped in Fedora should work just fine. There is an open source fully accelerated driver for the Video Core IV GPU.
Fedora 搭载的桌面环境都可用,而且 3D/2D 也是开箱即用的。这得益于针对视频核心 IV GPU 的开源加速驱动。


=== Will there be more enhancements to the hardware support ===
=== 会有更多针对硬件的增强支持吗?


Yes. New enhancements will be delivered when, and as soon as, they are ready via the standard Fedora updates mechanism. New significate features will be blogged about as they arrive either via [https://fedoramagazine.org/ Fedora Magazine] or the [http://fedoraplanet.org/ Fedora Planet].
会的。新的增强支持即将到来,只要完备就会在标准 Fedora 更新机制中分发。如果有新的重大特性,我们会通过 [https://fedoramagazine.org/ Fedora Magazine] [http://fedoraplanet.org/ Fedora Planet] 公布。


=== What about support for the Raspberry Pi Models A/A+, B/B+ (generation 1), Zero/ZeroW and Compute Module? ===
=== 关于 树莓派 A/A+ 型、 1 代 B/B+ 型、零/零W(Zero/ZeroW)以及计算模组(Compute Module)的支持情况如何? ===


THESE ARE NOT SUPPORTED!!!
这些都不支持!!!


Fedora doesn't, and NEVER will, support ARMv6 processors. There's been a number of attempts to support these over the years. The current best effort is Pignus based on Fedora 23. More information can be found at [https://pignus.computer the Pignus site]. We will support the new Compute Module 3 based on the same SoC as the Raspberry Pi 3 when it starts to ship.
Fedora 现在不会,将来也不会支持 ARMv6 处理器。近年来我们多次尝试过支持,最好的结果便是基于 Fedora 23 的 Pignus 。更多信息请访问 [https://pignus.computer Pignus 官网]。新的计算模组 3(Compute Module 3)发售后我们会跟进支持,因为它基于和树莓派 3 代相同的芯片。


=== Will Fedora 24 be supported? ===
=== Fedora 24 可以支持吗? ===


No. The small team is focused on the Fedora 25 release and rawhide to best focus resources. While possible to do there is reasonably significant amount of work to back port all the fixes that have gone into Fedora 25/rawhide back to stable releases. Fedora 25 is [[Releases/25/Schedule | released]] and is already very stable on the Raspberry Pi.
不支持。团队资源有限,重心会放在 Fedora 25 rawhide 上。While possible to do there is reasonably significant amount of work to back port all the fixes that have gone into Fedora 25/rawhide back to stable releases. Fedora 25 [[Releases/25/Schedule | 已经发布]]而且在树莓派上已经非常稳定了。


=== What USB devices are supported on the Raspberry Pi ===
=== 树莓派支持哪些 USB 设备? ===


You should be able to use most USB-2 compatible devices that are supported in Fedora on other devices. There are some limitations to the USB bus of the Raspberry Pi hardware as [https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md documented here].
大部分 USB-2 兼容设备在 Fedora 上都是支持的。树莓派硬件对于 USB 总线有一些限制,请参考[https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md 这里的文档]


=== Is the onboard WiFi and Bluetooth supported on the Raspberry Pi 3? ===
=== 树莓派上板载的 WiFi 和蓝牙支持吗? ===


==== Wifi: ====
==== WiFi:====


Wifi on the Raspberry Pi 3 is supported in Fedora 26 Alpha (4.11 rc3 kernel).
树莓派上板载的 WiFi 在 Fedora 26 Alpha(4.11 rc3 内核)上得以支持。


There's currently a file we can't currently redistribute you'll need to retrieve. This can be done either post first boot using onboard ethernet or when setting up the SD card. The command needed when running from a Raspberry Pi 3 is as follows. Once retrieved you just need to reboot and WiFi should be avaialble.
目前有一个文件你可能需要修改,不过我们暂时还不能参与再分发这个文件。你可以先用板载有线网络启动或者预先在 SD 卡中设置好。在树莓派 3 代中你可以执行如下命令,执行成功后重启即可使用 WiFi 了。


<pre>sudo curl https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.txt -o /lib/firmware/brcm/brcmfmac43430-sdio.txt</pre>
<pre>sudo curl https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.txt -o /lib/firmware/brcm/brcmfmac43430-sdio.txt</pre>


==== Bluetooth: ====
==== 蓝牙:====
It's currently untested but as it's attached to a serial port and is accessible it might work. It's only been briefly tested but in practice it tends to crash the entire device so is not currently recommended. Those interested can investigate further and potentially provide more informatin.
目前尚未测试,但是既然它属于串口而且可访问,应该也是可用的。只是简单测试过,但是在实际使用中常常会拖垮整个设备,所以不推荐。如果你感兴趣的话,欢迎深入研究一下,也许可以提供更多有用的信息。


For the brave you can test it with this command:
够胆的话,你可以用如下命令测试一下:


<pre>hciattach /dev/ttyAMA0 bcm43xx 3000000 noflow -</pre>
<pre>hciattach /dev/ttyAMA0 bcm43xx 3000000 noflow -</pre>


=== Does sound work? ===
=== 声音正常吗? ===


Initial support for HDMI audio output is in Fedora 26 Alpha (4.11rc3) though the analog port is not yet supported. Audio output via a USB audio interface should also work fine.
HDMI 音频输出自 Fedora 26 Alpha (4.11rc3)开始支持,但是模拟端口尚不支持。 USB 接口的音频输出应该也可以良好地支持。


=== Does the add-on camera work? ===
=== 外接摄像头可用吗? ===


Not currently. There is still ongoing work to support this upstream and add the appropriated media acceleration support.
暂不支持。 对流媒体和专用媒体加速器的支持尚需时日。


=== Does accelerated media decode work? ===
=== Does accelerated media decode work? ===

Revision as of 14:43, 1 May 2017

Idea.png
现在树莓派在 Fedora 25 Beta 及更新的版本中得到支持。Fedora 25 最终发布版的支持尚未经过时间考验,如果你遇到问题请反馈到 ARM 邮件列表或 IRC 频道。

引言

树莓派是一块信用卡大小、基于 ARM 的单板计算机(SBC)。Fedora 从 25 Beta 及更新的版本中开始原生支持树莓派 2 代和 3 代 B 型,无需再用第三方内核或脚本修改官方镜像。本文将介绍如何上手,以及关于支持情况会有哪些常见问题(FAQ)等。

支持的硬件

目前只支持树莓派 2 代和 3 代 B 型。

前期准备

  • 树莓派 2 代和 3 代 B 型
  • 高质量的 SD 卡 (eLinux 有一份兼容性列表)
  • HDMI 显示器或电视,一副 USB 键盘和鼠标
  • 合适的供电装置。 树莓派 2 代建议至少 2A, 3 代建议至少 2.5A。 详情请访问 [1]

制备 SD 卡还需要:

  • 一台运行 Windows 或 macOS 或 Linux 系统的电脑
  • SD 读卡器

下载 Fedora ARM 镜像

Fedora 25 已经原生支持树莓派,关于目前的特性请阅读 FAQ 。

Fedora 25 镜像可以从这里下载:

制备 SD 卡

你可以很容易地在 Fedora 或其他 Linux 发行版,或者 macOS 、Windows 上将镜像写入 SD 卡中。默认设置会提供 HDMI 显示器上的用户可视界面和对键盘鼠标的支持。如果你想输出到串行控制台,请参考 Section in the FAQ.

Fedora 或其他 Linux 发行版

脚本化

  • 使用 fedora-arm-installer

安装 arm-image-installer:

dnf install -y fedora-arm-installer

按照如下操作写入镜像:

$ sudo arm-image-installer

用法: arm-image-installer <选项>

   --image=IMAGE    - xz 压缩镜像文件名
   --target=TARGET  - 目标板
   --media=DEVICE   - 介质设备文件 (/dev/[sdX|mmcblkX])
   --selinux=ON/OFF - 按需要启用(ON)或关闭(OFF) SELinux
   --norootpass     - 移除 root 密码
   -y		    - 后续询问都选择「是」,不需要再次确认
   --version	    - 显示版本并退出
   --resizefs	    - 重新调整 root 文件系统大小以适配介质设备文件
   --addconsole     - 添加系统控制台到 extlinux.conf
   --addkey=        - 后接 ssh 公钥的路径

示例: arm-image-installer --image=Fedora-Rawhide.xz --target=Bananapi --media=/dev/mmcblk0

关于支持的版型,请参考 SUPPORTED-BOARDS 文件。

手动

 xzcat Fedora-IMAGE-NAME.raw.xz | sudo dd status=progress bs=4M of=/dev/XXX # Location of your media (will be sdX or mmcblkX depending on hardwae)

macOS

树莓派基金会提供了一些友好的说明,会指导你如何使用 macOS 写入镜像。 你只需简单地替换步骤中的文件路径和文件名即可。

微软 Windows

树莓派基金会提供了一些友好的说明,会指导你如何使用 Windows 写入镜像。 你只需简单地替换步骤中的文件路径和文件名即可。

调整 root 分区大小

为了压缩下载文件的体积,root 分区已被尽可能地调至最小。你需要手动重新调节。我们计划在 Fedora 25 正式发布之前使之可以自动调整分区大小。

在首次启动前调整

最简单的方法就是在首次启动 Linux 系统前使用 gparted 调整分区大小:

gparted /dev/XXX

初始化启动后调整

另一种机制就是在你启动树莓派并完成初始化建立帐户后进行调整。

# 扩增第 4 个分区(本示例中为 mmcblk0 )
growpart /dev/mmcblk0 4
# 扩展文件系统以使用全部可用空间
resize2fs /dev/mmcblk0p4
# 对于服务器(server)版镜像(由于使用了 xfs 文件系统)
xfs_growfs /dev/mmcblk0p4

首次启动树莓派上的 Fedora

  • 将 SD 卡插入树莓派。
  • 确保你的键盘、鼠标、网线、显示器已正确连接。
  • 连接树莓派电源开机。
  • 你会看到 Fedora 开始启动,最后会显示「初始化设置向导」。
  • 按照向导设置语言、时区并且创建用户。
  • 你会看到登录提示或开始向导(具体情况会由于你选择的桌面环境或定制版本的不同而有所差异)。

应用更新和安装软件

如果你执行的是标准化的安装步骤,那么在初始化设置完成之后,无需其他特殊操作,你就可以正常安装或升级软件。而且普通桌面环境下的升级机制,如 dnf 、gnome-software 或其他图形界面升级系统程序都可以正常支持。

寻求帮助与报告问题

如果出现异常该去哪里寻求帮助呢?以下是 Fedora 常规支持的论坛:

常见问题( FAQ )

为什么当我启动树莓派后显示器上会出现「彩虹条」?

多种原因可能会导致这种情况,常见以下三种:

  • 电源供电不足。请参考上述 前期准备部分。
  • 没有安装系统。请检查 SD 卡是否正确安装且系统亦正确写入。
  • 树莓派版本错误。由于 Fedora 不支持 ARMv6 芯片,所以在树莓派 1 代或树莓派零上会出现此类错误。

哪些桌面环境可用?

Fedora 搭载的桌面环境都可用,而且 3D/2D 也是开箱即用的。这得益于针对视频核心 IV GPU 的开源加速驱动。

=== 会有更多针对硬件的增强支持吗?

会的。新的增强支持即将到来,只要完备就会在标准 Fedora 更新机制中分发。如果有新的重大特性,我们会通过 Fedora MagazineFedora Planet 公布。

关于 树莓派 A/A+ 型、 1 代 B/B+ 型、零/零W(Zero/ZeroW)以及计算模组(Compute Module)的支持情况如何?

这些都不支持!!!

Fedora 现在不会,将来也不会支持 ARMv6 处理器。近年来我们多次尝试过支持,最好的结果便是基于 Fedora 23 的 Pignus 。更多信息请访问 Pignus 官网。新的计算模组 3(Compute Module 3)发售后我们会跟进支持,因为它基于和树莓派 3 代相同的芯片。

Fedora 24 可以支持吗?

不支持。团队资源有限,重心会放在 Fedora 25 和 rawhide 上。While possible to do there is reasonably significant amount of work to back port all the fixes that have gone into Fedora 25/rawhide back to stable releases. Fedora 25 已经发布而且在树莓派上已经非常稳定了。

树莓派支持哪些 USB 设备?

大部分 USB-2 兼容设备在 Fedora 上都是支持的。树莓派硬件对于 USB 总线有一些限制,请参考这里的文档

树莓派上板载的 WiFi 和蓝牙支持吗?

WiFi:

树莓派上板载的 WiFi 在 Fedora 26 Alpha(4.11 rc3 内核)上得以支持。

目前有一个文件你可能需要修改,不过我们暂时还不能参与再分发这个文件。你可以先用板载有线网络启动或者预先在 SD 卡中设置好。在树莓派 3 代中你可以执行如下命令,执行成功后重启即可使用 WiFi 了。

sudo curl https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.txt -o /lib/firmware/brcm/brcmfmac43430-sdio.txt

蓝牙:

目前尚未测试,但是既然它属于串口而且可访问,应该也是可用的。只是简单测试过,但是在实际使用中常常会拖垮整个设备,所以不推荐。如果你感兴趣的话,欢迎深入研究一下,也许可以提供更多有用的信息。

够胆的话,你可以用如下命令测试一下:

hciattach /dev/ttyAMA0 bcm43xx 3000000 noflow -

声音正常吗?

HDMI 音频输出自 Fedora 26 Alpha (4.11rc3)开始支持,但是模拟端口尚不支持。 USB 接口的音频输出应该也可以良好地支持。

外接摄像头可用吗?

暂不支持。 对流媒体和专用媒体加速器的支持尚需时日。

Does accelerated media decode work?

No. There's no upstream kernel support and it relies on code from a number of kernel subsystems to be supported.

Does HDMI-CEC work?

Yes. It current is supported using libcec packaged in Fedora.

Is the Raspberry Pi Touch Display supported?

Work on the official Raspberry Pi Touch Display is ongoing upstream and initial support has landed in the 4.10 kernel, being tracked upstream. Fedora will review any missing pieces for support soon. The touchscreen driver isn't yet releases upstream. Support for other displays is not currently planned.

Is the composite TV out supported?

The composite TV out is not currently supported in a stable Fedora release but the core support has landed upstream in the 4.10 kernel. There's some missing enabling patches currently which we will add to the Fedora kernel soon.

Are the expansion HATs supoorted?

The quick answer here is they are not currently supported.

The long answer is a lot more complex. Most of the hardware interfaces that are exposed by the 40 pin HAT connector are supported with drivers shipped with Fedora. Drivers for the hardware contained on a lot of the common HATs are also enabled and supported in Fedora. The core means of supporting the HAT add-on boards require the use of device tree overlays. The kernel and the u-boot 2016.09 boot-loader supports the loading over overlays manually. Currently there is no upstream consensus on the means of autoloading these overlays by means of an "overlay manager" (also known as Cape Manager and by numerous other names) by reading the EEPROM ID and loading the appropriate overlay automatically. There's also no consensus on the extensions to the dtc (Device Tree Compiler) to build the binary blob overlays, and no consensus of the exact format of the overlay file. There is now a group of people working to resolve this issue which enable Fedora to better support HATs (Raspberry Pi), Capes (BeagleBone), DIPs (C.H.I.P) and Mezzanine (96boards) before long.

The first focus HAT to support will be the official Raspberry Pi Sense HAT. This will be documented using the manual process to build and load the overlay to provide access to the onboard devices as a means of demonstrating how this process works for those wishing to use this manual method in the interim. The link to this documentation will be added here once that is complete.

Are Device Tree Overlays supported?

There's basic support for overlays in u-boot and the linux kernel but an overlay manager isn't yet upstream. There's

Is GPIO supported?

GPIO isn't supported well as they need to be mapped with Device Tree overlays. This will be improved in the F-25 cycle, and in Fedora 26.

Is SPI supported?

Yes, basic SPI is supported.

Is I2C supported?

Yes, basic I2C is supported.

Raspberry Pi 3 aarch64 support

The focus for Fedora 25 with the limited time and resources available, was to provide a polished experience with a single disk image for both the Raspberry Pi 2 and 3. At the time the work started it wasn't clear whether the aarch64 kernel support would land upstream in time. The intention is to officially support the Raspberry Pi 3 as an aarch64 device in Fedora 26. There has been significant enabling work in Fedora 25 but there is still quite a bit more work to do to finish the aarch64 support at time of writing.

How do I use a serial console?

The serial console is disabled by default on the Raspberry Pi 2 and 3 because it requires the device to run at significantly slower speeds. To wire up the USB to TTL adapter follow this guide from Adafruit. You'll need a 3.3 volt USB to TTL Serial Cable like this one from Adafruit

To enable the serial console follow the specific steps for the Raspberry Pi 2 or 3 as they both differ slightly:

Raspberry Pi 2:

  • inset the micro SD card into a PC
  • on the VFAT partition edit the config.txt file and uncomment the enable_uart line:
enable_uart=1
  • on the boot partition edit the extlinux/extlinux.conf file adding "console=tty0 console=ttyAMA0,115200" to the end of the append line so it looks similar to:
append ro root=UUID="LARGE UUID STRING OF TEXT" console=tty0 console=ttyAMA0,115200
  • Safely unmount the micro SD card
  • Insert micro SD into Raspberry Pi, connect serial console, power on

Raspberry Pi 3:

  • inset the micro SD card into a PC
  • on the VFAT partition edit the config.txt file and uncomment the enable_uart line:
enable_uart=1
  • on the boot partition edit the extlinux/extlinux.conf file adding "console=tty0 console=ttyS0,115200" to the end of the append line so it looks similar to:
append ro root=UUID="LARGE UUID STRING OF TEXT" console=tty0 console=ttyS0,115200
  • Safely unmount the micro SD card
  • Insert micro SD into Raspberry Pi, connect serial console, power on