--- wikisrc/ports/evbarm/raspberry_pi.mdwn 2018/10/30 23:09:40 1.78 +++ wikisrc/ports/evbarm/raspberry_pi.mdwn 2018/10/30 23:20:06 1.80 @@ -136,8 +136,7 @@ every few weeks. ## vcgencmd -The program vcgencmd can be found in pkgsrc/misc/raspberrypi-userland. - +The program vcgencmd, referenced in the boot section, can be found in pkgsrc/misc/raspberrypi-userland. ## Updating the kernel @@ -160,7 +159,7 @@ TODO: Explain where the firmware is in t ## 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. +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. The standard approach is to use a uSD card, with a fdisk partition table containing a FAT32 partition marked active, and a NetBSD partition. The NetBSD partition will then contain a disklabel, pointing to an FFS partition (a), a swap paritiion (b) and the FAT32 boot partition mounted as /boot (e). The file /boot/cmdline.txt has a line to set the root partition. @@ -168,8 +167,8 @@ 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. \todo Explain if this has been observed to work. -\todo 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 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. +\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. \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.