在树莓派上使用FireWire
Using FireWire on a Raspberry Pi

原始链接: https://www.jeffgeerling.com/blog/2026/firewire-on-a-raspberry-pi/

随着苹果在macOS中停止对FireWire的支持,需要一种解决方案来利用旧的FireWire设备,如DV摄像机和硬盘驱动器。作者转向了树莓派和Linux,尽管那里最终也会面临过时问题(大约在2029年)。 该设置涉及一个GeeekPi Mini PCIe HAT和一个StarTech Mini PCIe FireWire适配器,需要自定义Linux内核编译以启用FireWire支持。至关重要的是,由于旧FireWire控制器的限制,需要将Pi的PCIe总线配置为32位DMA。 配置完成后,Pi成功识别了FireWire控制器,并允许使用FireWire 400设备。作者使用了`dvgrab`软件从Canon GL1摄像机捕获视频,演示了成功的录制和交互控制。此设置为脚本编写和与Open MRU等项目的集成打开了可能性,通过r/tapeless subreddit发现,为旧的FireWire设备提供了持续的使用寿命。

## Raspberry Pi 上的 FireWire:Hacker News 总结 最近 Hacker News 上出现了一场关于在 Raspberry Pi 上使用 FireWire (IEEE 1394) 的讨论,起因是 jeffgeerling.com 上的一篇博文。尽管 FireWire 支持在一些 Linux 发行版(包括 Raspberry Pi OS)中默认情况下是缺失的,但可以启用它,从而连接到 MiniDV 摄像机和专业音频接口等旧设备。 用户分享了使用 `dvgrab` 在 Linux 上归档磁带的经验,以及将 FireWire 音频设备(Presonus 接口和混音器)与 Raspberry Pi 一起使用,作为老旧 iMac 的潜在替代方案。有人对高通道数(40+ 音频通道)的性能表示担忧,但有人认为 Pi 5 的处理能力以及使用 USB SSD 或网络存储等快速存储可以解决这个问题。 讨论还涉及了 Linux 内核中 FireWire 支持的未来,明确了虽然“已过时”,但它将得到积极维护和支持至 2029 年,甚至更久。 许多用户强调了 FireWire 在滑板运动(VX1000 摄像机)和专业视频/音频等利基领域的持续相关性。
相关文章

原文

After learning Apple killed off FireWire (IEEE 1394) support in macOS 26 Tahoe, I started looking at alternatives for old FireWire equipment like hard drives, DV cameras, and A/V gear.

Power Mac G4 MDD with Canon GL1 DV Camera importing footage into Final Cut Express

I own an old Canon GL1 camera, with a 'DV' port. I could plug that into an old Mac (like the dual G4 MDD above) with FireWire—or even a modern Mac running macOS < 26, with some dongles—and transfer digital video footage between the camera and an application like Final Cut Pro.

But with Apple killing off support, and my desire to have a modern, supported hardware solution, I turned to Linux and dvgrab.

Linux will likely drop support for IEEE 1394 in 2029, but at least that gives me three more years!

On a Raspberry Pi, I can plug in this GeeekPi Mini PCIe HAT, and connect a StarTech Mini PCIe FireWire adapter. This allows the Pi to recognize the FireWire controller:

$ lspci
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 PCI bridge: Texas Instruments XIO2213A/B/XIO2221 PCI Express to PCI Bridge [Cheetah Express] (rev 01)
0001:02:00.0 FireWire (IEEE 1394): Texas Instruments XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express] (rev 01)
0002:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0002:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge

But to use it, you have to recompile the Linux kernel with FireWire support, then configure the Pi's PCIe bus for 32-bit DMA support, since old FireWire controllers like the TI XIO2213A and VIA VT6315N don't support 64-bit access.

Recompile the Linux Kernel with Firewire support

Recompile the Linux kernel, enabling the following features:

  • CONFIG_FIREWIRE (Device Drivers -> IEEE 1394 (FireWire) support -> FireWire driver stack)
  • CONFIG_FIREWIRE_OHCI (Device Drivers -> IEEE 1394 (FireWire) support -> FireWire driver stack -> OHCI-1394 controllers)

Configure Pi Boot options

At the end of /boot/firmware/config.txt, under [all], add:

dtparam=pciex1
dtoverlay=pcie-32bit-dma

At the end of the line in /boot/firmware/cmdline.txt, add:

Reboot your Pi.

Using FireWire on the Pi

Canon GL1 connected to Raspberry Pi 5 via FireWire 400 Mini PCIe card

At this point, you should be able to use FireWire devices connected to the FireWire 400 port. If you want to use the FireWire 800 ports, you'll have to find a way to connect auxiliary power to the power header on the Mini PCIe card (StarTech provides an adapter for this).

All my devices are FireWire 400, so this was not a concern for me.

Using dvgrab (which can be installed with sudo apt install -y dvgrab), you can record clips from the camera in either camera or 'VCR' mode, for example:

$ sudo apt install -y dvgrab

$ dvgrab
Found AV/C device with GUID 0x000085000014e35a
libiec61883 error: Failed to get channels available.
Waiting for DV...
Capture Started
^C"dvgrab-002.dv":    45.89 MiB 401 frames timecode 00:00:00.00 date 2067.02.15 22:26:25
Capture Stopped

You can use dvgrab interactively, too:

$ dvgrab -i
Found AV/C device with GUID 0x000085000014e35a
libiec61883 error: Failed to get channels available.
Going interactive. Press '?' for help.
q=quit, p=play, c=capture, Esc=stop, h=reverse, j=backward scan, k=pause        
l=forward scan, a=rewind, z=fast forward, 0-9=trickplay, <space>=play/pause

I posted my first sample video recording with this setup over on GitHub.

DVgrab is straightforward, and can easily be used in scripts—something which I'll explore later with a prototype Firehat, and which would be useful for projects like Open MRU, both of which I found on the r/tapeless subreddit...

联系我们 contact @ memedata.com