-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Update buildroot #401
base: master
Are you sure you want to change the base?
Conversation
11,000 changed files! 👀 Holy moly, that's going to be fun to try and review 😉 Top tip: When making several changes, as you've done in your list above, it's easiest if each of those changes is in a separate commit, rather than squashing everything into a single commit. That way it's easier to pick out exactly what changes e.g. "Fixes for the RPi kernel" involves. EDIT: But that's just my opinion of course, @procount may see things differently. |
3be6250
to
e1876e2
Compare
I rebased it, I hope it is okay like this (I can also squash them again if that's too many commits). |
I got QT5 working, there are still many tweaks needed, but I now got a working build system, and there is one issue: @procount @lurch What are your opinions on this? Note: This works in parts, but there are many things that still need to be done, but before putting even more work into this, I thought I should ask if you even accept these changes. |
What's the issue with the cutdown firmware? I've never really studied what the differences were between the different versions. As I said before, I'd like to move PINN onto a later buildroot and QT5 so that I can use a more up to date version of Ubuntu to develop it on. It's a BIG job and I appreciate your work on this. Hopefully it won't be at the expense of too much bloating, because it is supposed to be small and nimble. Unfortunately, I've not had the time to put any effort into this, but at some point I need to, because I can't/won't integrate anything I don't understand or couldn't support. I therefore need to be able to follow along with what you've been doing when I can devote more time to it. So I would ask you to keep your PRs well documented and clear, with each one performing a specific change, and each change being integratable, so there is always a working version, as far as possible. I can't guarantee when or if I can integrate these changes - it depends on my other commitments, and how well you progress. So if you want to continue, please do so primarily because YOU want to. I hope PINN continues to be useful, but with other advances like UEFI and devs wanting to use more of UBoot, etc, I do wonder how long it will last. Hopefully long enough to complete my roadmap of new features 😄 |
Okay, I'll push more changes soon, I currently have about 20 commits just named "Fix". I currently got a working Window system. Here's a list of all changes to PINN packages I did and I still have to do:
Because the Compositor uses later QT features, but the buildroot currently used here has an older qt5 version, so I need to do the buildroot update & QT5 port in one PR. I can split this into multiple commits, but not create multiple PRs. |
Sorry, yes, I meant commits not PRs. |
I uploaded the version I'm currently working on here. The first commit is just what happens after deleting the buildroot folder and replacing it with buildroot 2020.08-rc1. |
48124dc
to
f9e6afa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm documenting the commits in more detail here.
I'll start with commit 137bca4
Update build script for latest buildroot
@@ -51,7 +51,7 @@ function update_github_package_version { | |||
|
|||
function get_kernel_version { | |||
CONFIG_FILE=.config | |||
CONFIG_VAR=BR2_LINUX_KERNEL_VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is no longer used for custom repos.
CONFIG_VAR=BR2_LINUX_KERNEL_VERSION | ||
sed -ri "s/(^$CONFIG_VAR=\")[0-9a-f]+(\")$/\1$GITREV\2/" "$CONFIG_FILE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, This variable is no longer used for custom repos.
BUILDME.sh
Outdated
# Fix for modular kernel: Force recreation of rootfs image to include modules | ||
rm "$IMAGES_DIR/rootfs.squashfs" | ||
make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build order changed in the latest buildroot. If this is not done, the image doesn't contain the kernel modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 434ed06
Fix PINN for QT5 & latest buildroot
Use QT5 features, fix include paths, ...
recovery/bootselectiondialog.cpp
Outdated
@@ -31,7 +31,7 @@ | |||
#include <QSettings> | |||
#include <QDesktopWidget> | |||
#include <QScreen> | |||
#include <QWSServer> | |||
// #include <QWSServer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove everything related to QWS later and replace it with a custom implementation that connects to the compositor and tells it to change its settings.
recovery/bootselectiondialog.cpp
Outdated
@@ -56,7 +56,7 @@ BootSelectionDialog::BootSelectionDialog( | |||
_dsi(dsi), | |||
ui(new Ui::BootSelectionDialog), | |||
_inSelection(false), | |||
_drive(drive.toAscii()) | |||
_drive(drive.toLatin1()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No functional change, ttoAscii was replaced with toLatin1 in 5.0.
recovery/confeditdialog.cpp
Outdated
@@ -15,7 +15,7 @@ | |||
|
|||
#include <QDir> | |||
#include <QFile> | |||
#include <QtGui/QPlainTextEdit> | |||
#include <QPlainTextEdit> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer part of the QtGui module, but still available.
recovery/json.cpp
Outdated
#include <qjson-qt5/parser.h> | ||
#include <qjson-qt5/serializer.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QJson is now called qjson-qt5, but functionality stays the same.
recovery/recovery.pro
Outdated
@@ -4,11 +4,9 @@ | |||
# | |||
#------------------------------------------------- | |||
|
|||
QT += core gui network dbus | |||
QT += core gui network dbus widgets multimedia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the qjson path change already broke QT4 support, I removed the QT5 check and added widgets directly here, some part also used the multimedia module, but I don't remember where this was needed.
recovery/recovery.pro
Outdated
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | ||
|
||
RPI_USERLAND_DIR=../../staging/usr | ||
RPI_USERLAND_DIR=../../host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Staging is not inbuildroot/output/staging anymore (Buildroot creates a symlink when creating the final image, but not earlier).
recovery/translation_ca.ts
Outdated
@@ -1,6 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!DOCTYPE TS> | |||
<TS version="2.0" language="ca_ES"> | |||
<TS version="2.1" language="ca_ES"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done by default in qt5, all changes to translation files were done automatically.
d683900
to
662bb9a
Compare
@procount While trying to get this working, I found out that a complete change of the boot partition is needed, which would break the update system, so an update to prepare PINN for the next update would be needed if these changes are implemented (at least if I understand the update system correctly). The change is needed because having the firmware named recovery.elf prevents it from reading fixup.dat, which results in a lot of memory-related errors.
|
Is it not possible to run Qt5 without OpenGL(ES) and a compositor, e.g. just using a simple framebuffer like is used in Qt4? |
Actually, only a single window can be used without compositor and OpenGL, which won't work for PINN (browser, language selection, config, ...) |
That is surprising. According to https://doc.qt.io/qt-5/qpaintengine.html#details "Qt provides several premade implementations of QPaintEngine for the different painter backends we support. The primary paint engine provided is the raster paint engine, which contains a software rasterizer which supports the full feature set on all supported platforms. " |
Haven't seen that yet. The compositor uses other OpenGL features, but maybe I can get it to work properly. |
It seems you are correct. Sounds like this is a backward step by qt in my opinion. |
@AaronDewes - I've heard reports that Qt5 does not work well with buildroot on the RPi as you have found, mostly probably due to the Rpi specifics themselves. Whilst it may be possible to fix all the issues, this does result in a major change to the PINN software and a lot of risk. Previous attempts to advance PINN in this manner have not been totally successful. It also requires changes to the firmware, buildroot and the PINN recovery program, and extra bloat that may be difficult to manage on a Pi0 or 1. I wonder if a better approach would be to do this one step at a time. It might be better to concentrate on just evolving buildroot to a later version and reverting to the use of Qt4. This may mean backtracking a bit and porting Qt4 into the new buildroot environment, but it may allow a new development environment to be used a lot sooner. Once that is working properly, converting to qt5 could be reconsidered at a later stage. And maybe some of the issues with it will have been resolved by then. |
Most of these issues are fixed with a1ccdd1.
No, with compositor 0.3 (will be pushed soon), the firmware doesn't require any changes.
Only adding these patches (a1ccdd1), everything else is in 2020.08.
Only minor changes are needed there (remove some QWS code, and replace it with something else, I'm currently testing a solution for that)
About 20 MB more RAM usage, I don't know if that''s an issue on the 256 MB models (I don't have one), but I don't think too many problems are caused there.
I've tried that, but haven't been successful. I'll try again if my QT5 attempt fails, but as I said before, compositor 0.3 is much better. |
7fe60ca
to
053b5d3
Compare
But you're right, QT5 is really broken on RPi, but I'm trying to change that: https://codereview.qt-project.org/c/qt/qtwayland/+/310822. |
353a3fe
to
b4dab5c
Compare
Normally, this is disallowed because build failures occured in some test builds. I haven't experienced this, and parted is needed for PINN, so I changed this.
The path is different now, but the file was not changed.
Use QT5 features, fix include paths, ...
b4dab5c
to
085df40
Compare
Build of qt5wayland fails on the Raspberry Pi for multiple reasons. These patches are already merged or proposed in qt and probably won't be needed when the next buildroot update is done.
Sorry for not working on this, I had some issues, because I didn't get fixup.dat to work, because I didn't know it had to be called fixup_rc.dat, but NOOBS 3.5 resolved that issue, I'll rebase and update this PR after you merged NOOBS 3.5 (I assume you'll do that, If not, please tell me), I'll wait with rebasing because otherwise I'd have to do the rebase again. |
No worries at all. I appreciate all your efforts and hope it will work out in the end. Timescales are all yours. 😉 |
I'll wait for Buildroot 2020.02 to release so I can directly update this to Qt 6, because QT 6 doesn't require any major changes from QT 5, but still needs some optimizations |
This is not tested yet. This updates the included buildroot to version 2018.11, the last version with QT4.
Differences to the default buildroot 2018.11: