diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 11faa611..112b4849 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -14,11 +14,17 @@ RUN set -xe ARG USERNAME=comma +ARG DEBIAN_FRONTEND=noninteractive + # Base system setup RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections COPY ./userspace/base_setup.sh /tmp/agnos RUN /tmp/agnos/base_setup.sh +# Additional libraries +COPY ./userspace/install_libraries.sh /tmp/agnos +RUN /tmp/agnos/install_libraries.sh + # Install openpilot dependencies COPY ./userspace/openpilot_dependencies.sh /tmp/agnos/ RUN /tmp/agnos/openpilot_dependencies.sh diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index ebf82ad4..f06ede4b 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -8,17 +8,14 @@ HOST=comma touch /TICI 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)" +apt-get install --no-install-recommends -yq ca-certificates wget +bash -c "$(wget -qO- https://git.io/vokNn)" + +apt-get upgrade -yq -# Install packages -export DEBIAN_FRONTEND=noninteractive -apt-fast install --no-install-recommends -yq locales systemd adduser +apt-fast install -yq --no-install-recommends ubuntu-minimal # Create privileged user useradd -G sudo -m -s /bin/bash $USERNAME @@ -50,63 +47,51 @@ echo "comma - nice -10" >> /etc/security/limits.conf locale-gen en_US.UTF-8 update-locale LANG=en_US.UTF-8 -apt-fast upgrade -yq apt-fast install --no-install-recommends -yq \ alsa-utils \ - apport-retrace \ bc \ build-essential \ bzip2 \ - curl \ chrony \ cpuset \ + curl \ dfu-util \ + dnsmasq-base \ evtest \ + gdb \ git \ - git-core \ git-lfs \ - gdb \ + hostapd \ htop \ i2c-tools \ ifmetric \ ifupdown \ iptables-persistent \ + isc-dhcp-client \ jq \ landscape-common \ - libi2c-dev \ libqmi-utils \ libtool \ - libncursesw5-dev \ - libnss-myhostname \ - libgdbm-dev \ - libc6-dev \ - libsqlite3-dev \ - libssl-dev \ - libffi-dev \ llvm \ nano \ net-tools \ - nload \ network-manager \ + nload \ nvme-cli \ - openssl \ + openssh-server \ ppp \ + rsyslog \ smartmontools \ - speedtest-cli \ ssh \ sshfs \ - sudo \ systemd-resolved \ - traceroute \ tk-dev \ - ubuntu-minimal \ + traceroute \ ubuntu-server \ ubuntu-standard \ - udev \ udhcpc \ - wget \ wireless-tools \ - zlib1g-dev + wpasupplicant rm -rf /var/lib/apt/lists/* @@ -125,80 +110,3 @@ echo "comma ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # setup /bin/sh symlink ln -sf /bin/bash /bin/sh - -# Install necessary libs -apt-fast update -yq -apt-fast install --no-install-recommends -yq \ - libacl1:armhf \ - libasan6-armhf-cross \ - libatomic1-armhf-cross \ - libattr1:armhf \ - libaudit1:armhf \ - libblkid1:armhf \ - libc6:armhf \ - libc6-armhf-cross \ - libc6-dev:armhf \ - libc6-dev-armhf-cross \ - libcairo2:armhf \ - libcap2:armhf \ - libdrm2:armhf \ - libevdev2:armhf \ - libexpat1:armhf \ - libffi8:armhf \ - libfontconfig1:armhf \ - libfreetype6:armhf \ - libgbm1:armhf \ - libgcc-11-dev-armhf-cross \ - libglib2.0-0t64:armhf \ - libgomp1-armhf-cross \ - libgudev-1.0-0:armhf \ - libinput-bin:armhf \ - libinput-dev:armhf \ - libinput10:armhf \ - libjpeg-dev:armhf \ - libjpeg-turbo8:armhf \ - libjpeg-turbo8-dev:armhf \ - libjpeg8:armhf \ - libjpeg8-dev:armhf \ - libkmod2:armhf \ - libmtdev1t64:armhf \ - libpam0g:armhf \ - libpam0g-dev:armhf \ - libpcre3:armhf \ - libpixman-1-0:armhf \ - libpng16-16t64:armhf \ - libselinux1:armhf \ - libstdc++6:armhf \ - libstdc++6-armhf-cross \ - libubsan1-armhf-cross \ - libudev-dev:armhf \ - libudev1:armhf \ - libuuid1:armhf \ - libwacom9:armhf \ - libx11-6:armhf \ - libxau6:armhf \ - libxcb-render0:armhf \ - libxcb-shm0:armhf \ - libxcb1:armhf \ - libxdmcp6:armhf \ - libxext6:armhf \ - libxkbcommon0:armhf \ - libxrender1:armhf \ - linux-libc-dev:armhf \ - linux-libc-dev-armhf-cross \ - zlib1g:armhf \ - libegl1 \ - libegl-dev \ - libgles1 \ - libgles2 \ - libgles-dev \ - openssh-server \ - dnsmasq-base \ - isc-dhcp-client \ - iputils-ping \ - rsyslog \ - kmod \ - wpasupplicant \ - hostapd \ - libgtk2.0-dev \ - libxml2:armhf \ diff --git a/userspace/install_extras.sh b/userspace/install_extras.sh index 272af83b..d7ac2d1e 100755 --- a/userspace/install_extras.sh +++ b/userspace/install_extras.sh @@ -5,7 +5,9 @@ apt-fast update && apt-fast install -y --no-install-recommends \ irqtop \ ripgrep \ - nfs-common + nfs-common \ + apport-retrace \ + speedtest-cli # color prompt sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' /home/comma/.bashrc diff --git a/userspace/install_libraries.sh b/userspace/install_libraries.sh new file mode 100755 index 00000000..f450a82c --- /dev/null +++ b/userspace/install_libraries.sh @@ -0,0 +1,82 @@ +#!/bin/bash -e + +export DEBIAN_FRONTEND=noninteractive + +# Add armhf as supported architecture +dpkg --add-architecture armhf + +apt-fast update && apt-fast install --no-install-recommends -yq \ + libacl1:armhf \ + libasan6-armhf-cross \ + libatomic1-armhf-cross \ + libattr1:armhf \ + libaudit1:armhf \ + libblkid1:armhf \ + libc6-armhf-cross \ + libc6-dev \ + libc6-dev-armhf-cross \ + libc6-dev:armhf \ + libc6:armhf \ + libcairo2:armhf \ + libcap2:armhf \ + libdrm2:armhf \ + libegl-dev \ + libegl1 \ + libevdev2:armhf \ + libexpat1:armhf \ + libffi-dev \ + libffi8:armhf \ + libfontconfig1:armhf \ + libfreetype6:armhf \ + libgbm1:armhf \ + libgcc-11-dev-armhf-cross \ + libgdbm-dev \ + libgles-dev \ + libgles1 \ + libgles2 \ + libglib2.0-0t64:armhf \ + libgomp1-armhf-cross \ + libgudev-1.0-0:armhf \ + libi2c-dev \ + libinput-bin:armhf \ + libinput-dev:armhf \ + libgtk2.0-dev \ + libinput10:armhf \ + libjpeg-dev:armhf \ + libjpeg-turbo8-dev:armhf \ + libjpeg-turbo8:armhf \ + libjpeg8-dev:armhf \ + libjpeg8:armhf \ + libkmod2:armhf \ + libmtdev1t64:armhf \ + libncursesw5-dev \ + libnss-myhostname \ + libpam0g-dev:armhf \ + libpam0g:armhf \ + libpcre3:armhf \ + libpixman-1-0:armhf \ + libpng16-16t64:armhf \ + libselinux1:armhf \ + libsqlite3-dev \ + libssl-dev \ + libstdc++6-armhf-cross \ + libstdc++6:armhf \ + libubsan1-armhf-cross \ + libudev-dev:armhf \ + libudev1:armhf \ + libuuid1:armhf \ + libwacom9:armhf \ + libx11-6:armhf \ + libxau6:armhf \ + libxcb-render0:armhf \ + libxcb-shm0:armhf \ + libxcb1:armhf \ + libxdmcp6:armhf \ + libxext6:armhf \ + libxkbcommon0:armhf \ + libxml2:armhf \ + libxrender1:armhf \ + linux-libc-dev-armhf-cross \ + linux-libc-dev:armhf \ + zlib1g-dev \ + zlib1g:armhf