Raspberry Pi CM5 IoT In C - Setting Up the CM5 |
Written by Harry Fairhead | |||||||||||||||||||||||||||||||||||
Monday, 14 April 2025 | |||||||||||||||||||||||||||||||||||
Page 3 of 4
Boot EPROMThe CM5 uses a separate EPROM to hold the boot code. Previous versions of the Pi stored the boot code in the file bootcode.bin in the boot partition of the device being used to boot the system. The CM5 doesn’t automatically update the boot loader and it is up to you to ensure that you are working with the latest version. First update Linux and dependencies on the CM5: sudo apt update sudo apt upgrade and to sure you have the latest EEPROM sudo rpi-eeprom-update -a You have to reboot to make any changes and you can check what version you have using: sudo rpi-eeprom-update
The boot loader can be configured using the rpi-eeprom-config command wh To change the configuration you can use the command: sudo -E rpi-eeprom-config --edit This loads the current configuration into the nano editor and saves it using: sudo rpi-eeprom-update Probably the most used boot configuration parameter is BOOT_ORDER which you can use to set the CM5 to boot from NVMe. USB etc. The documentation lists the possible values and refers to other parts of the documentation for more information:
To specify a boot order you put the hex codes together with the right-most code tried first and so on. For example, to boot from NVMe and then try eMMC if that fails you would use: BOOT_ORDER=0xf16 Notice that the initial f means that the boot sequence will be cycled through until the number of attempts exceeds MAX_RESTARTS. There are lots of additional boot configuration parameters and you can look them up at: https://www.raspberrypi.com/documentation/computers/ raspberry-pi.html#raspberry-pi-bootloader-configuration If you are concerned about security then make sure that you only boot from the internal eMMC. |
|||||||||||||||||||||||||||||||||||
Last Updated ( Monday, 14 April 2025 ) |