pine64 / pine64_updater

Application for updating PINE64 devices, such as Pinecil
Other
175 stars 11 forks source link

I would like to apply for demand for a linux version #1

Open myxor opened 3 years ago

myxor commented 3 years ago

Just wanted to make sure you know that a linux version of the updater would be highly appreciated. Thanks for your work.

dal00 commented 3 years ago

There is this https://twitter.com/dal000/status/1344630316015755265?s=19

not sure about the current status

gamelaster commented 3 years ago

@dal00 As in tweet, it's probably job for Ralim. @myxor Okay :-) I will take look on it in near days.

parkerlreed commented 3 years ago

It works on Linux as is right now.

qmake #to generate the Makefile
nano Makefile #Add -lusb-1.0 to the LIBS line
ln -s /usr/bin/dfu-util . #tool expects dfu-util in the same folder
sudo ./pinecil_firmware_updater

image

parkerlreed commented 3 years ago

If you want it to look for dfu-util in PATH edit this line

https://github.com/pine64/pinecil-firmware-updater/blob/master/flashingthread.cpp#L58

and change it to

    dfuUtil.start("dfu-util", dfuUtilArgs);
akhepcat commented 3 years ago

fyi, the correct way to handle unix/linux addition of libusb is to add the following line into the qmake pro file ( pinecil_firmware_updater.pro ) and then regenerate makefile.

unix:!android: LIBS += -lusb-1.0

line 37-ish is the approximate place for it.

canihavesomecoffee commented 3 years ago

It'd be nice if that line to qmake could be added officially, and perhaps a small document on these steps could be made... If there's interest, I can give it a try (are PR's accepted?)

gamelaster commented 3 years ago

@canihavesomecoffee PRs are always welcomed 😊

Mirppc commented 3 years ago

the compile instructions didnt work on two different linux systems. one being PopOS 20.10 and the other being opensuse leap. The error happens when executing make and is the same on both systems.

Opensuse Leap 15.2

Info: creating stash file /home/~/bin/pinecil-firmware-updater/.qmake.stash
Project MESSAGE: /home/~/bin/pinecil-firmware-updater/deps/libusb/lib/

:~/bin/pinecil-firmware-updater> make
/usr/lib64/qt5/bin/uic aboutdialog.ui -o ui_aboutdialog.h
/usr/lib64/qt5/bin/uic connectpinecildialog.ui -o ui_connectpinecildialog.h
/usr/lib64/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o aboutdialog.o aboutdialog.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o connectpinecildialog.o connectpinecildialog.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o flashingthread.o flashingthread.cpp
In file included from flashingthread.cpp:1:0:
flashingthread.h: In constructor ‘FlashingThread::FlashingThread(QObject*, bool, QString, bool)’:
flashingthread.h:18:13: warning: ‘FlashingThread::firmwarePath’ will be initialized after [-Wreorder]
     QString firmwarePath;
             ^~~~~~~~~~~~
flashingthread.h:17:10: warning:   ‘bool FlashingThread::massErase’ [-Wreorder]
     bool massErase;
          ^~~~~~~~~
flashingthread.h:10:5: warning:   when initialized here [-Wreorder]
     FlashingThread(QObject *parent = nullptr, bool driverMissing = false, QString firmwarePath = "", bool massErase = false)
     ^~~~~~~~~~~~~~
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o main.o main.cpp
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o mainwindow.o mainwindow.cpp
In file included from mainwindow.cpp:9:0:
flashingthread.h: In constructor ‘FlashingThread::FlashingThread(QObject*, bool, QString, bool)’:
flashingthread.h:18:13: warning: ‘FlashingThread::firmwarePath’ will be initialized after [-Wreorder]
     QString firmwarePath;
             ^~~~~~~~~~~~
flashingthread.h:17:10: warning:   ‘bool FlashingThread::massErase’ [-Wreorder]
     bool massErase;
          ^~~~~~~~~
flashingthread.h:10:5: warning:   when initialized here [-Wreorder]
     FlashingThread(QObject *parent = nullptr, bool driverMissing = false, QString firmwarePath = "", bool massErase = false)
     ^~~~~~~~~~~~~~
mainwindow.cpp: In constructor ‘MainWindow::MainWindow(QWidget*)’:
mainwindow.cpp:140:36: error: ‘errorOccurred’ is not a member of ‘QNetworkReply’
     connect(reply, &QNetworkReply::errorOccurred, [this] {
                                    ^~~~~~~~~~~~~
make: *** [Makefile:545: mainwindow.o] Error 1
canihavesomecoffee commented 3 years ago

@Mirppc Which version of Qt are you using? errorOccurred was introduced in Qt 5.15 (https://doc.qt.io/qt-5/qnetworkreply.html#errorOccurred)

I.e.

$ qmake-qt5 --version QMake version 3.1 Using Qt version 5.15.2 in /usr/lib

Mirppc commented 3 years ago

Pop OS 20.10

QMake version 3.1
Using Qt version 5.14.2 in /usr/lib/x86_64-linux-gnu

Opensuse Leap 15.2

QMake version 3.1
Using Qt version 5.12.7 in /usr/lib64
tormodvolden commented 2 years ago

The build problem above (with older Qt) has now been fixed.