Skip to content

Commit

Permalink
Document os_prefix, overlay_prefix, upstream_kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Elwell committed Mar 13, 2020
1 parent 24213fc commit 5b0b609
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions configuration/config-txt/boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,37 @@ If `disable_splash` is set to `1`, the rainbow splash screen will not be shown o

On the Raspberry Pi 4B, if this value is set to `0` then the interrupts will be routed to the ARM cores using the legacy interrupt controller, rather than via the GIC-400. The default value is `1`.

## os_prefix
<a name="os_prefix">

The value in `os_prefix` is prepended to (stuck in front of) the name of any operating system files loaded by the firmware, where "operating system files" is defined to mean kernels, initramfs, cmdline.txt, .dtbs and overlays. The prefix would commonly be a directory name, but it could also be part of the filename such as "test-". For this reason, directory prefixes must include the trailing `/` character.

In an attempt to reduce the chance of a non-bootable system, the firmware first tests the supplied prefix value for viability - unless the expected kernel and .dtb can be found at the new location/name, the prefix is ignored (set to ""). A special case of this viability test is applied to overlays, which will only be loaded from `${os_prefix}${overlay_prefix}` (where the default value of [`overlay_prefix`](#overlay_prefix) is "overlays/") if `${os_prefix}${overlay_prefix}README` exists, otherwise it ignores `os_prefix` and treats overlays as shared.

(The reason the firmware checks for the existence of key files rather than directories when checking prefixes is twofold - the prefix may not be a directory, and not all boot methods support testing for the existence of a directory.)

N.B. Any user-specified OS file can bypass all prefixes by using an absolute path (with respect to the boot partition) - just start the file path with a `/`, e.g. `kernel=/my_common_kernel.img`.

See also [`overlay_prefix`](#overlay_prefix) and [`upstream_kernel`](#upstream_kernel).

## overlay_prefix
<a name="overlay_prefix">

Specifies a subdirectory/prefix from which to load overlays - defaults to `overlays/` (note the trailing `/`). If used in conjunction with [`os_prefix`](#os_prefix), the `os_prefix` comes before the `overlay_prefix`, i.e. `dtoverlay=disable-bt` will attempt to load `${os_prefix}${overlay_prefix}disable-bt.dtbo`.

Note that unless `${os_prefix}${overlay_prefix}README` exists, overlays are shared with the main OS (i.e. `os_prefix` is ignored).

## uart_2ndstage

Setting `uart_2ndstage=1` causes the second-stage loader (`bootcode.bin` on devices prior to the Raspberry Pi 4, or the boot code in the EEPROM for Raspberry Pi 4 devices) and the main firmware (`start*.elf`) to output diagnostic information to UART0.

Be aware that output is likely to interfere with Bluetooth operation unless it is disabled (`dtoverlay=disable-bt`) or switched to the other UART (`dtoverlay=miniuart-bt`), and if the UART is accessed simultaneously to output from Linux then data loss can occur leading to corrupted output. This feature should only be required when trying to diagnose an early boot loading problem.

## upstream_kernel
<a name="upstream_kernel">

If `upstream_kernel=1` is used, the firmware will choose the upstream Linux names for DTBs (`bcm2835-rpi-b.dtb` instead of `bcm2708-rpi-b.dtb`, for example). It will also set [`os_prefix`](#os_prefix) to "upstream/", unless it has been explicitly set to something else, but like other `os_prefix` values it will be ignored if the required kernel and .dtb file can't be found when using the prefix.

To allow a common DTB to be used, if the upstream file isn't found the firmware will load the downstream variant instead and automatically apply the "upstream" overlay.

*This article uses content from the eLinux wiki page [RPiconfig](http://elinux.org/RPiconfig), which is shared under the [Creative Commons Attribution-ShareAlike 3.0 Unported license](http://creativecommons.org/licenses/by-sa/3.0/)*

0 comments on commit 5b0b609

Please sign in to comment.