Hexxeh / rpi-update

An easier way to update the firmware of your Raspberry Pi
MIT License
1.94k stars 232 forks source link

Inform the user if the bootloader EEPROM is out of date #286

Closed timg236 closed 5 years ago

timg236 commented 5 years ago

It's normally desirable to use the latest bootloader when testing the latest firmware releases. rpi-eeprom-update is specific to Raspbian but so rpi-update can't easily do the EEPROM update itself without duplicating all the functionality. Instead, just indicate that the bootloader is out of date unless FREEZE_VERSION has been specified.

N.B. The MIN_VERSION is set to the Sep-10 release which will be promoted to stable today.

timg236 commented 5 years ago

Updated to use "command -v" to check for vcgencmd before calling it. Added a check to verify that the bootloader_config command is supported, if not, the firmware is too old

timg236 commented 5 years ago

Don’t mind either way but parsing cpuinfo appears to be more complex. The OTP is also the source of truth for the board revision

popcornmix commented 5 years ago

But OTP is an implementation detail we don't publish. /proc/cpuinfo is the documented way of identifying processor type.

timg236 commented 5 years ago

Processor type or board revision ? Both are potentially significant when selecting bootloader compatibility. Happy to use cpuinfo but the reason I used otp_dump is that the output is less likely to change than cpuinfo

popcornmix commented 5 years ago

cpuinfo is the right place to look. It will also work with force_board_rev. /proc/cpuinfo is unlikely to change format, as we use this for hello_pi demos, omxplayer, kodi, vlc, ffmpeg etc.

timg236 commented 5 years ago

ok, force_board_rev is a good reason to use cpuinfo