Skip to content

Conversation

@alexborro
Copy link
Contributor

This PR removes the (previously added) DRM support to QT5.
The IMX8 does not support DRM when running in Framebuffer mode, which is already hardware accelerated.
A previous PR disabled the DRM in Okuda and now this PR removes the support from QT5.
The immediate consequence of this PR is removing the dependency of QT5 from Ultimaker's versioned packages: libdrm-ultimaker and mesa-ultimaker

This PR also implements:

  • Ultimaker build system. Now one just need to run ./build_for_ultimaker.sh to build the package.
  • CI build.
  • Bump QT5 and PyQT compiler toolchain to Bookworm
  • Compile PyQT against Python 3.11 (used in Bookworm) instead of Buster.
  • Fix Package release version.

There are a few packages that we can remove from the build recipe. There will be soon a PR for cookbook to remove them - need to be coordinated with Bookworm merge:

  • libdrm-ultimaker
  • mesa-ultimaker
  • libwayland-server0
  • libwayland-client0
  • x11proto-xext-dev
  • libxshmfence1
  • libx11-xcb1
  • libxcb-dri2-0
  • libxcb-dri3-0
  • libxcb-present0
  • libxcb-sync1
  • libxcb-xfixes0

@alexborro alexborro requested a review from robinmdh July 14, 2025 08:18
- Remove unused dependecies from debian control file
- Update the qt config file "ultimaker-linux-imx8-g++" to properly compile without EGLFS.
- Remove unused packages from sysroot
Copy link
Member

@robinmdh robinmdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I like folding the sysroot build in with the main build I've forgotten to build that when manually building before.
And of course building in CI, very nice!

--qmake="${BUILD_DIR}/qtbase/bin/qmake"
--target-py-version="${PYQT_TARGET_PYTHON_VERSION}" \
--qmake="${BUILD_DIR}/qtbase/bin/qmake" \
--no-sip-files \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try a build with this option and the stubs option enabled? I'd be very interested to see if we can actually use stubs because we then might be able to have type checking work on the python bindings, instead of finding out we have a type errors at runtime.
I would also not be at all surprised if a build with those options enabled throws a lot of errors, but I did not know these options existed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the problem on enabling the stubs is that the Makefile will install them in the "current system folders", which is inside a docker environment.. Let me explain.. this is the makefile section that "install" (copy to the proper folders) those stuffs:

install_pep484_stubs: FORCE
	@test -d $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5 || mkdir -p $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtQml.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtQml.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtCore.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtCore.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtDBus.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtDBus.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtGui.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtGui.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtQuick.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtQuick.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtMultimedia.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtMultimedia.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtNetwork.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtNetwork.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtOpenGL.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtOpenGL.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtSvg.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtSvg.pyi
	-$(QINSTALL) /build/_build_imx8/pyqt/PyQt5_gpl-5.9.2/QtWidgets.pyi $(INSTALL_ROOT)/usr/lib/python3/dist-packages/PyQt5/QtWidgets.pyi

So the only thing it does is creating the folder /usr/lib/python3/dist-packages/PyQt5 and copying the stubs to it. But this folder is inside the docker system.

We have the configure option --stubsdir to define a new folder where these stubs will be copied into, which should be inside our target folder (the folder we create the debian package), so it can be installed in the printer.
If you want to try, we can easily explore this option and see how we can get those stubs in the printer, in the proper folder (which I have no idea what it is). But again, it is just a matter of enabling and setting the proper target folder.

Copy link
Contributor

@bryanfoley bryanfoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work Alex!

@alexborro alexborro merged commit f96dc2d into master/imx8 Jul 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants