Created
January 30, 2023 14:10
-
-
Save agners/3268b161b719a7d9c3cc8cc04b4acc4d to your computer and use it in GitHub Desktop.
Get Raspberry Pi EEPROM version (CM4/RPi4, inspired by https://github.com/raspberrypi/rpi-eeprom/blob/master/rpi-eeprom-update)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DT_BOOTLOADER_TS=${DT_BOOTLOADER_TS:-/proc/device-tree/chosen/bootloader/build-timestamp} | |
BOOTLOADER_CURRENT_VERSION=$(printf "%d" "0x$(od "${DT_BOOTLOADER_TS}" -v -An -t x1 | tr -d ' ' )") | |
date -u "-d@${BOOTLOADER_CURRENT_VERSION}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment