From d665e03298bf8bb00e8adc94077561fe82463786 Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Tue, 30 Apr 2024 20:26:13 +0300 Subject: [PATCH] Ubuntu 24.04 (#188) * separate out qtwayland5 compilation * ubuntu 22.04 * temp build system image * remove bionic deps * temp packages update * update armhf packages * back to libstdc++6 * replaced remove dqt5-default meta package with actual depss * fix for build libqmi crashing with /usr/bin/env: 'python': No such file or directory * mapbox-gl-native gcc11 fix * openpilot_dependencies.sh change * ubuntu-base 24.04 daily current * apt install meson because PEP 668 * temp g++-11 for mapbox-gl-native * bump capnproto to 1.0.2 * temp build only agnos-compiler-mapbox-gl-native * Fixes for compiling mapbox-gl-native * Fixes for compiling ffmpeg * Build main system image again * pyopencl from git since no 2023.1.5 release since https://github.com/inducer/pyopencl/issues/705 * Try to fix checkinstall - no success * apt capnproto & ffmpeg since can't figure out issue with checkinstall * Commented removed services disable * Ubuntu 24.04 currently has arm-none-eabi/12.2.1 but just use wildcard to go to first folder * pyclean is missing ?! * ubuntu-latest in tests workflow * Updated README * Reverted internal/package_ota.py changes * rebuilt kernel * poetry.lock update * Simplified build_system pipeline * headers for capnproto * Fix typo * Fix for checkinstall * Reverted apt capnproto & ffmpeg * Some cleaning in Dockerfile * 24.04 libwayland-client * libffi6:armhf deb file * Updated qtwayland * Revert "libffi6:armhf deb file" This reverts commit bb9cb5da95e11868516a82764cb6d459ed4542f0. * libffi.so.6.0.4 * qt5-qmake qtbase5-dev qtbase5-dev-tools already in qt5-default * Removed qtwayland old files * checkinstall temp fix * QStandardPaths: wrong permissions on runtime directory /var/tmp/weston, 0770 instead of 0700 * temp permissions fix makes loading build spinner show * temp build optimization * 24.04 new libs * build kernel don't use tools on aarch64/arm64 * updated boot image and ko files * cleaning * switch to release 24.04 * wip - downgrade qt and libwayland * polkitd-pkla package to support polkit *.pkla * fixed issue with old qt needing libssl 1.1.1f * remove /.dockerenv file * more cleaning --------- Co-authored-by: Justin Newberry Co-authored-by: Adeeb Shihadeh --- Dockerfile.agnos | 32 +++++++++-------- README.md | 3 +- build_kernel.sh | 15 ++++---- build_system.sh | 8 +++-- userspace/base_setup.sh | 28 ++++++++------- userspace/compile-capnp.sh | 3 +- userspace/compile-ffmpeg.sh | 10 ++++-- userspace/compile-mapbox-gl-native.sh | 16 +++++++-- userspace/compile-modemmanager.sh | 7 ++-- userspace/compile-qtwayland5.sh | 11 +++--- userspace/files/weston-ready.service | 3 +- userspace/files/weston.service | 1 + userspace/hardware_setup.sh | 1 + userspace/openpilot_dependencies.sh | 35 +++++++++++-------- .../libicu66_66.1-2ubuntu2.1_arm64.deb | 3 ++ .../libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb | 3 ++ userspace/qtwayland/libwayland-1.9.0-1.deb | 3 ++ .../{patch => patch-qtwayland-v5.12} | 9 ----- userspace/qtwayland/patch-qtwayland-v5.15 | 25 +++++++++++++ userspace/qtwayland/qt-5.12.8.deb | 3 ++ userspace/services.sh | 6 ++-- userspace/usr/comma/tests/benchmark_weston.py | 2 +- 22 files changed, 149 insertions(+), 78 deletions(-) create mode 100644 userspace/qtwayland/libicu66_66.1-2ubuntu2.1_arm64.deb create mode 100644 userspace/qtwayland/libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb create mode 100644 userspace/qtwayland/libwayland-1.9.0-1.deb rename userspace/qtwayland/{patch => patch-qtwayland-v5.12} (87%) create mode 100644 userspace/qtwayland/patch-qtwayland-v5.15 create mode 100644 userspace/qtwayland/qt-5.12.8.deb diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 3d2c594..ef6760b 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -2,7 +2,7 @@ # ###### Base ###### # # ################## # FROM scratch AS agnos-base -ADD ubuntu-base-20.04.1-base-arm64.tar.gz / +ADD ubuntu-base-24.04-base-arm64.tar.gz / # Add aarch64 and arm support COPY --from=multiarch/qemu-user-static:x86_64-aarch64 /usr/bin/qemu-aarch64-static /usr/bin @@ -23,16 +23,25 @@ RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set- COPY ./userspace/base_setup.sh /tmp/agnos RUN /tmp/agnos/base_setup.sh +# Install openpilot dependencies +COPY ./userspace/openpilot_dependencies.sh /tmp/agnos/ +RUN /tmp/agnos/openpilot_dependencies.sh + +# Install old Qt 5.12.8, libwayland 1.9.0-1 and deps +COPY ./userspace/qtwayland/*.deb /tmp/agnos/ +RUN apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ + /tmp/agnos/qt-5.12.8.deb \ + /tmp/agnos/libwayland-1.9.0-1.deb \ + /tmp/agnos/libicu66_66.1-2ubuntu2.1_arm64.deb \ + /tmp/agnos/libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb \ + libdouble-conversion3 + # ################## # # #### Compiler #### # # ################## # FROM agnos-base as agnos-compiler RUN apt-get update && apt-get install --no-install-recommends checkinstall -# Install openpilot dependencies, probably needed for build, -# but we don't want these in the base image -COPY ./userspace/openpilot_dependencies.sh /tmp/agnos/ -RUN /tmp/agnos/openpilot_dependencies.sh # Individual compiling images FROM agnos-compiler as agnos-compiler-capnp @@ -49,7 +58,7 @@ RUN /tmp/agnos/compile-mapbox-gl-native.sh FROM agnos-compiler as agnos-compiler-qtwayland5 COPY ./userspace/compile-qtwayland5.sh /tmp/agnos/ -COPY ./userspace/qtwayland/patch /tmp/agnos/ +COPY ./userspace/qtwayland/patch* /tmp/agnos/ RUN /tmp/agnos/compile-qtwayland5.sh # ################### # @@ -72,9 +81,6 @@ RUN /tmp/agnos/compile-modemmanager.sh COPY --from=agnos-compiler-capnp /tmp/capnproto.deb /tmp/capnproto.deb RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./capnproto.deb -# Install openpilot dependencies -COPY ./userspace/openpilot_dependencies.sh /tmp/agnos/ -RUN /tmp/agnos/openpilot_dependencies.sh COPY ./userspace/openpilot_python_dependencies.sh /tmp/agnos/ RUN /tmp/agnos/openpilot_python_dependencies.sh @@ -87,7 +93,7 @@ RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \ export PYENV_ROOT="/usr/local/pyenv" && \ eval "$(pyenv init -)" && \ eval "$(pyenv virtualenv-init -)" && \ - export MAKEFLAGS="-j40" && \ + export MAKEFLAGS="-j$(nproc)" && \ pip install pyqt5-sip==12.12.1 && \ pip install pyqt5==5.15.9 --verbose --config-settings --confirm-license= && \ pyenv rehash @@ -110,10 +116,6 @@ RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \ COPY ./userspace/install_extras.sh /tmp/agnos/ RUN /tmp/agnos/install_extras.sh -# 16.04 libwayland-client + libffi6 -COPY ./userspace/qtwayland/libffi.so.6 /lib/aarch64-linux-gnu/ -COPY ./userspace/qtwayland/libwayland-client.so.0 /lib/aarch64-linux-gnu/libwayland-client.so.0 - COPY --from=agnos-compiler-qtwayland5 /tmp/qtwayland5.deb /tmp/qtwayland5.deb RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq --allow-downgrades ./qtwayland5.deb @@ -197,7 +199,7 @@ RUN sed -i 's/hosts: files dns myhostname/hosts: files myhostn # TODO: move this to base_setup.sh or build gcc from source # Remove unused architectures from arm-none-eabi -RUN cd /usr/lib/gcc/arm-none-eabi/9.2.1 && \ +RUN cd /usr/lib/gcc/arm-none-eabi/* && \ rm -rf arm/ && \ rm -rf thumb/nofp thumb/v6* thumb/v8* thumb/v7+fp thumb/v7-r+fp.sp diff --git a/README.md b/README.md index 9b89220..1b0ac6b 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,13 @@ NOTE: the `edk2_tici` and `agnos-firmware` submodules are internal, private repo ## Setup -These tools are developed on and targeted for Ubuntu 20.04. +These tools are developed on and targeted for Ubuntu 24.04. Run once to set things up: ```sh git submodule update --init agnos-kernel-sdm845 ./tools/extract_tools.sh +sudo apt install img2simg ``` ## Build the userspace diff --git a/build_kernel.sh b/build_kernel.sh index bb70289..eae5578 100755 --- a/build_kernel.sh +++ b/build_kernel.sh @@ -4,6 +4,7 @@ DEFCONFIG=tici_defconfig # Get directories and make sure we're in the correct spot to start the build DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +ARCH=$(uname -m) TOOLS=$DIR/tools TMP_DIR=/tmp/agnos-builder-tmp OUTPUT_DIR=$DIR/output @@ -16,13 +17,15 @@ if git submodule status --cached agnos-kernel-sdm845/ | grep "^-"; then fi cd agnos-kernel-sdm845 -$DIR/tools/extract_tools.sh +if [ "$ARCH" != "arm64" ] && [ "$ARCH" != "aarch64" ]; then + $DIR/tools/extract_tools.sh -# Build parameters -export ARCH=arm64 -export CROSS_COMPILE=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu- -export CC=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-gcc -export LD=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-ld.bfd + # Build parameters + export ARCH=arm64 + export CROSS_COMPILE=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu- + export CC=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-gcc + export LD=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-ld.bfd +fi # these do anything? export KCFLAGS="-w" diff --git a/build_system.sh b/build_system.sh index f8fda71..1bc489b 100755 --- a/build_system.sh +++ b/build_system.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e -UBUNTU_BASE_URL="http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release" -UBUNTU_FILE="ubuntu-base-20.04.1-base-arm64.tar.gz" +UBUNTU_BASE_URL="http://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release" +UBUNTU_FILE="ubuntu-base-24.04-base-arm64.tar.gz" export DOCKER_BUILDKIT=1 @@ -65,6 +65,10 @@ docker container rm $CONTAINER_ID > /dev/null cd $ROOTFS_DIR sudo tar -xf $BUILD_DIR/filesystem.tar > /dev/null +# Remove the .dockerenv file +echo "Removing .dockerenv file" +sudo rm -f $ROOTFS_DIR/.dockerenv + # Add hostname and hosts. This cannot be done in the docker container... echo "Setting network stuff" HOST=comma diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index 63ac1bc..58de504 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -111,8 +111,9 @@ echo "makestep 0.1 3" >> /etc/chrony/chrony.conf mkdir /data && chown $USERNAME:$USERNAME /data mkdir /persist && chown $USERNAME:$USERNAME /persist +# TODO: this is from 20.04, does it have a replacement? # Disable automatic ondemand switching from ubuntu -systemctl disable ondemand +#systemctl disable ondemand # Disable pstore service that moves files out of /sys/fs/pstore systemctl disable systemd-pstore.service @@ -127,7 +128,7 @@ ln -sf /bin/bash /bin/sh apt-get update -yq apt-get install --no-install-recommends -yq \ libacl1:armhf \ - libasan5-armhf-cross \ + libasan6-armhf-cross \ libatomic1-armhf-cross \ libattr1:armhf \ libaudit1:armhf \ @@ -141,13 +142,12 @@ apt-get install --no-install-recommends -yq \ libdrm2:armhf \ libevdev2:armhf \ libexpat1:armhf \ - libffi7:armhf \ + libffi8:armhf \ libfontconfig1:armhf \ libfreetype6:armhf \ libgbm1:armhf \ - libgcc-9-dev-armhf-cross \ - libgcc1:armhf \ - libglib2.0-0:armhf \ + libgcc-11-dev-armhf-cross \ + libglib2.0-0t64:armhf \ libgomp1-armhf-cross \ libgudev-1.0-0:armhf \ libinput-bin:armhf \ @@ -159,12 +159,12 @@ apt-get install --no-install-recommends -yq \ libjpeg8:armhf \ libjpeg8-dev:armhf \ libkmod2:armhf \ - libmtdev1:armhf \ + libmtdev1t64:armhf \ libpam0g:armhf \ libpam0g-dev:armhf \ libpcre3:armhf \ libpixman-1-0:armhf \ - libpng16-16:armhf \ + libpng16-16t64:armhf \ libselinux1:armhf \ libstdc++6:armhf \ libstdc++6-armhf-cross \ @@ -172,10 +172,7 @@ apt-get install --no-install-recommends -yq \ libudev-dev:armhf \ libudev1:armhf \ libuuid1:armhf \ - libwacom2:armhf \ - libwayland-client0:armhf \ - libwayland-cursor0:armhf \ - libwayland-server0:armhf \ + libwacom9:armhf \ libx11-6:armhf \ libxau6:armhf \ libxcb-render0:armhf \ @@ -193,7 +190,6 @@ apt-get install --no-install-recommends -yq \ libgles1 \ libgles2 \ libgles-dev \ - libwayland-dev \ openssh-server \ dnsmasq-base \ isc-dhcp-client \ @@ -204,3 +200,9 @@ apt-get install --no-install-recommends -yq \ hostapd \ libgtk2.0-dev \ libxml2:armhf \ + +# TODO: put these back when updating weston & removing old libwayland-1.9.0-1.deb + # libwayland-client0:armhf \ + # libwayland-cursor0:armhf \ + # libwayland-server0:armhf \ + # libwayland-dev \ diff --git a/userspace/compile-capnp.sh b/userspace/compile-capnp.sh index 90cb46f..6b9d558 100755 --- a/userspace/compile-capnp.sh +++ b/userspace/compile-capnp.sh @@ -10,5 +10,6 @@ CXXFLAGS="-fPIC -O2" ./configure make -j$(nproc) -checkinstall -yD --install=no --pkgname=capnproto +# TODO remove "--fstrans=no" when checkinstall is fixed +checkinstall -yD --install=no --fstrans=no --pkgname=capnproto mv capnproto*.deb /tmp/capnproto.deb diff --git a/userspace/compile-ffmpeg.sh b/userspace/compile-ffmpeg.sh index 3c04814..78c0c7c 100755 --- a/userspace/compile-ffmpeg.sh +++ b/userspace/compile-ffmpeg.sh @@ -6,8 +6,14 @@ wget https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2 tar xvf ffmpeg-4.2.2.tar.bz2 cd ffmpeg-4.2.2 -./configure --enable-shared --disable-static +# avoid makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24. +# with --disable-htmlpages +# --disable-doc works too, disables building documentation completely +# https://gist.github.com/omegdadi/6904512c0a948225c81114b1c5acb875 +# https://github.com/7Ji/archrepo/issues/10 +./configure --enable-shared --disable-static --disable-htmlpages make -j$(nproc) -checkinstall -yD --install=no --pkgname=ffmpeg +# TODO remove "--fstrans=no" when checkinstall is fixed +checkinstall -yD --install=no --fstrans=no --pkgname=ffmpeg mv ffmpeg*.deb /tmp/ffmpeg.deb diff --git a/userspace/compile-mapbox-gl-native.sh b/userspace/compile-mapbox-gl-native.sh index 78e8fb1..2bd3917 100755 --- a/userspace/compile-mapbox-gl-native.sh +++ b/userspace/compile-mapbox-gl-native.sh @@ -1,10 +1,22 @@ #!/bin/bash -e +apt-get install --no-install-recommends -yq g++-11 + +# https://github.com/commaai/agnos-builder/pull/188#issuecomment-1893380448 +export CXX=g++-11 +# Suppress warnings about deprecated declarations +export CXXFLAGS="-Wno-deprecated-declarations" +# TODO: remove no-deprecated-declarations and +# replace QImage::byteCount() with QImage::sizeInBytes(). This is a direct replacement as suggested by the deprecation message. +# replace QFontMetrics::width(QChar) with QFontMetrics::horizontalAdvance(QChar). This method is the recommended replacement for measuring the width of a character in the new versions of Qt. + # Build mapbox-gl-native cd /tmp -git clone --recursive https://github.com/commaai/mapbox-gl-native.git +# TODO: switch back to "https://github.com/commaai/mapbox-gl-native.git" after "https://github.com/commaai/mapbox-gl-native/pull/1" is merged +git clone --recursive https://github.com/andiradulescu/mapbox-gl-native.git cd mapbox-gl-native -git checkout 69f41ffff655ee28834c167ad1353112f370e6e5 +# removed commit pin +# git checkout 69f41ffff655ee28834c167ad1353112f370e6e5 mkdir build && cd build cmake -DMBGL_WITH_QT=ON .. make -j$(nproc) mbgl-qt diff --git a/userspace/compile-modemmanager.sh b/userspace/compile-modemmanager.sh index 1f13c39..6080fc6 100755 --- a/userspace/compile-modemmanager.sh +++ b/userspace/compile-modemmanager.sh @@ -11,8 +11,7 @@ apt update apt install -y --no-install-recommends automake autoconf build-essential cmake # TODO: clean up these build time dependencies -apt install -y --no-install-recommends python3 python3-pip python3-setuptools python3-wheel ninja-build -pip3 install --user meson +apt install -y --no-install-recommends python3 python3-pip python3-setuptools python3-wheel ninja-build meson export PATH=$PATH:/root/.local/bin # build mobile-broadband-provider-info @@ -25,7 +24,7 @@ make install # build libqmi cd /tmp -apt install -y --no-install-recommends libgudev-1.0-dev gobject-introspection libgirepository1.0-dev help2man bash-completion +apt install -y --no-install-recommends libgudev-1.0-dev gobject-introspection libgirepository1.0-dev help2man bash-completion python-is-python3 git clone -b $LIBQMI_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqmi.git cd libqmi @@ -35,7 +34,7 @@ ninja -C build install # build ModemManager cd /tmp -apt install -y --no-install-recommends gettext libpolkit-gobject-1-dev libdbus-1-dev libsystemd-dev +apt install -y --no-install-recommends gettext libpolkit-gobject-1-dev libdbus-1-dev libsystemd-dev polkitd-pkla git clone -b $MM_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git diff --git a/userspace/compile-qtwayland5.sh b/userspace/compile-qtwayland5.sh index 064eef5..e97afd5 100755 --- a/userspace/compile-qtwayland5.sh +++ b/userspace/compile-qtwayland5.sh @@ -1,13 +1,15 @@ #!/bin/bash -e # Patched qtwayland that outputs a fixed screen size -# Clone qtwayland submodule, checkout 5.12.9 (5.12.8 leaks timers, see https://bugreports.qt.io/browse/QTBUG-82914), apply patch, qmake, make +# Clone qtwayland submodule, checkout, apply patch, qmake, make +# VERSION=5.15.13-lts-lgpl +VERSION=5.12.9 cd /tmp -git clone --branch v5.12.9 https://github.com/qt/qtwayland.git +git clone --branch v${VERSION} https://github.com/qt/qtwayland.git cd qtwayland -git apply /tmp/agnos/patch +git apply /tmp/agnos/patch-qtwayland-v5.12 mkdir /tmp/build && cd /tmp/build qmake /tmp/qtwayland @@ -15,5 +17,6 @@ qmake /tmp/qtwayland export MAKEFLAGS="-j$(nproc)" make -checkinstall -yD --install=no --pkgversion="5.12.8" --pkgname=qtwayland5 --pkgarch=arm64 --replaces=qtwayland5,libqt5waylandclient5,libqt5waylandcompositor5 +# TODO remove "--fstrans=no" when checkinstall is fixed +checkinstall -yD --install=no --fstrans=no --pkgversion="${VERSION}" --pkgname=qtwayland5 --pkgarch=arm64 --replaces=qtwayland5,libqt5waylandclient5,libqt5waylandcompositor5 mv qtwayland5*.deb /tmp/qtwayland5.deb diff --git a/userspace/files/weston-ready.service b/userspace/files/weston-ready.service index d69e692..49b84cf 100644 --- a/userspace/files/weston-ready.service +++ b/userspace/files/weston-ready.service @@ -14,7 +14,8 @@ ExecStart=/bin/bash -c "while [ ! -e \"$XDG_RUNTIME_DIR/wayland-0\" ]; do sleep ExecStart=/bin/sleep 0.5 ExecStart=/bin/echo "fixing permissions" -ExecStart=/bin/bash -c "chmod -R 770 $XDG_RUNTIME_DIR" +ExecStart=/bin/bash -c "chown -R comma: $XDG_RUNTIME_DIR" +ExecStart=/bin/bash -c "chmod -R 700 $XDG_RUNTIME_DIR" # these are set by udev rules, but udev is slow ExecStart=/bin/bash -c "chgrp gpu /dev/ion /dev/kgsl-3d0" diff --git a/userspace/files/weston.service b/userspace/files/weston.service index c7d4955..a79357b 100644 --- a/userspace/files/weston.service +++ b/userspace/files/weston.service @@ -17,6 +17,7 @@ TTYVTDisallocate=yes ExecStartPre=/bin/bash -c "mkdir -p $XDG_RUNTIME_DIR" ExecStartPre=/bin/bash -c "chown -R comma: $XDG_RUNTIME_DIR" +ExecStartPre=/bin/bash -c "chmod -R 700 $XDG_RUNTIME_DIR" ExecStartPre=/bin/bash -c "mkdir -p /data/misc/display || true" ExecStartPre=/bin/bash -c "echo 0 > /data/misc/display/sdm_dbg_cfg.txt || true" diff --git a/userspace/hardware_setup.sh b/userspace/hardware_setup.sh index 191665c..3942acc 100755 --- a/userspace/hardware_setup.sh +++ b/userspace/hardware_setup.sh @@ -2,6 +2,7 @@ # Install driver deb files (we're fine with overwriting stuff too) cd /tmp/agnos/debs +mkdir /lib64 apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ ./agnos-base.deb \ ./agnos-display_0.0.1.deb \ diff --git a/userspace/openpilot_dependencies.sh b/userspace/openpilot_dependencies.sh index deb4174..fe55541 100755 --- a/userspace/openpilot_dependencies.sh +++ b/userspace/openpilot_dependencies.sh @@ -29,7 +29,7 @@ apt-get install --no-install-recommends -yq \ libffi-dev \ libfreetype6-dev \ libglfw3-dev \ - libglib2.0-0 \ + libglib2.0-0t64 \ libi2c-dev \ libjpeg-dev \ liblzma-dev \ @@ -61,18 +61,23 @@ apt-get install --no-install-recommends -yq \ vnstat \ wget \ zlib1g-dev \ - libqt5location5-plugin-mapboxgl \ - libqt5opengl5-dev \ - libqt5sql5-sqlite \ - libqt5svg5-dev \ - libqt5multimedia5-plugins \ - qml-module-qtquick2 \ - qt5-default \ - qtbase5-private-dev \ - qtdeclarative5-dev \ - qtdeclarative5-private-dev \ - qtlocation5-dev \ - qtmultimedia5-dev \ - qtpositioning5-dev \ - qtwayland5 \ zstd + +# TODO: put these back when updating weston & removing old qt-5.12.8.deb + # libqt5location5-plugin-mapboxgl \ + # libqt5opengl5-dev \ + # libqt5sql5-sqlite \ + # libqt5svg5-dev \ + # libqt5multimedia5-plugins \ + # qml-module-qtquick2 \ + # qt5-qmake \ + # qtbase5-dev \ + # qtbase5-dev-tools \ + # qtbase5-private-dev \ + # qtchooser \ + # qtdeclarative5-dev \ + # qtdeclarative5-private-dev \ + # qtlocation5-dev \ + # qtmultimedia5-dev \ + # qtpositioning5-dev \ + # qtwayland5 \ diff --git a/userspace/qtwayland/libicu66_66.1-2ubuntu2.1_arm64.deb b/userspace/qtwayland/libicu66_66.1-2ubuntu2.1_arm64.deb new file mode 100644 index 0000000..757254e --- /dev/null +++ b/userspace/qtwayland/libicu66_66.1-2ubuntu2.1_arm64.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccfbd8e68fadcf4cc3975cdae42d1786733963f75d0b180f96c13782e185635b +size 8359564 diff --git a/userspace/qtwayland/libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb b/userspace/qtwayland/libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb new file mode 100644 index 0000000..c42ff55 --- /dev/null +++ b/userspace/qtwayland/libssl1.1_1.1.1f-1ubuntu2.22_arm64.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36b33bc85a8c75d539f00dcda80cf9d618a0ee56aec46761347409caeebb9028 +size 1158832 diff --git a/userspace/qtwayland/libwayland-1.9.0-1.deb b/userspace/qtwayland/libwayland-1.9.0-1.deb new file mode 100644 index 0000000..b9dad69 --- /dev/null +++ b/userspace/qtwayland/libwayland-1.9.0-1.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df6fa74cee8c567b9a4129bbeaad5ef13c84da50e6dcc899fb34bd93a6f42b6d +size 162120 diff --git a/userspace/qtwayland/patch b/userspace/qtwayland/patch-qtwayland-v5.12 similarity index 87% rename from userspace/qtwayland/patch rename to userspace/qtwayland/patch-qtwayland-v5.12 index 9cfd5f1..ac5024d 100644 --- a/userspace/qtwayland/patch +++ b/userspace/qtwayland/patch-qtwayland-v5.12 @@ -1,12 +1,3 @@ -diff --git a/.qmake.conf b/.qmake.conf -index 75083a78..04f5843a 100644 ---- a/.qmake.conf -+++ b/.qmake.conf -@@ -1,3 +1,3 @@ - load(qt_build_config) - --MODULE_VERSION = 5.12.9 -+MODULE_VERSION = 5.12.8 diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp index 1fe0125e..7899c94e 100644 --- a/src/client/qwaylandscreen.cpp diff --git a/userspace/qtwayland/patch-qtwayland-v5.15 b/userspace/qtwayland/patch-qtwayland-v5.15 new file mode 100644 index 0000000..e5b7e47 --- /dev/null +++ b/userspace/qtwayland/patch-qtwayland-v5.15 @@ -0,0 +1,25 @@ +diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp +index 6cb337d..9e3cc30 100644 +--- a/src/client/qwaylandscreen.cpp ++++ b/src/client/qwaylandscreen.cpp +@@ -127,6 +127,7 @@ QString QWaylandScreen::model() const + + QRect QWaylandScreen::geometry() const + { ++ return QRect(0, 0, 2160, 1080); + if (zxdg_output_v1::isInitialized()) { + return mXdgGeometry; + } else { +diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +index 4e4ea11..d819ae9 100644 +--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp ++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +@@ -79,7 +79,7 @@ void QWaylandEglClientBufferIntegration::initialize(QWaylandDisplay *display) + #if QT_CONFIG(egl_extension_platform_wayland) + m_eglDisplay = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, display->wl_display(), nullptr); + #else +- if (q_hasEglExtension(EGL_NO_DISPLAY, "EGL_EXT_platform_base")) { ++ if (false && q_hasEglExtension(EGL_NO_DISPLAY, "EGL_EXT_platform_base")) { + if (q_hasEglExtension(EGL_NO_DISPLAY, "EGL_KHR_platform_wayland") || + q_hasEglExtension(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland") || + q_hasEglExtension(EGL_NO_DISPLAY, "EGL_MESA_platform_wayland")) { diff --git a/userspace/qtwayland/qt-5.12.8.deb b/userspace/qtwayland/qt-5.12.8.deb new file mode 100644 index 0000000..4412c82 --- /dev/null +++ b/userspace/qtwayland/qt-5.12.8.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9860a4cae4ebc135fe1face36294285e89a42bd05e8199164f45f6ed7f9c621a +size 21413360 diff --git a/userspace/services.sh b/userspace/services.sh index 61947ce..bbacfbf 100755 --- a/userspace/services.sh +++ b/userspace/services.sh @@ -42,7 +42,8 @@ systemctl disable apt-daily.service systemctl disable apt-daily-upgrade.timer systemctl disable apt-daily.timer systemctl disable serial-getty@ttyS0.service -systemctl disable snapd.service +# Failed to disable unit, unit snapd.service does not exist. +# systemctl disable snapd.service systemctl disable wlan_daemon.service systemctl disable remote-fs.target systemctl disable remote-fs-pre.target @@ -60,4 +61,5 @@ systemctl mask systemd-backlight@.service systemctl disable rpcbind systemctl disable nfs-client.target systemctl disable remote-fs-pre.target -systemctl disable run-rpc_pipefs.mount +# Failed to disable unit, unit run-rpc_pipefs.mount does not exist. +# systemctl disable run-rpc_pipefs.mount diff --git a/userspace/usr/comma/tests/benchmark_weston.py b/userspace/usr/comma/tests/benchmark_weston.py index 7ae0d99..8362f89 100755 --- a/userspace/usr/comma/tests/benchmark_weston.py +++ b/userspace/usr/comma/tests/benchmark_weston.py @@ -11,7 +11,7 @@ def timestamp_cmd(cmd): while True: cnt += 1 print("try ", cnt) - run("sudo chmod -R 770 /var/tmp/weston/") + run("sudo chmod -R 700 /var/tmp/weston/") proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) t = time.monotonic() time.sleep(0.5)