diff --git a/BUILDME.sh b/BUILDME.sh index 01883083d..af67efb74 100755 --- a/BUILDME.sh +++ b/BUILDME.sh @@ -278,5 +278,5 @@ echo "rpi-linux Git rpi-$KERNEL.y @ $(get_kernel_version)" >> "$BUILD_INFO" cd .. -clear +#clear echo "Build complete. Copy files in '$NOOBS_OUTPUT_DIR' directory onto a clean FAT formatted SD card to use." diff --git a/history.md b/history.md index 27fcaf463..e7bb58fb3 100644 --- a/history.md +++ b/history.md @@ -5,6 +5,11 @@ PINN is a version of the NOOBS Operating System Installer for the Raspberry Pi w ## Change History +### V3.8.4 + +- **Security** - Fixed Secure remote SSH and VNC access +- **Images** - Added support for mkswap in OS images + ### V3.8.3 - **NVMe** - Support for booting on NVMe drives on CM4 diff --git a/recovery/config.h b/recovery/config.h index b1a039377..60ae23a06 100644 --- a/recovery/config.h +++ b/recovery/config.h @@ -2,7 +2,7 @@ #define CONFIG_H /* Version number displayed in the title bar */ -#define VERSION_NUMBER "3.8.3a" +#define VERSION_NUMBER "3.8.4" /* Color of the background */ // #define BACKGROUND_COLOR Qt::white diff --git a/recovery/mainwindow.cpp b/recovery/mainwindow.cpp index e5d450a3b..5b6d3d2ea 100644 --- a/recovery/mainwindow.cpp +++ b/recovery/mainwindow.cpp @@ -34,9 +34,9 @@ #include "dlginstall.h" #define LOCAL_DBG_ON 0 -#define LOCAL_DBG_FUNC 0 -#define LOCAL_DBG_OUT 0 -#define LOCAL_DBG_MSG 0 +#define LOCAL_DBG_FUNC 1 +#define LOCAL_DBG_OUT 1 +#define LOCAL_DBG_MSG 1 #include "mydebug.h" @@ -882,6 +882,7 @@ QMap MainWindow::listImages(const QString &folder) images[name] = osv; } } + DBG(osv); } DBG("-------"); for (QMap::iterator i = images.begin(); i != images.end(); i++) diff --git a/recovery/multiimagewritethread.cpp b/recovery/multiimagewritethread.cpp index 748a80216..976d44894 100644 --- a/recovery/multiimagewritethread.cpp +++ b/recovery/multiimagewritethread.cpp @@ -6,10 +6,10 @@ #include "partitioninfo.h" #include "util.h" -#define LOCAL_DBG_ON 0 -#define LOCAL_DBG_FUNC 0 -#define LOCAL_DBG_OUT 0 -#define LOCAL_DBG_MSG 0 +#define LOCAL_DBG_ON 1 +#define LOCAL_DBG_FUNC 1 +#define LOCAL_DBG_OUT 1 +#define LOCAL_DBG_MSG 1 #include "mydebug.h" #include @@ -1396,25 +1396,32 @@ bool MultiImageWriteThread::mkfs(const QByteArray &device, const QByteArray &fst cmd += "-L "+makeLabelUnique(label, 16, device)+" "; //maxlength might be 255? } } + else if (fstype == "swap") + { + cmd = "/sbin/mkswap "; + } - if (!mkfsopt.isEmpty()) - cmd += mkfsopt+" "; + if (!cmd.isEmpty()) + { + if (!mkfsopt.isEmpty()) + cmd += mkfsopt+" "; - cmd += device; + cmd += device; - qDebug() << "Executing:" << cmd; - QProcess p; - p.setProcessChannelMode(p.MergedChannels); - p.start(cmd); - p.closeWriteChannel(); - p.waitForFinished(-1); + qDebug() << "Executing:" << cmd; + QProcess p; + p.setProcessChannelMode(p.MergedChannels); + p.start(cmd); + p.closeWriteChannel(); + p.waitForFinished(-1); - if (p.exitCode() != 0) - { - emit error(tr("Error creating file system")+"\n"+p.readAll()); - return false; + if (p.exitCode() != 0) + { + DBG(p.exitCode()); + emit error(tr("Error creating file system")+"\n"+p.readAll()); + return false; + } } - return true; } diff --git a/recovery/mydebug.h b/recovery/mydebug.h index 6ce974733..72b53bd08 100644 --- a/recovery/mydebug.h +++ b/recovery/mydebug.h @@ -9,9 +9,9 @@ #define GLOBAL_DBG_ON 0 //Use the global data everywhere (overrides ths other globals. sets them to 0) #if GLOBAL_DBG_ON - #define GLOBAL_DBG_FUNC 0 //global Debug entry/exit of functions - #define GLOBAL_DBG_OUT 0 //global Debug output strings - #define GLOBAL_DBG_MSG 0 //global Debug message boxes + #define GLOBAL_DBG_FUNC 1 //global Debug entry/exit of functions + #define GLOBAL_DBG_OUT 1 //global Debug output strings + #define GLOBAL_DBG_MSG 1 //global Debug message boxes #else #define GLOBAL_DBG_FUNC 0 //global Debug entry/exit of functions #define GLOBAL_DBG_OUT 0 //global Debug output strings @@ -45,14 +45,16 @@ #if GLOBAL_ENABLE_DEBUG - #define MYDEBUG MyDebug dbg(__PRETTY_FUNCTION__, DBG_FUNC) - #define TRACE MYDEBUG; - #define PARAMS qDebug() << dbg.header() << (const char *)"Params:" + #define MYDEBUG(x) MyDebug dbg(__PRETTY_FUNCTION__, x); + #define TRACE MYDEBUG(DBG_FUNC); + #define TRACEIF(x) MYDEBUG(x); + + #define PARAMS if (dbg._display) qDebug() << dbg.header() << (const char *)"Params:" #define INDENT(n) dbg._local_level+=n #define OUTDENT(n) dbg._local_level-=n #if DBG_OUT - #define DBG2 qDebug() << dbg.header() <<"" + #define DBG2 if (dbg._display==1) qDebug() << dbg.header() << "" #define DBG(x) DBG2 << x #else #define DBG2 QNoDebug() @@ -72,12 +74,12 @@ class MyDebug MyDebug(const char * funcname, int display=0); ~MyDebug(); int _local_level; + int _display; const char * header(); private: QString _name; static int _level; - int _display; }; #else //GLOBAL_ENABLE_DEBUG diff --git a/recovery/util.cpp b/recovery/util.cpp index f655447c1..7577ee8ac 100644 --- a/recovery/util.cpp +++ b/recovery/util.cpp @@ -711,6 +711,7 @@ void OverrideJson(QVariantMap& m) name = CORE(m.value("os_name").toString()); else return; + DBG(name); SupplantUSBdevice(m); @@ -743,4 +744,5 @@ void OverrideJson(QVariantMap& m) m.remove(key); } } + DBG(m); }