mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Embedded: allow custom repo to be set through EEPROM setting
Set IMAGER_REPO_URL in EEPROM (sudo rpi-eeprom-config --edit) to use an alternative repository.
This commit is contained in:
parent
a4fb8293ed
commit
24d7546830
1 changed files with 15 additions and 0 deletions
|
@ -85,6 +85,21 @@ ImageWriter::ImageWriter(QObject *parent)
|
|||
changeKeyboard(detectPiKeyboard());
|
||||
if (_currentKeyboard.isEmpty())
|
||||
_currentKeyboard = "us";
|
||||
|
||||
QFile f("/sys/bus/nvmem/devices/rmem0/nvmem");
|
||||
if (f.exists() && f.open(f.ReadOnly))
|
||||
{
|
||||
QByteArrayList eepromSettings = f.readAll().split('\n');
|
||||
f.close();
|
||||
for (QByteArray setting : eepromSettings)
|
||||
{
|
||||
if (setting.startsWith("IMAGER_REPO_URL="))
|
||||
{
|
||||
_repo = setting.mid(16).trimmed();
|
||||
qDebug() << "Repository from EEPROM:" << _repo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue