diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 296c1f8..9d64fbf 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -74,6 +74,7 @@ ARG USERNAME=comma # Base system setup RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections +COPY ./userspace/debs /tmp/agnos/debs COPY ./userspace/base_setup.sh /tmp/agnos RUN /tmp/agnos/base_setup.sh @@ -90,11 +91,6 @@ FROM agnos-base COPY ./userspace/libs/* /usr/lib/aarch64-linux-gnu/ -# 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 COPY --from=agnos-compiler-graphics /tmp/agnos/graphics/ /usr/lib/aarch64-linux-gnu/ RUN mv /data/persist /system/ && rm -rf /data/* diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index 63284a3..2cec994 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -140,3 +140,27 @@ apt-fast install --no-install-recommends -yq \ wpasupplicant \ hostapd \ libgtk2.0-dev + +# Install driver deb files (we're fine with overwriting stuff too) +cd /tmp/agnos/debs + +# Setting up usr merged lib64 since it's not done by default (in 24.04-base) +# https://wiki.debian.org/UsrMerge +# https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ +mkdir /usr/lib64 +ln -s usr/lib64 /lib64 + +apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ + ./agnos-base_0.0.4.deb \ + ./agnos-display_0.0.4.deb \ + ./agnos-wlan_0.0.4.deb + +# Install 16.04 version of libjson-c2 +cd /tmp +wget http://ports.ubuntu.com/pool/main/j/json-c/libjson-c2_0.11-4ubuntu2.6_arm64.deb -O /tmp/libjson-c2_0.11-4ubuntu2.6_arm64.deb +apt install -yq /tmp/libjson-c2_0.11-4ubuntu2.6_arm64.deb + +# Remove apt cache +rm -rf /var/lib/apt/lists/* + +adduser $USERNAME netdev diff --git a/userspace/hardware_setup.sh b/userspace/hardware_setup.sh deleted file mode 100755 index 9638b10..0000000 --- a/userspace/hardware_setup.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -e - -# Install driver deb files (we're fine with overwriting stuff too) -cd /tmp/agnos/debs - -# Setting up usr merged lib64 since it's not done by default (in 24.04-base) -# https://wiki.debian.org/UsrMerge -# https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ -sudo mkdir /usr/lib64 -sudo ln -s usr/lib64 /lib64 - -apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ - ./agnos-base_0.0.4.deb \ - ./agnos-display_0.0.4.deb \ - ./agnos-wlan_0.0.4.deb - -# Install 16.04 version of libjson-c2 -cd /tmp -wget http://ports.ubuntu.com/pool/main/j/json-c/libjson-c2_0.11-4ubuntu2.6_arm64.deb -O /tmp/libjson-c2_0.11-4ubuntu2.6_arm64.deb -apt install -yq /tmp/libjson-c2_0.11-4ubuntu2.6_arm64.deb - -# Remove apt cache -rm -rf /var/lib/apt/lists/* - -USERNAME=comma -adduser $USERNAME netdev