diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 33d40f2..15707ac 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -4,19 +4,13 @@ FROM scratch AS agnos-base 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 -COPY --from=multiarch/qemu-user-static:x86_64-arm /usr/bin/qemu-arm-static /usr/bin - # Build folder RUN mkdir -p /tmp/agnos # Stop on error RUN set -xe -ENV USERNAME=comma -ENV PASSWD=comma -ENV HOST=comma +ARG USERNAME=comma # Base system setup RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections @@ -41,7 +35,7 @@ RUN apt-get -o Dpkg::Options::="--force-overwrite" install -yq \ # ################## # FROM agnos-base AS agnos-compiler -RUN apt-get update && apt-get install --no-install-recommends checkinstall +RUN apt-fast update && apt-fast install --no-install-recommends -yq checkinstall # Individual compiling images FROM agnos-compiler AS agnos-compiler-capnp diff --git a/build_system.sh b/build_system.sh index 3f86e66..0f02db7 100755 --- a/build_system.sh +++ b/build_system.sh @@ -36,10 +36,10 @@ if [ ! -f $UBUNTU_FILE ]; then curl -C - -o $UBUNTU_FILE $UBUNTU_BASE_URL/$UBUNTU_FILE --silent --remote-time fi -# Register qemu multiarch +# Setup qemu multiarch if [ "$ARCH" = "x86_64" ]; then echo "Registering qemu-user-static" - docker run --rm --privileged multiarch/qemu-user-static:register --reset > /dev/null + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes > /dev/null fi # Start agnos-builder docker build and create container diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index 318b03d..a040022 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -11,10 +11,14 @@ touch /AGNOS # Add armhf as supported architecture dpkg --add-architecture armhf +# Install apt-fast +apt-get update +apt-get install -yq curl sudo wget +bash -c "$(curl -sL https://git.io/vokNn)" + # Install packages export DEBIAN_FRONTEND=noninteractive -apt-get update -apt-get install -yq locales systemd adduser +apt-fast install --no-install-recommends -yq locales systemd adduser # Create privileged user useradd -G sudo -m -s /bin/bash $USERNAME @@ -46,8 +50,8 @@ echo "comma - nice -10" >> /etc/security/limits.conf locale-gen en_US.UTF-8 update-locale LANG=en_US.UTF-8 -apt-get upgrade -yq -apt-get install --no-install-recommends -yq \ +apt-fast upgrade -yq +apt-fast install --no-install-recommends -yq \ alsa-utils \ apport-retrace \ bc \ @@ -121,8 +125,8 @@ echo "comma ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers ln -sf /bin/bash /bin/sh # Install necessary libs -apt-get update -yq -apt-get install --no-install-recommends -yq \ +apt-fast update -yq +apt-fast install --no-install-recommends -yq \ libacl1:armhf \ libasan6-armhf-cross \ libatomic1-armhf-cross \ diff --git a/userspace/compile-modemmanager.sh b/userspace/compile-modemmanager.sh index 6080fc6..1cd8587 100755 --- a/userspace/compile-modemmanager.sh +++ b/userspace/compile-modemmanager.sh @@ -7,15 +7,15 @@ PROVIDER_INFO_VERSION="20230416" cd /tmp -apt update -apt install -y --no-install-recommends automake autoconf build-essential cmake +apt-fast update +apt-fast 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 meson +apt-fast 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 -apt install -y --no-install-recommends xsltproc +apt-fast install -y --no-install-recommends xsltproc git clone -b $PROVIDER_INFO_VERSION --depth 1 https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git cd mobile-broadband-provider-info ./autogen.sh @@ -24,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 python-is-python3 +apt-fast 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 diff --git a/userspace/install_extras.sh b/userspace/install_extras.sh index ea5a87f..272af83 100755 --- a/userspace/install_extras.sh +++ b/userspace/install_extras.sh @@ -2,7 +2,7 @@ # for all the non-essential nice to haves -apt-get update && apt-get install -y --no-install-recommends \ +apt-fast update && apt-fast install -y --no-install-recommends \ irqtop \ ripgrep \ nfs-common diff --git a/userspace/openpilot_dependencies.sh b/userspace/openpilot_dependencies.sh index 9c418dd..1d00610 100755 --- a/userspace/openpilot_dependencies.sh +++ b/userspace/openpilot_dependencies.sh @@ -3,8 +3,8 @@ echo "Installing openpilot dependencies" # Install necessary libs -apt-get update -apt-get install --no-install-recommends -yq \ +apt-fast update +apt-fast install --no-install-recommends -yq \ autoconf \ automake \ build-essential \