You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add rpi-eeprom-update documentation
rpi-eeprom-update is now available in the standard Debian repository instead of untested. Update the documentation to cover this and remove the sed hacks for tweaking configuration parameters.
Copy file name to clipboardExpand all lines: hardware/raspberrypi/booteeprom.md
+71-14Lines changed: 71 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,38 +7,95 @@ The Raspberry Pi 4 has an SPI-attached EEPROM (4MBits/512KB), which contains cod
7
7
- Raspberry Pi 4 bootup procedure and SDRAM setup is considerably more complicated than on the previous Raspberry Pi models, so there is more risk inherent in code that's permanently incorporated in the ROM of the SoC.
8
8
- USB has moved to a PCIe bus, and the Gigabit Ethernet driver is completely different to previous models, so again, having it permanently fixed into the ROM of the SoC was not feasible.
9
9
- A small SPI EEPROM allows bugs to be fixed and features to be added after launch, in the field.
10
-
- The local modifiable state means that OTP bootmode settings will not be required for PXE or USB mass storage boot on the Raspberry Pi 4. There are no user-modifiable OTP bootmode bits on Pi 4.
10
+
- The local modifiable state means that OTP bootmode settings will not be required for network or USB mass storage boot on the Raspberry Pi 4. There are no user-modifiable OTP bootmode bits on Pi 4.
11
11
12
-
## PXE and USB Boot
12
+
## Network and USB boot
13
13
14
-
Support for these additional bootmodes will be added in the future via optional bootloader updates. The current schedule is to release PXE boot first, then USB boot.
14
+
Support for these additional bootmodes will be added in the future via optional bootloader updates. The current schedule is to release network boot first, then USB boot.
15
15
16
16
## Is the bootloader working correctly?
17
17
18
18
To check that the bootloader is working correctly, turn off the power, unplug everything from the Raspberry Pi 4, including the SD card, and then turn the power back on. If the green LED blinks with a repeating pattern then the bootloader is running correctly, and indicating that `start*.elf` has not been found. Any other actions imply that the bootloader is not working correctly and should be reinstalled using `recovery.bin`.
19
19
20
-
## recovery.bin
20
+
## Recovery image
21
21
22
-
If the EEPROM needs updating or has somehow become corrupted, it can be reflashed using a fresh SD card with a copy of `recovery.bin` in the first partition of an SD card, formatted to FAT32.
22
+
If the Raspberry Pi is not booting it's possible that the bootloader EEPROM is corrupted. This can easily be reprogrammed using the Recovery image available on the [raspberrypi.org downloads page](https://www.raspberrypi.org/downloads/).
23
23
24
-
`recovery.bin` is a special utility which runs directly from the SD card and updates the EEPROM — it is not in itself a bootloader. It flashes the green LED rapidly (forever) upon success. Because it's not a bootloader, it won't load `start*.elf`, so once you see the green LED flashing rapidly, just re-insert a regular Raspbian SD card and reboot the Pi.
24
+
## Updating the bootloader
25
25
26
-
It can be downloaded from the [raspberrypi.org downloads page](https://www.raspberrypi.org/downloads/).
26
+
We recommend setting up your Pi so that it automatically updates the bootloader: this means you will get new features and bug fixes as they are released. Bootloader updates are performed by the `rpi-eeprom` package, which installs a service that runs at boot-time to check for critical updates.
27
+
28
+
```
29
+
sudo apt update
30
+
sudo apt upgrade
31
+
sudo apt install rpi-eeprom
32
+
```
33
+
34
+
If you wish to control when the updates are applied you can disable the systemd service from running automatically and run `rpi-eeprom-update` manually.
35
+
36
+
```
37
+
# Prevent the service from running, this can be run before the package is installed to prevent it ever running automatically.
38
+
sudo systemctl mask rpi-eeprom-update
39
+
40
+
# Enable it again
41
+
sudo systemctl unmask rpi-eeprom-update
42
+
```
43
+
44
+
The `FREEZE_VERSION` option in the EEPROM config file may be used to indicate that the EEPROM should not be updated on this board.
27
45
28
46
## Write protection of EEPROM
29
47
30
48
There is no software write protection for the boot EEPROM but there will be a mechanism in Raspbian to skip any future updates to the EEPROM. However, it is possible to physically write-protect both EEPROMs via a simple resistor change on the board. Details will be published in the [schematics](./schematics/README.md).
31
49
32
50
## EEPROM configuration options
33
51
34
-
The EEPROM image contains a small user-modifiable config file. To change a setting:
52
+
EPROM image files contain a small user-modifiable config file, which may be modified using the `rpi-eeprom-config` script included in the `rpi-eeprom` package.
53
+
54
+
### Update the EEPROM config
55
+
```
56
+
# Copy the EEPROM of interest from /lib/firmware/raspberrypi/bootloader/critical/
57
+
58
+
# To extract the configuration file from an EEPROM image.
59
+
rpi-eeprom-config pieeprom.bin --out bootconf.txt
60
+
61
+
# To update the configuration file in an EEPROM image.
# -d means that the configuration in the file should be used, otherwise, rpi-eeprom-update
66
+
# will automatically migrate the current bootloader's configuration to the new image.
67
+
sudo rpi-eeprom-update -d -f ./pieeprom-new.bin
68
+
```
69
+
70
+
### Checking if an update is available
71
+
Running the rpi-eeprom-update command with no parameters indicates whether an update is required. An update is required if the timestamp of the most recent file in the firmware directory (normally `/lib/firmware/raspberrypi/bootloader/critical`) is newer than that reported
72
+
by the current bootloader.
73
+
The images under `/lib/firmware/raspberrypi/bootloader` are part of the `rpi-eeprom` package and are only updated via `apt update`.
74
+
75
+
```
76
+
rpi-eeprom-update
77
+
```
78
+
79
+
### Reading the current EEPROM configuration
80
+
81
+
To view the configuration file used by the bootloader at boot time
82
+
```
83
+
vcgencmd bootloader_config
84
+
```
85
+
86
+
### Reading the EEPROM version
87
+
```
88
+
vcgencmd bootloader_version
89
+
```
35
90
36
-
* Download and unzip the rescue bootloader image from https://www.raspberrypi.org/downloads/
37
-
* Used sed to change setting. Be careful to avoid changing anything else otherwise it will fail to boot.
* Flash the image - see embedded README.txt in rescue image zip.
91
+
### Beta firmware
92
+
Beta firmware files will be stored in `/lib/firmware/raspberrypi/bootloader/beta/`. Developers or beta-testers who are comfortable with using the rescue image to fix boot problems can track the beta firmware by editing `/etc/default/rpi-eeprom-update`
93
+
```
94
+
Change FIRMWARE_RELEASE_STATUS="critical"
95
+
to FIRMWARE_RELEASE_STATUS="beta"
96
+
```
40
97
41
-
We will soon be releasing a tool which allows the EEPROM config to be extracted and modified without having to use sed hacks.
98
+
### Configuration options
42
99
43
100
#### BOOT_UART
44
101
@@ -62,7 +119,7 @@ Version: 2019-07-15
62
119
63
120
#### FREEZE_VERSION
64
121
65
-
If 1 then the Raspbian EEPROM update service (rpi-eeprom package) will skip automatic updates on this board. The parameter is not processed by the EEPROM bootloader or recovery.bin since there is no way in software of fully write protecting the EEPROM. Custom EEPROM update scripts must also check for this flag.
122
+
If 1 then the `rpi-eeprom-update` will skip automatic updates on this board. The parameter is not processed by the EEPROM bootloader or recovery.bin since there is no way in software of fully write protecting the EEPROM. Custom EEPROM update scripts must also check for this flag.
0 commit comments