version 1.116, 2018/12/23 15:53:14
|
version 1.121, 2019/09/02 20:48:37
|
Line 1
|
Line 1
|
[[!meta title="NetBSD/evbarm on Raspberry Pi"]] |
[[!meta title="NetBSD/evbarm on Raspberry Pi"]] |
|
|
This page describes the NetBSD/evbarm port on [Raspberry Pi](http://www.raspberrypi.org) hardware. All [board variants](https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications) are believed supported, and specific boards know to work are listed. We use e.g. "RPI2" to refer to "Raspberry Pi 2" to save precious bytes on this page. This web page is 32-bit (aarch32) centric, as that has been until mid-2018 the only approach. |
This page describes the NetBSD/evbarm port on [Raspberry Pi](http://www.raspberrypi.org) hardware. All [board variants](https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications) earlier than the RPI4 are believed supported, and specific boards known to work are listed. We use e.g. "RPI2" to refer to "Raspberry Pi 2" to save precious bytes on this page. This web page is 32-bit (aarch32) centric, as that has been until mid-2018 the only approach. |
|
|
Initial, limited, Raspberry Pi support was introduced in NetBSD 6.0. NetBSD 7.0 adds complete support for the board, along with introducing support for the quad-core Raspberry Pi 2 board. Raspberry Pi 3 support was added for NetBSD 8, and backported to NetBSD 7 in July of 2017. (This page assumes those using NetBSD 7 are using 7.2 or later, but note that everyone uses 8 or -current.) |
Initial, limited, Raspberry Pi support was introduced in NetBSD 6.0. NetBSD 7.0 adds complete support for the board, along with introducing support for the quad-core Raspberry Pi 2 board. Raspberry Pi 3 support was added for NetBSD 8, and backported to NetBSD 7 in July of 2017. (This page assumes those using NetBSD 7 are using 7.2 or later, but note that everyone uses 8 or -current.) |
|
|
In mid-2018, -current gained support for 64-bit ARM (aarch64) support. |
In mid-2018, -current gained support for 64-bit ARM (aarch64) support. This will be in NetBSD 9. |
|
|
[[images/raspberrypi.jpg]] |
[[images/raspberrypi.jpg]] |
|
|
Line 48 In mid-2018, -current gained support for
|
Line 48 In mid-2018, -current gained support for
|
|
|
## What needs work |
## What needs work |
|
|
|
- RPI4 (almost certainly; not clear) |
- USB (host); isochronous transfers. |
- USB (host); isochronous transfers. |
- RPI3, RPI0W builtin WiFi |
- RPI3, RPI0W builtin WiFi |
- RPI0W Bluetooth Low Energy (probably) |
- RPI0W Bluetooth Low Energy (probably) |
Line 163 is based on NetBSD-current and is built
|
Line 164 is based on NetBSD-current and is built
|
work on Raspberry Pi 1, 2 and 3. This image is typically updated |
work on Raspberry Pi 1, 2 and 3. This image is typically updated |
every few weeks. |
every few weeks. |
|
|
- [https://github.com/ebijun/NetBSD/blob/master/RPI/RPIimage/Image/README](https://github.com/ebijun/NetBSD/blob/master/RPI/RPIimage/Image/README) |
- <https://github.com/ebijun/NetBSD/blob/master/RPI/RPIimage/Image/README> |
|
|
## Configuring 802.11 |
## Configuring 802.11 |
|
|
Line 251 Using [emulators/retroarch](http://pkgsr
|
Line 252 Using [emulators/retroarch](http://pkgsr
|
|
|
- Install [emulators/retroarch](http://pkgsrc.se/emulators/retroarch) |
- Install [emulators/retroarch](http://pkgsrc.se/emulators/retroarch) |
- Install the libretro core for the system you would like to emulate (lets take [emulators/libretro-gambatte](http://pkgsrc.se/emulators/libretro-gambatte), a GameBoy Color emulator, as an example). |
- Install the libretro core for the system you would like to emulate (lets take [emulators/libretro-gambatte](http://pkgsrc.se/emulators/libretro-gambatte), a GameBoy Color emulator, as an example). |
- Plug in a USB HID compatible Gamepad, such as the Logitech F710 in "DirectInput" mode (set "D/X" switch to "D"). |
- Make sure your user has read and write permissions on `/dev/vchiq`. |
- Initially you might want to configure your gamepad in X11 using keyboard controls. Set the following in $HOME/.config/retroarch.cfg: |
- Plug in a USB HID compatible Gamepad, such as the Logitech F710 in "DirectInput" mode (set "D/X" switch to "D"). Note that since the framebuffer GL driver will not allow for keyboard input in RetroArch, you will have to copy your joypad configuration from another system. |
video_driver = "sdl2" |
- Configure retroarch by editing $HOME/.config/retroarch/retroarch.cfg: |
menu_driver = "rgui" |
|
- After you are done configuring your gamepad in RetroArch and have saved your configuration, you probably want to use the OpenGLES driver which runs in the framebuffer outside of X11 for better performance and latency. Change video_driver in retroarch.cfg: |
|
video_driver = "gl" |
video_driver = "gl" |
- Then exit X11 and run retroarch. |
input_driver = "null" |
|
joypad_driver = "sdl2" |
|
menu_driver = "rgui" |
|
|
# Developer notes |
# Developer notes |
|
|
Line 286 Tests should be run on all of `rpi[0123]
|
Line 287 Tests should be run on all of `rpi[0123]
|
See the anita section in the evbarm page. |
See the anita section in the evbarm page. |
|
|
It is not currently known how to emulate a RPI in qemu, and therefore anita does not yet have support for this. \todo Add a command-line example to run qemu emulating some RPI model. |
It is not currently known how to emulate a RPI in qemu, and therefore anita does not yet have support for this. \todo Add a command-line example to run qemu emulating some RPI model. |
|
|
|
|
|
# Misc notes |
|
Miscellaneous notes about Raspberry PI. |
|
|
|
## Power supply needed (or: why there is a little rainbow square in the top-right corner?) |
|
Raspberry Pi devices are powered by 5V micro USB and a 2.5A (2500mA) |
|
power supply is reccomended. For more information please read: |
|
|
|
<https://www.raspberrypi.org/documentation/faqs/#pi-power> |
|
|
|
Power glitches can also manifest in other ways, e.g. with an USB |
|
disk plugged: |
|
|
|
[[!template id=programlisting text=""" |
|
sd0(umass0:0:0:0): generic HBA error |
|
sd0: cache synchronization failed |
|
"""]] |
|
|
|
Using a reccomended power supply avoid such issues. |
|
|
|
## Xenon death flash (Raspberry Pi 2 is camera-shy) |
|
When using laser pointers or xenon flashes in cameras (or other |
|
flashes of high-intensity long-wave light) against a Raspberry Pi |
|
2 the Pi can power itself off. |
|
For more information please read: |
|
|
|
<https://www.raspberrypi.org/blog/xenon-death-flash-a-free-physics-lesson/> |