Support FW_SUBDIR a.k.a. os_prefix (#295)

* Support FW_SUBDIR a.k.a. os_prefix

The FW_SUBDIR environment variable is equivalent to the os_prefix config
setting, except that it is required to be the name of a directory. By
default, rpi-update will initialise FW_SUBDIR from the os_prefix setting
used to boot the device. A different subdirectory can be updated by
specifying a value for FW_SUBDIR in the environment, e.g.

    sudo FW_SUBDIR=safe rpi-update

To specify explicitly that no subdirectory is to be used, i.e. to force
installation into /boot, use FW_SUBDIR=/ .
This commit is contained in:
Phil Elwell
2020-04-09 14:56:36 +01:00
committed by GitHub
parent 0916287b79
commit c32c752699
2 changed files with 22 additions and 2 deletions

View File

@@ -113,6 +113,16 @@ are not currently booted from. Useful for installing firmware/kernel to a
non-RPI customised image. Be careful, you must specify both options or neither.
Specifying only one will not work.
#### `FW_SUBDIR`
sudo FW_SUBDIR=safe rpi-update
Allows the firmware to be installed to a subdirectory of /boot. This feature is
intended to support the `os_prefix` setting that can be used in `config.txt`.
By default, FW_SUBDIR is initialised to the value of `os_prefix` in effect when
the device was booted, so as to overwrite the "running" firmware. To explicitly
install with no subdirectory (to install into /boot), use `FW_SUBDIR=/`.
#### `BRANCH`
By default, clones the firmware files from the master branch, else uses the files