version 1.130, 2020/09/05 12:54:33
|
version 1.131, 2020/10/15 19:27:27
|
Line 203 The program vcgencmd, referenced in the
|
Line 203 The program vcgencmd, referenced in the
|
|
|
## Updating the kernel |
## Updating the kernel |
|
|
- Build a new kernel, e.g. using build.sh. It will tell you where the ELF version of the kernel is, e.g. |
- Run uname -a to determine the name of the config of your current kernel. For NetBSD <= 8, one ran RPI or RPI2. For NetBSD >=9, one uses GENERIC. |
|
- Build a new kernel, e.g. using build.sh. Ideally, run "build.sh release" and look in releasedir/binary/kernels. If building just a kernel, it will tell you where the ELF version of the kernel is, e.g. |
... |
... |
Kernels built from RPI2: |
Kernels built from GENERIC: |
/Users/feyrer/work/NetBSD/cvs/src-current/obj.evbarm-Darwin-XXX/sys/arch/evbarm/compile/RPI2/netbsd |
/Users/feyrer/work/NetBSD/cvs/src-current/obj.evbarm-Darwin-XXX/sys/arch/evbarm/compile/GENERIC/netbsd |
... |
... |
|
- There are multiple kernel formats produced by a release build, for use with different boot loader schemes.. For GENERIC: |
- Besides the "netbsd" kernel in ELF format, there is also a "netbsd.img" (for current) or "netbsd.bin" (for 7 and 8) kernel that is in a format that the Raspberry can boot. |
- netbsd-GENERIC: A normal kernel in ELF format. |
|
- netbsd-GENERIC.img: In NetBSD >= 9, formatted for the RPI bootloader. |
|
- netbsd-GENERIC.bin: In NetBSD <= 8, formatted for the RPI bootloader. In NetBSD >= 9, ?????? In NetBSD 9, this kernel WILL NOT boot. |
|
- netbsd-GENERIC.ub: A kernel in uboot format. |
- Depending on your hardware version, copy this either to /boot/kernel.img (First generation Pi, Pi Zero hardware) or to /boot/kernel7.img (Pi 2, Pi 3 hardware) |
- Depending on your hardware version, copy this either to /boot/kernel.img (First generation Pi, Pi Zero hardware) or to /boot/kernel7.img (Pi 2, Pi 3 hardware) |
- reboot |
- reboot |
|
|
\todo Explain if updating firmware is necessary when e.g. moving from 8 to 9, or 9 to current. |
\todo Explain if updating firmware is necessary when e.g. moving from 8 to 9, or 9 to current. |
|
|
|
## Updating dtb files |
|
|
|
(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/*.dtb to /boot, and from /mnt/dtb/*.dtb to /mnt/dtb. |
|
|
|
It seems that some systems, including RPI, require dtb files in /boot, and some expect them in /boot/dtb. |
|
|
|
\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. |
|
|
## 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. |
|
|
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. |
|
|
|
(Updating the firmware 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 files from that to /boot that have changes, carefully. |
|
|
|
Relevant files include bootcode.bin, start.elf and start_cd.elf. |
|
|
|
Compare cmdline.txt, but beware that just overwriting it will lose customizations like using the serial console instead of the framebuffer. |
|
|
\todo Explain where the firmware is in the source tree, and note that it is not 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 where the firmware is in the source tree, and note that it is not 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. |
\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. |