--- wikisrc/ports/evbarm/raspberry_pi.mdwn 2020/06/19 13:15:51 1.129 +++ wikisrc/ports/evbarm/raspberry_pi.mdwn 2020/09/05 12:54:33 1.130 @@ -1,6 +1,6 @@ [[!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) 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 still 32-bit (aarch32) centric, even though as of mid 2020 aarch64 is also a normal 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 still 32-bit (aarch32) centric, even though as of mid-2020 aarch64 is also a normal approach. Initial, limited, Raspberry Pi support was introduced in NetBSD 6.0. NetBSD 7.0 added 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. NetBSD 9 supports aarch64, meaning using the newer processors in 64-bit mode (via -current in mid 2018). @@ -78,7 +78,7 @@ Note that one can run a build of earmv6h In theory the code compiled for earmv7hf will be faster, but anecdotal experience is that it doesn't matter that much. \todo Post a link to a quality benchmark. -While the evbarm port has "eb" variants (for big-endian mode), the RPI systems do not support eb and these variants will not work. Systems built with older CPU architectures (earm, earmv4, earmv5) are not expected to work on RPI. +While the evbarm port has "eb" variants (for big-endian mode), the RPI systems do not support eb and these variants will not work. Systems built for older CPU architectures (earm, earmv4, earmv5) are not expected to work on RPI. The RPI2-1.2 and RPI3 have an armv8 CPU that supports aarch64 (64-bit mode) in addition to aarch32 (regular 32-bit ARM). This is supported, @@ -93,7 +93,7 @@ referred to as [[NetBSD/aarch64|aarch64] The Raspberry Pi looks for firmware and kernel.img on the first FAT32 MBR partition of the uSD card. A separate kernel (kernel7.img) is used on RPI2 and RPI3. The NetBSD kernel will then find NetBSD MBR partition and within that the root disklabel partition, and use that FFS partition as the root filesystem. -A 2 GB card is the smallest workable size, and the installation image will fit. After the first boot, the system resizes the NetBSD root partition to fill the card. Note that swap is after /boot and before /, and not contained in the NetBSD fdisk partition. However, if you don't try to change the partition structure, this should not cause you any trouble. +A 2 GB card is the smallest workable size that the installation image will fit on. After the first boot, the system resizes the NetBSD root partition to fill the card. Note that swap is after /boot and before /, and not contained in the NetBSD fdisk partition. However, if you don't try to change the partition structure, this should not cause you any trouble. Note that SD cards generally have limited write tolerance, so you may wish to disable atime updates via the noatime option, as is done by the default installation. @@ -121,7 +121,7 @@ Consider setting RELEASEMACHINEDIR if yo NetBSD provides nightly builds on [nycdn.netbsd.org](https://nycdn.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 first-time NetBSD/RPI users, is https://nycdn.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 ### release layout @@ -162,7 +162,7 @@ build.sh (and hence the FTP site) also c - Connect an Ethernet cable from the RPI to a LAN with a DHCP server, and another host you can use for ssh. - Power on the RPI, and wait. Watch the logs on the DHCP server, and find the IP address assigned to the RPI. - - Use ssh to login to the address you found with user "sysinst", and password "netbsd". + - Use ssh to log in to the address you found with user "sysinst", and password "netbsd". - When installing, ensure that you enable DHCP and ssh, so that you can log in again after the system is installed. The rpi_inst.img.gz image will only work for systems that use earmv6hf kernels (so not RPI2/3). See [this port-arm message](https://mail-index.netbsd.org/port-arm/2017/08/18/msg004374.html) for details. @@ -189,7 +189,7 @@ Note that the built-in WiFi in the RPI3 The following pages have been published by NetBSD community members. (Note that some of them are old.) - - https://www.cambus.net/netbsd-on-the-raspberry-pi/ + - # Maintaining a system @@ -234,7 +234,7 @@ One wrinkle in the standard approach is An alternate approach is to have the boot FAT32 partition as above, but to have the entire system including root on an external disk. This is configured by changing root=ld0a to root=sd0a or root=dk0 (depending on disklabel/GPT). Besides greater space, part of the point is to avoid writing to the uSD card. -A third approach, workable on the Pi 3 only, is to configure USB host booting (already enableed on the 3+; see the upstream documentation) and have the boot partition also on the external device. In this case the external device must have an MBR because the hardware's first-stage boot does not have GPT support. In theory the [procedure to program USB host boot mode](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md) will function on a NetBSD system because the programming is done by bootcode.bin. +A third approach, workable on the Pi 3 only, is to configure USB host booting (already enabled on the 3+; see the upstream documentation) and have the boot partition also on the external device. In this case the external device must have an MBR because the hardware's first-stage boot does not have GPT support. In theory the [procedure to program USB host boot mode](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md) will function on a NetBSD system because the programming is done by bootcode.bin. \todo Confirm that putting program_usb_boot_mode=1 in config.txt and booting works to program the OTP bit. Confirm that one can then boot NetBSD from external USB. There is no well-defined USB enumeration order, so the preferred approach if one has multiple USB mass storage devices is to use named wedges in both fstab and cmdline.txt. @@ -243,7 +243,7 @@ There is no well-defined USB enumeration \todo Verify this, and add any necessary cautions about boot code. -The aarch64 kernel can run aarch32 binaries, so one can boot a aarch64 kernel on a system with aarch32 userland. +The aarch64 kernel can run aarch32 binaries, so one can boot an aarch64 kernel on a system with an aarch32 userland. # X11 and GPU