|
| 1 | +# Pi4 Bootloader Configuration |
| 2 | + |
| 3 | +You can display the currently-active configuration using |
| 4 | +``` |
| 5 | +vcgencmd bootloader_config |
| 6 | +``` |
| 7 | + |
| 8 | +To change these bootloader configuration items, you need to extract the configuration segment, make changes, re-insert it, then reprogram the EEPROM with the new bootloader. The Raspberry Pi will need to be rebooted for changes to take effect. |
| 9 | + |
| 10 | +``` |
| 11 | +# Extract the configuration file |
| 12 | +cp /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2019-09-10.bin pieeprom.bin |
| 13 | +rpi-eeprom-config pieeprom.bin > bootconf.txt |
| 14 | +
|
| 15 | +# Edit the configuration using a text editor e.g. nano bootconf.txt |
| 16 | +
|
| 17 | +# Example change. If you have a UART cable then setting BOOT_UART=1 will help debug boot issues |
| 18 | +BOOT_UART=1 |
| 19 | +
|
| 20 | +# Save the new configuration and exit editor |
| 21 | +
|
| 22 | +# Apply the configuration change to the EEPROM image file |
| 23 | +rpi-eeprom-config --out pieeprom-new.bin --config bootconf.txt pieeprom.bin |
| 24 | +``` |
| 25 | + |
| 26 | +To update the bootloader EEPROM with the edited bootloader: |
| 27 | + |
| 28 | +``` |
| 29 | +# Flash the bootloader EEPROM |
| 30 | +# Run 'rpi-eeprom-update -h' for more information |
| 31 | +sudo rpi-eeprom-update -d -f ./pieeprom-new.bin |
| 32 | +sudo reboot |
| 33 | +``` |
| 34 | + |
| 35 | +## Configuration Items |
| 36 | + |
| 37 | +This section describes all the configuration items available in the bootloader. |
| 38 | + |
| 39 | + |
| 40 | +### BOOT_UART |
| 41 | + |
| 42 | +If 1 then enable UART debug output on GPIO 14 and 15. Configure the receiving debug terminal at 115200bps, 8 bits, no parity bits, 1 stop bit. |
| 43 | +Default: 0 |
| 44 | +Version: All |
| 45 | + |
| 46 | +### WAKE_ON_GPIO |
| 47 | + |
| 48 | +If 1 then 'sudo halt' will run in a lower power mode until either GPIO3 or GLOBAL_EN are shorted to ground. |
| 49 | + |
| 50 | +Default: 0 in original version of bootloader (2019-05-10). Newer bootloaders have this set to 1. |
| 51 | +Version: All |
| 52 | + |
| 53 | +### POWER_OFF_ON_HALT |
| 54 | + |
| 55 | +If 1 and WAKE_ON_GPIO=0 then switch off all PMIC outputs in halt. This is lowest possible power state for halt but may cause problems with some HATs because 5V will still be on. GLOBAL_EN must be shorted to ground to boot. |
| 56 | + |
| 57 | +Default: 0 |
| 58 | +Version: 2019-07-15 |
| 59 | + |
| 60 | +### FREEZE_VERSION |
| 61 | + |
| 62 | +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. |
| 63 | + |
| 64 | +Default: 0 |
| 65 | +Version: All |
| 66 | + |
| 67 | +## Configuration items (Network boot beta test bootloader only) |
| 68 | + |
| 69 | +### BOOT_ORDER |
| 70 | +The BOOT_ORDER setting allows flexible configuration for the priority of different bootmodes. It is represented as 32bit unsigned integer where each nibble represents a bootmode. The bootmodes are attempted in lowest significant nibble to highest significant nibble order. |
| 71 | + |
| 72 | +E.g. 0x21 means try SD first followed by network boot then stop. Where as 0x2 would mean try network boot and then stop without trying to boot from the SD card. |
| 73 | + |
| 74 | +The retry counters are reset when switching to the next boot mode. |
| 75 | + |
| 76 | +BOOT_ORDER fields |
| 77 | +* 0x0 - NONE (stop with error pattern) |
| 78 | +* 0x1 - SD CARD |
| 79 | +* 0x2 - NETWORK |
| 80 | + |
| 81 | +Default: 0x00000001 (with 3 SD boot retries to match the current bootloader behaviour) |
| 82 | + |
| 83 | +### SD_BOOT_MAX_RETRIES |
| 84 | +Specify the maximum number of times that the bootloader will retry booting from the SD card. |
| 85 | +-1 means infinite retries |
| 86 | +Default: 0 |
| 87 | + |
| 88 | +### NET_BOOT_MAX_RETRIES |
| 89 | +Specify the maximum number of times that the bootloader will retry network boot. |
| 90 | +-1 means infinite retries |
| 91 | +Default: 0 |
| 92 | + |
| 93 | +### DHCP_TIMEOUT |
| 94 | +The timeout in milliseconds for the entire DHCP sequence before failing the current iteration. |
| 95 | +Default: 45000 |
| 96 | +Minimum: 5000 |
| 97 | + |
| 98 | +### DHCP_REQ_TIMEOUT |
| 99 | +The timeout in milliseconds before retrying DHCP DISCOVER or DHCP REQ. |
| 100 | +Default: 4000 |
| 101 | +Minimum: 500 |
| 102 | + |
| 103 | +### TFTP_TIMEOUT |
| 104 | +The timeout in milliseconds for an individual file download via TFTP. |
| 105 | +Default: 15000 |
| 106 | +Minimum: 5000 |
| 107 | + |
| 108 | +### TFTP_IP |
| 109 | +Optional dotted decimal ip address (e.g. 192.169.1.99) for the TFTP server which overrides the server-ip from the DHCP request. |
| 110 | +This maybe useful on home networks because tftpd-hpa can be used instead of dnsmasq where broadband router is the DHCP server. |
| 111 | +Default: "" |
0 commit comments