--- wikisrc/ports/evbarm/raspberry_pi.mdwn 2018/11/06 17:26:24 1.95 +++ wikisrc/ports/evbarm/raspberry_pi.mdwn 2018/11/06 18:16:43 1.100 @@ -50,8 +50,13 @@ Initial, limited, Raspberry Pi support w - Raspberry Pi 3 uses "earmv7hf". - Raspberry Pi Zero W uses "\todo". -Note that one can run earmv6hf code on the 2 and 3. See also -[[NetBSD/aarch64|aarch64]] for running the Pi 2/3 in 64-bit mode. +Note that one can run earmv6hf userland code on the 2 and 3. In theory the code compiled for earmv7hf will be faster. \todo Benchmark and explain. \todo Explain if one can run the earmv6hf RPI2 kernel on RPI1. \todo Explain if the earmv6hf rpi.img.gz will run on a RPI2/3. + +\todo Explain if one can run "eb" variants. (However, using eb is likely to find more bugs because almost everyone uses el. That can either be a reason to run it or not run it.) + +\todo Explain if systems built with earm or earmv5 will work on RPI or RPI2/3. + +See also [[NetBSD/aarch64|aarch64]] for running the Pi 2/3 in 64-bit mode. # Installation @@ -72,7 +77,7 @@ See also "ebijun's image", below, which ## Getting bits to install -You can either build a release yourself with build.sh, or get a release from the NetBSD HTTPS/FTP servers. The bits from both sources should match, except for things like timestamps, or because the sources are slightly different along branches. +You can either build a release yourself with build.sh, or get a release from the NetBSD HTTPS/FTP servers. The bits from both sources should match, except for things like timestamps, or because the sources are from slightly different points along branches. ### Building yourself @@ -86,14 +91,16 @@ Consider setting RELEASEMACHINEDIR if yo ### NetBSD autobuild HTTPS/FTP servers -NetBSD provides nightly builds on [nyftp.netbsd.org](https://nyftp.netbsd.org/pub/NetBSD-daily/). These are equivalent to building yourself. The next directory level is the branch being built (netbsd-7, netbsd-8, HEAD, and more), plus optionally things like compiler type. It is followed by date/time, e.g. "HEAD/201811051650Z"; once a build is complete the symlink "latest" is adjusted to point to it. The next level is "${MACHINE}-${MACHINE_ARCH}", e.g. "evbarm-earmv7hf", and multiple combinations are provided. +NetBSD provides nightly builds on [nyftp.netbsd.org](https://nyftp.netbsd.org/pub/NetBSD-daily/). The next directory level is the branch being built (netbsd-7, netbsd-8, HEAD, and more), plus optionally things like compiler type. It is followed by date/time, e.g. "HEAD/201811051650Z"; once a build is complete the symlink "latest" is adjusted to point to it. The next level is "${MACHINE}-${MACHINE_ARCH}", e.g. "evbarm-earmv7hf", and multiple combinations are provided. -An example URL, arguably the standard approach for beginners, is https://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-8/latest/evbarm-earmv7hf/binary/gzimg/ +An example URL, arguably the standard approach for first-time NetBSD/RPI users, is https://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-8/latest/evbarm-earmv7hf/binary/gzimg/ ### release layout +Once you get to the releasedir, self-built and autobuild releases have the same structure. + - The 'evbarm-earmv6hf/binary/gzimg/' directory contains an rpi.img file that will run on any of the RPI boards. - - The 'evbarm-earmv7hf/binary/gzimg/' directory contains an armv7.img file that uses the armv7 instruction set, and thus can run only on the Raspberry Pi 2/3, but is also faster than rpi.img. + - The 'evbarm-earmv7hf/binary/gzimg/' directory contains an armv7.img file that uses the armv7 instruction set, and thus can run only on the Raspberry Pi 2/3. \todo Explain why there is no armv7_inst.gz. @@ -142,6 +149,14 @@ 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) +## Configuring 802.11 + +After installation, the Ethernet will function as on any other NetBSD system; simply enable dhcpcd or configure a static address. USB WiFi devices will also function as on any other NetBSD system; in addition to dhcpcd or static, configure and enable wpa_supplicant. + +Note that the built-in WiFi in the RPI3 is not yet supported. USB WiFi interfaces (that work on NetBSD in general) should all work. In particular, the following are known to work: + + - urtwn0: Realtek (0xbda) 802.11n WLAN Adapter (0x8176), rev 2.00/2.00, addr 5, MAC/BB RTL8188CUS, RF 6052 1T1R + ## Links The following pages have been published by NetBSD community members. (Note that some of them are old.) @@ -173,6 +188,8 @@ A section below describes the process of \todo Explain where the firmware is in the source tree, and if it is in the installed system image (such as /usr/mdec). Explain how to update a system (presumably /boot) from either an installed system's new firmware files, or the source tree. Explain any particular cautions. +\todo Explain if using updated firmware from one branch (e.g. netbsd-current) on a system using a different branch (e.g. netbsd-8) is safe. Explain if pullups are done to release branches with new firmware. + ## Booting The device boots by finding a file "bootcode.bin". The primary location is a FAT32 partition on the uSD card, and an additional location is on a USB drive. See the [upstream documentation on booting](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/) and read all the subpages. @@ -188,20 +205,6 @@ A third approach, workable on the Pi 3 o \todo Explain USB enumeration and how to ensure that the correct boot and root devices are found if one has e.g. a small SSD for the system and a big disk. -# Wireless Networking - -Note that the built-in WiFi in the RPI3 is not yet supported. USB WiFi interfaces (that work on NetBSD in general) should all work. - - - A Realtek 802.11n USB adaptor configures as urtwn(4). - - Configure with wpa_supplicant in /etc/rc.conf - - - ifconfig_urtwn0=dhcp - dhcpcd=YES - dhcpcd_flags="-q -b" - wpa_supplicant=YES - wpa_supplicant_flags="-B -i urtwn0 -c /etc/wpa_supplicant.conf" - - A sample wpa_supplicant.conf can be found at /usr/share/examples/wpa_supplicant/wpa_supplicant.conf - # X11 and GPU ## Console font @@ -266,3 +269,4 @@ anita has support for evbarm. Install q \todo Explain how to select various RPI models to emulate. \todo Explain about how DTB works. +\todo Give a command line example to run qemu (without anita).