diff --git a/debian/changelog b/debian/changelog index a195d08..265af9b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +rpi-eeprom (1.1-1) buster; urgency=medium + + [ Tim Gover ] + * 2019-09-23 - Beta test for network boot + + -- Serge Schneider Mon, 23 Sep 2019 12:10:32 +0100 + rpi-eeprom (1.0-1) buster; urgency=medium [ Tim Gover ] diff --git a/firmware/beta/pieeprom-2019-09-23.bin b/firmware/beta/pieeprom-2019-09-23.bin new file mode 100644 index 0000000..f54a1aa Binary files /dev/null and b/firmware/beta/pieeprom-2019-09-23.bin differ diff --git a/firmware/raspberry_pi4_network_boot_beta.md b/firmware/raspberry_pi4_network_boot_beta.md new file mode 100644 index 0000000..77d1222 --- /dev/null +++ b/firmware/raspberry_pi4_network_boot_beta.md @@ -0,0 +1,130 @@ +# Raspberry Pi4 network boot (BETA) +The page describes how to install and configure network boot for the Raspberry Pi4 Model B. + +**This is an early beta test and has only been tested on a small number of networks. Check with your network administrator before enabling network boot.** + +This documentation will be merged into the main bootloader documents after the beta test is complete. + +## Known issue +* For unknown reasons the brcmfmac wifi is not initialised in netowrk boot mode. +* Linux 5.3 kernel seems to poll SDHCI SD ever 10 seconds printing warnings to dmesg +* A timeout reading start4.elf causes start.elf to be loaded, start.elf should only be loaded if start4.elf does not exist. + +## Server configuration +Network boot requires a TFTP and NFS server to be configured. See [Network boot server tutorial](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md) + +Additional notes:- +* The VideoCore firmware (start4.elf) must be updated to the latest rpi-update version in order to get the Pi4 network drivers. +* The MAC address on the Pi4 is programmed at manufacture and is not derived from the serial number. + +``` +# mac adddress (ip addr) - it should start with DC:A6:32 +ip addr | grep ether | head -n1 | awk '{print $2}' | tr [a-z] [A-Z] + +# serial number +vcgencmd otp_dump | grep 28: | sed s/.*://g +``` + +## Installation - Updating firmware and bootloader +``` +# Install the rpi-eeprom update package +sudo apt update +sudo apt upgrade +sudo apt install rpi-eeprom + +# Get the latest VideoCore firmware which includes the Pi4 network driver in start4.elf +sudo rpi-update + +# (Optional) Update rpi-eeprom-update to automatically get updates / bug fixes. +sudo echo FIRMWARE_RELEASE_STATUS="beta" > /etc/default/rpi-eeprom-update +``` + +### Configuration - Enable network boot +Network boot is not enabled by default in the bootloader. To enable it the bootloader configuration file must be edited. +``` +# Extract the configuration file +cp /lib/firmware/raspberrypi/beta/pieeprom-2019-09-23.bin pieeprom.bin +rpi-eeprom-config pieeprom.bin > bootconf.txt + +# Enable network boot +# change boot_order from 0x1 (sd-boot) to +BOOT_ORDER=0x21 +# sd-boot then failover to network boot + +# If you have a UART cable then setting BOOT_UART=1 will help debug network boot issues +BOOT_UART=1 + +# Apply the configuration change to the EEPROM image file +rpi-eeprom-config --out pieeprom-netboot.bin --config bootconf.txt pieeprom.bin +``` + +### Update the bootloader EEPROM +``` +# Flash the bootloader EEPROM with network boot enabled +# Run 'rpi-eeprom-update -h' for more information +sudo rpi-eeprom-update -d -f ./pieeprom-netboot.bin +sudo reboot +``` + +## TFTP prefix +As with the Pi3 bootloader the presence of /serial_number/start.elf is used to detect +whether the serial number should be used as the directory prefix for TFTP requests. + +N.B. A future update might additionally check for start4.elf as well as start.elf +in order to have a Pi4 specific TFTP root. The current assumption is that the TFTP +root directory has copied as-is from a Raspbian Buster image file. + +The bootloader loads start4.elf in preference to start.elf so it's possible to +just have an empty start.elf file if you only want to have Pi4 firmware in the TFTP +root directory. + +## Bootloader configuration + +### BOOT_ORDER +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 LSB to MSB order. + +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. + +The retry counters are reset when switching to the next boot mode. + +BOOT_ORDER fields +* 0x0 - NONE (stop with error pattern) +* 0x1 - SD CARD +* 0x2 - NETWORK + +Default: 0x00000001 (with 3 SD boot retries to match the current bootloader behaviour) + +### SD_BOOT_MAX_RETRIES +Specify the maximum number of times that the bootloader will retry booting from the sd-card. +-1 means infinite retries +Default: 0 + +### NET_BOOT_MAX_RETRIES +Specify the maximum number of times that the bootloader will retry network boot. +-1 means infinite retries +Default: 0 + +### DHCP_TIMEOUT +The timeout in milliseconds for the entire DHCP sequence before failing the current iteration. +Default: 45000 +Minimum: 5000 + +### DHCP_REQ_TIMEOUT +The timeout in milliseconds before retrying DHCP DISCOVER or DHCP REQ. +Default: 4000 +Minimum: 500 + +### TFTP_TIMEOUT +The timeout in milliseconds for an individual file download via TFTP. +Default: 15000 +Minimum: 5000 + +### TFTP_IP +Optional dotted decimal ip address (e.g. 192.169.1.99) for the TFTP server which overrides the server-ip from the DHCP request. +This maybe useful on home networks because tftpd-hpa can be used instead of dnsmasq where broadband router is the DHCP server. +Default: "" + diff --git a/firmware/release-notes.md b/firmware/release-notes.md index 217e33b..befb380 100644 --- a/firmware/release-notes.md +++ b/firmware/release-notes.md @@ -1,5 +1,9 @@ # Raspberry Pi4 bootloader EEPROM release notes +## 2019-09-23 - Git c67e8bb3 (BETA) + * Add support for network boot + * Configurable ordering for boot modes (BOOT_ORDER and SD/NET_BOOT retries) + ## 2019-09-10 - Git f626c772 * Configure ethernet RGMII pins at power on. This is a minor change which which may improve reliability of ethernet for some users.