diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 90fd820..5818485 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -59,6 +59,10 @@ 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 + # Pre-compiled capnp (must be before python install) 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 @@ -166,10 +170,6 @@ RUN rm -rf /usr/lib/aarch64-linux-gnu/qt5/plugins/bearer # Add iptable rules to block incoming traffic on wwan0 COPY ./userspace/etc/iptables/rules.v4 /etc/iptables/rules.v4 -# Build ModemManager -COPY ./userspace/compile-modemmanager.sh /tmp/agnos/ -RUN /tmp/agnos/compile-modemmanager.sh - # Run ModemManager in debug mode to allow AT commands COPY ./userspace/files/ModemManager.service /lib/systemd/system/ RUN systemctl enable ModemManager diff --git a/userspace/compile-modemmanager.sh b/userspace/compile-modemmanager.sh index 35af997..dde32a1 100755 --- a/userspace/compile-modemmanager.sh +++ b/userspace/compile-modemmanager.sh @@ -7,6 +7,9 @@ PROVIDER_INFO_VERSION="20220511" cd /tmp +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 @@ -32,7 +35,7 @@ ninja -C build install # build ModemManager cd /tmp -apt install -y --no-install-recommends gettext libpolkit-gobject-1-dev +apt install -y --no-install-recommends gettext libpolkit-gobject-1-dev libdbus-1-dev libsystemd-dev git clone -b $MM_VERSION --depth 1 https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git