Skip to content

Commit

Permalink
Re-mount eeprom for signing/backup
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Nov 10, 2023
1 parent 1faec25 commit 7396108
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions www/api/controllers/cape.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ function GetEEPROMFilename()
if (file_exists("/home/fpp/media/tmp/eeprom_location.txt")) {
$eepromLoc = file_get_contents("/home/fpp/media/tmp/eeprom_location.txt");
}
if (!file_exists($eepromFile) && startsWith($eepromFile, "/sys/bus/i2c/devices/")) {
$target = "/sys/bus/i2c/devices/i2c-1/new_device"
if ($settings['Platform'] == "BeagleBone Black") {
$target = "/sys/bus/i2c/devices/i2c-2/new_device"
}
system("sudo bash -c \"echo '24c256 0x50' > $target\"");
}

if (!file_exists($eepromFile) && file_exists("/home/fpp/media/config/cape-eeprom.bin")) {
$eepromFile = "/home/fpp/media/config/cape-eeprom.bin";
}
Expand Down

0 comments on commit 7396108

Please sign in to comment.