version 1.134, 2020/10/15 19:56:44
|
version 1.139, 2020/10/16 17:41:50
|
Line 174 every few weeks.
|
Line 174 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> |
|
|
|
## Boot Process |
|
|
|
https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md |
|
|
|
### DTBs |
|
|
|
Note that generally, a single dtb is loaded. On NetBSD 9, the dtb |
|
file for the system is loaded by the bootloader (in flash). |
|
|
|
The RPI bootloader looks for a magic string in a trailer after the kernel to determine if it should use DTB support (the new normal) or something called ATAG (apparently the old way). See https://github.com/raspberrypi/linux/commit/2367d8a42e2717d8d15a39a9085cc2909fae033a#diff-8f088aca645d10d79b594d58db4136f3e09caee077fe373bb08f02f2040900a9 for more information. |
|
|
|
### Kernel format variants |
|
|
|
In netbsd-8, only the ELF and bin variants of RPI2 are built. The bin version is used. |
|
|
|
In netbsd-9 releasedir/binary/kernels, the following 4 versions of GENERIC are produced. (This might be the same in current.) |
|
|
|
#### netbsd-GENERIC.gz |
|
|
|
This is regular ELF and not used on RPI. |
|
|
|
#### netbsd-GENERIC.bin.gz |
|
|
|
It is unclear why this file exists on 9. It seems to be like img, but without the trailer for DTB; this makes sense for 8. |
|
|
|
#### netbsd-GENERIC.img.gz |
|
|
|
On NetBSD >=9, the kernel with the .img suffix has the trailer to cause the bootloader to load DTB files. |
|
|
|
#### netbsd-GENERIC.ub.gz |
|
|
|
This is for u-boot and not used on RPI. |
|
|
## Configuring 802.11 |
## 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. |
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. |
Line 218 The program vcgencmd, referenced in the
|
Line 251 The program vcgencmd, referenced in the
|
|
|
## Updating dtb files |
## Updating dtb files |
|
|
|
### NetBSD 8 |
|
|
|
On NetBSD 8, dtb files are not used. (\todo Really?) |
|
|
|
### NetBSD 9 |
|
|
(This is harder than it should be.) |
(This is harder than it should be.) |
Build a release. gunzip the armv7.img, vnconfig it, and mount the MSDOS partition (e) e.g. on /mnt. Copy the dtb files from /mnt/foo.dtb to /boot, and from /mnt/dtb/foo.dtb to /mnt/dtb. |
Build a release. gunzip the armv7.img, vnconfig it, and mount the MSDOS partition (e) e.g. on /mnt. Copy the dtb files from /mnt/foo.dtb to /boot, and from /mnt/dtb/foo.dtb to /boot/dtb. |
|
|
|
It seems that some systems, including RPI, require dtb files in /boot, and some expect them in /boot/dtb. |
|
|
It seems that some systems, including RPI, require dtb files in /boot, and some expect them in /boot/dtb. |
\todo Explain if you only really need the right one for your system type. |
|
|
\todo Explain how one is supposed to be able to update these from the dtb files in releasedir/binary/kernel, or fix it to have the same structure. |
\todo Explain how one is supposed to be able to update these from the dtb files in releasedir/binary/kernel, or fix it to have the same structure. |
|
|
|
### NetBSD current |
|
|
|
When updating, ensure that /boot is mounted and that you unpack the dtb set. |
|
|
## Updating the firmware |
## Updating the firmware |
|
|
It is highly likely that running NetBSD from a given branch X with firmware from a branch Y < X will not go well. It is unclear if firmware from a branch Y > X will work. It is standard practice to use firmware from the right branch. |
It is highly likely that running NetBSD from a given branch X with firmware from a branch Y < X will not go well. It is unclear if firmware from a branch Y > X will work. It is standard practice to use firmware from the right branch. |
|
|
A section below describes the process of updating NetBSD's copy of the firmware from upstream, with testing, by NetBSD developers. This section is about updating a system's firmware from the firmware in a version of NetBSD. |
A section below describes the process of updating NetBSD's copy of the firmware from upstream, with testing, by NetBSD developers. This section is about updating a system's firmware from the firmware in a version of NetBSD. |
|
|