mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Conflicts:
src/Makefile.am
src/gui/imageinfo_ni.cpp
src/gui/movieplayer.cpp
src/gui/update.cpp
src/gui/videosettings.cpp
src/system/setting_helpers.cpp
Origin commit data
------------------
Commit: 4b934995ae
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
This commit is contained in:
@@ -93,7 +93,7 @@ extern int allow_flash;
|
||||
#define FILEBROWSER_UPDATE_FILTER "img"
|
||||
|
||||
#define MTD_OF_WHOLE_IMAGE 0
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd0"
|
||||
#else
|
||||
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd3"
|
||||
@@ -139,7 +139,7 @@ void CFlashUpdate::update_php(std::string &url, const char* type)
|
||||
if (url.find("update.php") != std::string::npos)
|
||||
{
|
||||
url += "?revision=" + to_string(cs_get_revision());
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
url += "&chip_type=" + to_string(cs_get_chip_type());
|
||||
#endif
|
||||
url += "&image_type=" + (std::string)type;
|
||||
@@ -353,7 +353,7 @@ bool CFlashUpdate::selectHttpImage(void)
|
||||
newVersion = versions[selected];
|
||||
file_md5 = md5s[selected];
|
||||
fileType = fileTypes[selected];
|
||||
//NI #ifdef BOXMODEL_APOLLO
|
||||
//NI #ifdef BOXMODEL_CS_HD2
|
||||
#if 0
|
||||
if(fileType < '3') {
|
||||
int esize = CMTDInfo::getInstance()->getMTDEraseSize(sysfs);
|
||||
@@ -447,7 +447,7 @@ printf("[update] mode is %d\n", softupdate_mode);
|
||||
//NI
|
||||
if (allow_flash) {
|
||||
UpdatesFilter.addFilter(FILEBROWSER_UPDATE_FILTER);
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
if (CMTDInfo::getInstance()->getMTDEraseSize(sysfs) == 0x40000 /* Tank */)
|
||||
UpdatesFilter.addFilter("256k");
|
||||
#endif
|
||||
@@ -597,7 +597,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
if(fileType < '3') {
|
||||
//flash it...
|
||||
#if ENABLE_EXTUPDATE
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (g_settings.apply_settings) {
|
||||
if (ShowMsg(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_APPLY_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) == CMsgBox::mbrYes)
|
||||
if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE)) {
|
||||
@@ -666,7 +666,7 @@ CFlashExpert::CFlashExpert()
|
||||
{
|
||||
selectedMTD = -1;
|
||||
width = 40;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
forceOtherFilename = false;
|
||||
otherFilename = "";
|
||||
createimage_other = 0;
|
||||
@@ -683,7 +683,7 @@ CFlashExpert* CFlashExpert::getInstance()
|
||||
|
||||
bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
{
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (mtd < 0) return false;
|
||||
#endif
|
||||
char errMsg[1024] = {0};
|
||||
@@ -697,7 +697,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
uint64_t btotal = 0, bused = 0;
|
||||
long bsize = 0;
|
||||
uint64_t backupRequiredSize = 0;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
if (mtd == -1) { // check disk space for image creation
|
||||
if (!get_fs_usage("/", btotal, bused, &bsize)) {
|
||||
snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_VOLUME_ERROR), "root0");
|
||||
@@ -733,7 +733,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
bool CFlashExpert::readDevtableFile(std::string &devtableFile, CMkfsJFFS2::v_devtable_t &v_devtable)
|
||||
{
|
||||
FILE *fd = fopen(devtableFile.c_str(), "r");
|
||||
@@ -819,7 +819,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
std::string tankStr = "";
|
||||
|
||||
#if ENABLE_EXTUPDATE
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
int eSize = CMTDInfo::getInstance()->getMTDEraseSize(CMTDInfo::getInstance()->findMTDsystem());
|
||||
if (preadmtd == 0) {
|
||||
if (createimage_other == 0) {
|
||||
@@ -838,7 +838,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
#endif
|
||||
filename = (std::string)g_settings.update_dir + "/" + mtdInfo->getMTDName(preadmtd) + timeStr + tankStr + ".img";
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
std::string title = " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ")";
|
||||
std::string mountp = getJFFS2MountPoint(preadmtd);
|
||||
if (preadmtd == 0) {
|
||||
@@ -862,7 +862,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
}
|
||||
|
||||
bool skipCheck = false;
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if ((std::string)g_settings.update_dir == "/tmp")
|
||||
skipCheck = true;
|
||||
#else
|
||||
@@ -890,7 +890,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
sprintf(message, g_Locale->getText(LOCALE_FLASHUPDATE_SAVESUCCESS), filename.c_str());
|
||||
sleep(1);
|
||||
hide();
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
if (!forceOtherFilename)
|
||||
ShowHint(LOCALE_MESSAGEBOX_INFO, message);
|
||||
#else
|
||||
@@ -952,7 +952,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
|
||||
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
|
||||
char sActionKey[20];
|
||||
bool enabled = true;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
// disable write uboot / uldr / env
|
||||
if ((actionkey == "writemtd") && (lx == mtdInfo->findMTDNumberFromName("u-boot") ||
|
||||
lx == mtdInfo->findMTDNumberFromName("uldr") ||
|
||||
@@ -976,7 +976,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
|
||||
mtdselector->addItem(new CMenuForwarder(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++)));
|
||||
}
|
||||
#if ENABLE_EXTUPDATE
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (actionkey == "writemtd")
|
||||
mtdselector->addItem(new CMenuForwarder("systemFS with settings", true, NULL, this, "writemtd10", CRCInput::convertDigitToKey(shortcut++)));
|
||||
#endif
|
||||
@@ -1069,7 +1069,7 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
CFlashExpertSetup::CFlashExpertSetup()
|
||||
{
|
||||
width = 40;
|
||||
@@ -1237,4 +1237,4 @@ g_settings.flashupdate_createimage_add_spare = 0;
|
||||
cfe->createimage_other = 0;
|
||||
return res;
|
||||
}
|
||||
#endif // BOXMODEL_APOLLO
|
||||
#endif // BOXMODEL_CS_HD2
|
||||
|
Reference in New Issue
Block a user