Skip to content

Commit

Permalink
adreno split
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewb1 committed Oct 23, 2023
1 parent 2bca14d commit 064590c
Show file tree
Hide file tree
Showing 122 changed files with 275 additions and 73 deletions.
37 changes: 17 additions & 20 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,16 @@ FROM agnos-compiler as agnos-compiler-mapbox-gl-native
COPY ./userspace/compile-mapbox-gl-native.sh /tmp/agnos/
RUN /tmp/agnos/compile-mapbox-gl-native.sh

FROM agnos-compiler as agnos-compiler-libglvnd
COPY ./userspace/compile-libglvnd.sh /tmp/agnos/
RUN /tmp/agnos/compile-libglvnd.sh
RUN ls /tmp/libglvnd

# ################### #
# ###### AGNOS ###### #
# ################### #
FROM agnos-base

# Hardware setup
RUN mkdir -p /tmp/agnos/debs
COPY ./userspace/debs /tmp/agnos/debs
COPY ./userspace/hardware_setup.sh /tmp/agnos
RUN /tmp/agnos/hardware_setup.sh
RUN mv /data/persist /system/ && rm -rf /data/*

# Build ModemManager
COPY ./userspace/compile-modemmanager.sh /tmp/agnos/
RUN /tmp/agnos/compile-modemmanager.sh
Expand All @@ -78,6 +76,10 @@ COPY --from=agnos-compiler-ffmpeg /tmp/ffmpeg.deb /tmp/ffmpeg.deb
RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./ffmpeg.deb
COPY --from=agnos-compiler-mapbox-gl-native /tmp/libqmapboxgl.so /lib/aarch64-linux-gnu/libqmapboxgl.so

COPY --from=agnos-compiler-libglvnd /tmp/libglvnd.deb /tmp/libglvnd.deb
RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./libglvnd.deb


RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \
export PYENV_ROOT="/usr/local/pyenv" && \
eval "$(pyenv init -)" && \
Expand All @@ -98,25 +100,13 @@ RUN export PATH="/usr/local/pyenv/bin:/usr/local/pyenv/shims:$PATH" && \
poetry config virtualenvs.create false --local && \
export PYOPENCL_CL_PRETEND_VERSION="2.0" && \
export POETRY_VIRTUALENVS_CREATE=false && \
MAKEFLAGS="-j$(nproc)" poetry install --no-cache --no-root && \
MAKEFLAGS="-j40" poetry install --no-cache --no-root && \
pyenv rehash

# Install nice to haves
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

# Patched qtwayland that does not use EGL EXT, and 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
COPY ./userspace/qtwayland/libqwayland-egl.so /lib/aarch64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so
COPY ./userspace/qtwayland/libQt5WaylandClient.so.5.12.8 /lib/aarch64-linux-gnu/libQt5WaylandClient.so.5.12.8

# Patched libeglSubDriverWayland with fixed nullptr deref in CommitBuffer
COPY ./userspace/files/libeglSubDriverWayland.so.patched /lib/aarch64-linux-gnu/libeglSubDriverWayland.so

COPY ./userspace/home/ /home/$USERNAME/
COPY ./userspace/home/.config/ /root/.config
RUN chown -R $USERNAME: /home/$USERNAME/.config
Expand Down Expand Up @@ -217,6 +207,13 @@ RUN /tmptmp/readonly_setup.sh && rm -rf /tmptmp
# copy at the end, after all apt usage
COPY ./userspace/files/apt.conf /etc/apt/apt.conf

# Hardware setup
RUN mkdir -p /tmp/agnos/debs
COPY ./userspace/debs /tmp/agnos/debs
COPY ./userspace/hardware_setup.sh /tmp/agnos
RUN /tmp/agnos/hardware_setup.sh
RUN mv /data/persist /system/ && rm -rf /data/*

# Write version file
RUN echo -n "8.2" > /VERSION

Expand Down
1 change: 1 addition & 0 deletions userspace/base_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ apt-get install --no-install-recommends -yq \
libgles1 \
libgles2 \
libgles-dev \
libglvnd-dev \
libwayland-dev \
pulseaudio \
pulseaudio-utils \
Expand Down
16 changes: 16 additions & 0 deletions userspace/compile-libglvnd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

apt update && apt install -y libxext-dev libx11-dev x11proto-gl-dev ninja-build meson

cd /tmp
git clone https://gitlab.freedesktop.org/glvnd/libglvnd.git
cd libglvnd

./autogen.sh
./configure

export MAKEFLAGS="-j$(nproc)"
make

checkinstall -yD --install=no --pkgname=libglvnd
mv libglvnd*.deb /tmp/libglvnd.deb
4 changes: 2 additions & 2 deletions userspace/debs/agnos-display_0.0.1.deb
Git LFS file not shown
6 changes: 6 additions & 0 deletions userspace/debs/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR

dpkg-deb --build src/agnos-display agnos-display_0.0.1.deb
10 changes: 10 additions & 0 deletions userspace/debs/src/agnos-display/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: agnos-display
Version: 0.0.1
Section:
Priority: optional
Architecture: arm64
Depends:
Replaces: libopencl1, ocl-icd-libopencl1, libgsl-dev, ocl-icd-opencl-dev
Installed-Size: 161824
Maintainer: Robbe Derks [email protected]
Description: AGNOS display stuff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added userspace/debs/src/agnos-display/usr/bin/gbmtest
Binary file not shown.
Binary file not shown.
Binary file added userspace/debs/src/agnos-display/usr/bin/weston
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions userspace/debs/src/agnos-display/usr/lib64/libOpenCL.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"file_format_version" : "1.0.0",
"ICD" : {
"library_path" : "libEGL_adreno.so.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Weston
Comment=The reference Wayland server
Exec=dbus-launch --exit-with-session weston
Type=Application
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions userspace/debs/src/agnos-display/usr/share/weston/wayland.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions userspace/files/profile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fi
# display setup
export XDG_RUNTIME_DIR="/var/tmp/weston"
export QT_QPA_PLATFORM="wayland-egl"
export __GLX_VENDOR_LIBRARY_NAME="adreno"

# python setup
export PYTHONPATH="/data/pythonpath"
Expand Down
Loading

0 comments on commit 064590c

Please sign in to comment.