1
0
Fork 0
forked from len0rd/rockbox

rbutil: Add erosqnative

- Give each brand its own entry, and make ranges
  of OF versions correspond to hardware changes.
- Temporarily disabled target aigoerosq.
- Post-install hint enabled.
- Added pre-install hint function
- Added optional parameter themename, in case
  the target name does not match the themesite name.
- Made Port Status (statusAsString()) only care about platform
  string prior to first '.'
- Manual: Remove note that rbutil does not support this model

Issues:

 - Cannot uninstall the bootloader - manual instructions are available

Change-Id: I574aad7943ea3d1e543e9449f68240446fec0709
This commit is contained in:
Dana Conrad 2024-09-14 14:34:21 -05:00 committed by Solomon Peachy
parent f0c208554c
commit 5d2692375d
12 changed files with 170 additions and 12 deletions

View file

@ -327,7 +327,7 @@ people. Rockbox Utility is a graphical application that does almost everything
for you. However, should you encounter a problem, then the manual way is
still available to you.\\
\opt{gigabeats,fiiom3k,shanlingq1,erosqnative}{
\opt{gigabeats,fiiom3k,shanlingq1}{
\note{The automated install is not yet available for the
\playerlongtype{}. For now you can use the manual method to install Rockbox.
Please still read the section on the automatic install as it explains

View file

@ -97,6 +97,34 @@ BootloaderInstallBase::Capabilities
return caps;
}
//! @brief Return pre install hints string.
//! @param model model string
//! @return hints.
QString BootloaderInstallHelper::preinstallHints(QString model)
{
bool hint = false;
QString msg = QObject::tr("Before Bootloader installation begins, "
"Please check the following:");
msg += "<ol>";
if(model.contains("erosqnative")) {
hint = true;
msg += QObject::tr("<li>Ensure your SD card is formatted as FAT. "
"exFAT is <i>not</i> supported. You can reformat using the "
"Original Firmware on your player if need be. It is located "
"under (System Settings --> Reset --> Format TF Card).</li>"
"<li>Please use a quality SD card from a reputable source. "
"The SD cards that come bundled with players are often of "
"substandard quality and may cause issues.</li>");
}
msg += "</ol>";
if(hint)
return msg;
else
return QString();
}
//! @brief Return post install hints string.
//! @param model model string
@ -114,7 +142,8 @@ QString BootloaderInstallHelper::postinstallHints(QString model)
}
if(model == "iriverh100" || model == "iriverh120" || model == "iriverh300"
|| model == "ondavx747" || model == "agptekrocker"
|| model == "xduoox3" || model == "xduoox3ii" || model == "xduoox20") {
|| model == "xduoox3" || model == "xduoox3ii" || model == "xduoox20"
|| model.contains("erosqnative")) {
hint = true;
msg += QObject::tr("<li>Reboot your player into the original firmware.</li>"
"<li>Perform a firmware upgrade using the update functionality "

View file

@ -30,6 +30,7 @@ class BootloaderInstallHelper : public QObject
public:
static BootloaderInstallBase* createBootloaderInstaller(QObject* parent, QString type);
static BootloaderInstallBase::Capabilities bootloaderInstallerCapabilities(QObject *parent, QString type);
static QString preinstallHints(QString model);
static QString postinstallHints(QString model);
};

View file

@ -67,6 +67,7 @@ const static struct {
{ PlayerBuildInfo::Encoder, ":target:/encoder" },
{ PlayerBuildInfo::Brand, ":target:/brand" },
{ PlayerBuildInfo::PlayerPicture, ":target:/playerpic" },
{ PlayerBuildInfo::ThemeName, ":target:/themename" },
{ PlayerBuildInfo::TargetNamesAll, "_targets/all" },
{ PlayerBuildInfo::TargetNamesEnabled, "_targets/enabled" },
{ PlayerBuildInfo::LanguageInfo, "languages/:target:" },
@ -332,7 +333,7 @@ QVariant PlayerBuildInfo::value(SystemUrl item)
QString PlayerBuildInfo::statusAsString(QString platform)
{
QString result;
switch(value(BuildStatus, platform).toInt())
switch(value(BuildStatus, platform.split('.').at(0)).toInt())
{
case STATUS_RETIRED:
result = tr("Stable (Retired)");

View file

@ -67,6 +67,7 @@ public:
Encoder,
Brand,
PlayerPicture,
ThemeName,
TargetNamesAll,
TargetNamesEnabled,

View file

@ -48,3 +48,6 @@ Version 1.5.1
* Improve responsiveness on install / uninstall.
* Enable Themes installation if themes are selected.
Version 1.5.2
* Add support for Native Port to AIGO Eros Q and various clones
* Make Hosted Port to AIGO Eros Q and various clones "disabled" (can be reenabled by checking the "show disabled targets" checkbox)

View file

@ -409,6 +409,17 @@ void SelectiveInstallWidget::installBootloader(void)
}
}
void SelectiveInstallWidget::installBootloaderHints()
{
if(ui.bootloaderCheckbox->isChecked()) {
QString msg = BootloaderInstallHelper::preinstallHints(
RbSettings::value(RbSettings::Platform).toString());
if(!msg.isEmpty()) {
QMessageBox::information(this, tr("Manual steps required"), msg);
}
}
}
void SelectiveInstallWidget::installBootloaderPost()
{
// don't do anything if no bootloader install has been done.

View file

@ -31,6 +31,7 @@ class SelectiveInstallWidget : public QWidget
Q_OBJECT
public:
SelectiveInstallWidget(QWidget* parent = nullptr);
void installBootloaderHints(void);
public slots:
void updateVersion(void);

View file

@ -79,6 +79,14 @@ platform135=aigoerosq.agptekh3
platform136=aigoerosq.hifiwalkerh2
platform137=aigoerosq.hifiwalkerh2.v13
platform138=aigoerosq.surfansf20
; default erosqnative should be most recent hardware revision
platform139=erosqnative.hw3
platform140=erosqnative.hw3.hifiwalkerh2
platform141=erosqnative.hw3.surfansf20
platform142=erosqnative.hw1hw2
platform143=erosqnative.hw1hw2.hifiwalkerh2
platform144=erosqnative.hw1hw2.hifiwalkerh2.v13
platform145=erosqnative.hw1hw2.surfansf20
; devices sections
;
@ -784,7 +792,7 @@ playerpic=agptekrocker
encoder=rbspeex
[aigoerosq]
name="AIGO Eros Q"
name="AIGO Eros Q (Hosted)"
bootloadermethod=bspatch
bootloadername=/aigo/EROSQ-v18.bsdiff
bootloaderfile=/update.upt
@ -795,9 +803,10 @@ usbid=0xc5020023 ; shared across EROS Q/K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
status=disabled
[aigoerosq.k]
name="AIGO Eros K"
name="AIGO Eros K (Hosted)"
bootloadermethod=bspatch
bootloadername=/aigo/EROSK-v13.bsdiff
bootloaderfile=/update.upt
@ -808,9 +817,10 @@ usbid=0xc5020023 ; shared across EROS Q/K series
usberror=
playerpic=aigoerosk
encoder=rbspeex
status=disabled
[aigoerosq.agptekh3]
name="AGPTek H3"
name="AGPTek H3 (Hosted)"
bootloadermethod=bspatch
bootloadername=/agptek/H3-20180905.bsdiff
bootloaderfile=/update.upt
@ -821,9 +831,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosk
encoder=rbspeex
status=disabled
[aigoerosq.surfansf20]
name="Surfans F20"
name="Surfans F20 (Hosted)"
bootloadermethod=bspatch
bootloadername=/surfans/F20-v22.bsdiff
bootloaderfile=/update.upt
@ -834,9 +845,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosk
encoder=rbspeex
status=disabled
[aigoerosq.hifiwalkerh2]
name="HIFI WALKER H2"
name="HIFI WALKER H2 (Hosted)"
bootloadermethod=bspatch
bootloadername=/hifiwalker/H2-v12.bsdiff
bootloaderfile=/update.upt
@ -847,9 +859,10 @@ usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
status=disabled
[aigoerosq.hifiwalkerh2.v13]
name="HIFI WALKER H2 (v1.3+)"
name="HIFI WALKER H2 (v1.3+) (Hosted)"
bootloadermethod=file
bootloadername=/hifiwalker/H2-v13-patched.upt
bootloaderfile=/update.upt
@ -859,6 +872,98 @@ usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
status=disabled
[erosqnative.hw3]
name="AIGO Eros Q V2.1"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw3-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=AIGO/EROS
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
[erosqnative.hw3.hifiwalkerh2]
name="HIFI WALKER H2 V1.7 - V1.8"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw3-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=HIFI WALKER
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
[erosqnative.hw3.surfansf20]
name="Surfans F20 V3.0 - V3.3"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw3-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=Surfans
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosk
encoder=rbspeex
[erosqnative.hw1hw2]
name="AIGO Eros Q V1.8 - V2.0"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=AIGO/EROS
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
[erosqnative.hw1hw2.hifiwalkerh2]
name="HIFI WALKER H2 V1.1 - V1.2, V1.4 - V1.6"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=HIFI WALKER
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
[erosqnative.hw1hw2.hifiwalkerh2.v13]
name="HIFI WALKER H2 V1.3"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw1hw2-eros_h2.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=HIFI WALKER
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosq
encoder=rbspeex
[erosqnative.hw1hw2.surfansf20]
name="Surfans F20 V2.2 - V2.7"
bootloadermethod=file
bootloadername=/aigo/native/erosqnative-hw1hw2-erosq.upt
bootloaderfile=/update.upt
manualname=erosqnative
themename=aigoerosq
brand=Surfans
usbid=0xc5020023 ; shared across EROS Q / K series
usberror=
playerpic=aigoerosk
encoder=rbspeex
; incompatible devices sections
; each section uses a USB VID / PID string as section name.

View file

@ -366,6 +366,7 @@ void RbUtilQt::configDialog()
{
Config *cw = new Config(this);
connect(cw, &Config::settingsUpdated, this, &RbUtilQt::updateSettings);
connect(cw, &Config::settingsUpdated, selectiveinstallwidget, &SelectiveInstallWidget::installBootloaderHints);
cw->show();
}

View file

@ -85,8 +85,13 @@ void ThemesInstallWindow::downloadInfo()
themesInfo.close();
QString infoUrl = PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemesInfoUrl).toString();
infoUrl.replace("%TARGET%",
RbSettings::value(RbSettings::CurrentPlatform).toString().split(".").at(0));
if (PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemeName).toString() != "") {
infoUrl.replace("%TARGET%",
PlayerBuildInfo::instance()->value(PlayerBuildInfo::ThemeName).toString());
} else {
infoUrl.replace("%TARGET%",
RbSettings::value(RbSettings::CurrentPlatform).toString().split(".").at(0));
}
infoUrl.replace("%REVISION%", installInfo.revision());
infoUrl.replace("%RELEASE%", installInfo.release());
infoUrl.replace("%RBUTILVER%", VERSION);

View file

@ -34,7 +34,7 @@
// combined differently.
#define VERSION_MAJOR 1
#define VERSION_MINOR 5
#define VERSION_MICRO 1
#define VERSION_MICRO 2
#define VERSION_PATCH 0
#define STR(x) #x
#define VERSIONSTRING(a, b, c) STR(a) "." STR(b) "." STR(c)