From b2737d2f59f240f9276f4a9f0107a18b7c653eba Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Sun, 6 Mar 2022 13:37:01 -0500 Subject: [PATCH] N306: Fixes for USBMS --- koboxsettings.cpp | 2 ++ usbms_splash.cpp | 16 ++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/koboxsettings.cpp b/koboxsettings.cpp index f5c119d..b1e0dc8 100644 --- a/koboxsettings.cpp +++ b/koboxsettings.cpp @@ -18,6 +18,8 @@ koboxSettings::koboxSettings(QWidget *parent) : ui->pushButton->setProperty("type", "borderless"); ui->resetKoboxBtn->setProperty("type", "borderless"); ui->pushButton->setStyleSheet("font-weight: bold"); + ui->resetKoboxBtn->setStyleSheet("font-weight: bold"); + ui->okBtn->setStyleSheet("font-weight: bold"); // Stylesheet QFile stylesheetFile(":/resources/eink.qss"); diff --git a/usbms_splash.cpp b/usbms_splash.cpp index e2a7200..f683772 100644 --- a/usbms_splash.cpp +++ b/usbms_splash.cpp @@ -83,6 +83,12 @@ void usbms_splash::usbms_launch() string_writeconfig("/opt/ibxd", "usbnet_stop\n"); QThread::msleep(1000); + if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") { + QProcess::execute("insmod", QStringList() << "/external_root/modules/fs/configfs/configfs.ko"); + QProcess::execute("insmod", QStringList() << "/external_root/modules/drivers/usb/gadget/libcomposite.ko"); + QProcess::execute("insmod", QStringList() << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"); + } + QString prog_1 ("insmod"); QStringList args_1; @@ -98,16 +104,6 @@ void usbms_splash::usbms_launch() proc_1->waitForFinished(); proc_1->deleteLater(); - if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") { - QString functionInsmodProg("insmod"); - QStringList functionInsmodArgs; - functionInsmodArgs << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"; - QProcess * functionInsmodProc = new QProcess(); - functionInsmodProc->start(); - functionInsmodProc->waitForFinished(); - functionInsmodProc->deleteLater(); - } - bool exitUsbMsDone = false; QTimer *usbms_t = new QTimer(this); usbms_t->setInterval(1000);