Compare commits

...

1 Commits

Author SHA1 Message Date
71c5756e71 Prog on knulli 2026-03-16 11:45:36 -05:00
5 changed files with 75 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ file(MAKE_DIRECTORY ${DUSK_TEMP_DIR})
file(MAKE_DIRECTORY ${DUSK_BUILT_ASSETS_DIR})
# Required build packages
find_package(Python3 COMPONENTS Interpreter REQUIRED)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
# Init Project.
project(${DUSK_LIBRARY_TARGET_NAME}

View File

@@ -0,0 +1,16 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER aarch64-buildroot-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-buildroot-linux-gnu-g++)
set(CMAKE_SYSROOT /opt/aarch64-buildroot-linux-gnu_sdk-buildroot/aarch64-buildroot-linux-gnu/sysroot)
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig")

40
docker/knulli/Dockerfile Normal file
View File

@@ -0,0 +1,40 @@
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /workdir
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get -y update && apt-get -y install \
python3-dotenv \
bc \
bison \
build-essential \
bzip2 \
bzr \
cmake \
cmake-curses-gui \
cpio \
device-tree-compiler \
flex \
git \
imagemagick \
libncurses5-dev \
locales \
make \
nano \
p7zip-full \
rsync \
sharutils \
scons \
tree \
unzip \
vim \
wget \
zip \
python3 \
python3-pip \
python3-polib \
python3-pil \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
&& apt clean
VOLUME ["/workdir"]
CMD ["/bin/bash"]

3
scripts/build-knulli-docker.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker build --no-cache -t dusk-knulli -f docker/knulli/Dockerfile .
docker run --rm -v $(pwd):/workdir dusk-knulli /bin/bash -c "./scripts/build-knulli.sh"

15
scripts/build-knulli.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
git clone --depth 1 --branch SDL2 https://github.com/libsdl-org/SDL.git /tmp/SDL2 && \
cmake -S /tmp/SDL2 -B /tmp/SDL2/build \
-DCMAKE_TOOLCHAIN_FILE=/workdir/toolchain-aarch64-buildroot.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$SYSROOT/usr" && \
cmake --build /tmp/SDL2/build -j"$(nproc)" && \
cmake --install /tmp/SDL2/build
cmake -S . \
-B build-knulli \
-DDUSK_BUILD_TESTS=ON \
-DDUSK_TARGET_SYSTEM=linux \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/toolchain-aarch64-buildroot.cmake
cmake --build build-knulli -- -j$(nproc)