From be79c38cf358afb97a2821a19363c735284314bd Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Tue, 27 Aug 2024 22:21:18 +0900 Subject: [PATCH 01/11] Move debian noninteractive to dockerfile --- Dockerfile.agnos | 2 ++ userspace/base_setup.sh | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 11faa611..4292e5fa 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -14,6 +14,8 @@ 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 diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index ebf82ad4..98bab7f0 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -17,7 +17,6 @@ apt-get install -yq curl sudo wget bash -c "$(curl -sL https://git.io/vokNn)" # Install packages -export DEBIAN_FRONTEND=noninteractive apt-fast install --no-install-recommends -yq locales systemd adduser # Create privileged user From 9e6357d5d0c4c91e3d12cb2be57ffc641785abc2 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Tue, 27 Aug 2024 23:47:07 +0900 Subject: [PATCH 02/11] Move library installation to separate script --- Dockerfile.agnos | 4 ++ userspace/base_setup.sh | 78 +------------------------------- userspace/install_libraries.sh | 81 ++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 77 deletions(-) create mode 100755 userspace/install_libraries.sh diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 4292e5fa..112b4849 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -21,6 +21,10 @@ RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set- 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 98bab7f0..c1a09ac9 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -8,9 +8,6 @@ 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 @@ -72,16 +69,8 @@ apt-fast install --no-install-recommends -yq \ iptables-persistent \ 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 \ @@ -128,69 +117,6 @@ 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 \ @@ -198,6 +124,4 @@ apt-fast install --no-install-recommends -yq \ rsyslog \ kmod \ wpasupplicant \ - hostapd \ - libgtk2.0-dev \ - libxml2:armhf \ + hostapd diff --git a/userspace/install_libraries.sh b/userspace/install_libraries.sh new file mode 100755 index 00000000..4c4b96be --- /dev/null +++ b/userspace/install_libraries.sh @@ -0,0 +1,81 @@ +#!/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 \ + libi2c-dev \ + libncursesw5-dev \ + libnss-myhostname \ + libgdbm-dev \ + libc6-dev \ + libsqlite3-dev \ + libssl-dev \ + libffi-dev \ + 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 \ + libgtk2.0-dev \ + libxml2:armhf \ From b3702ca5c1e27b7127a6b79816896723eeed3383 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Wed, 28 Aug 2024 16:49:53 +0900 Subject: [PATCH 03/11] Minimize package install for apt-fast --- userspace/base_setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index c1a09ac9..61f4214d 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -10,8 +10,8 @@ touch /AGNOS # 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)" # Install packages apt-fast install --no-install-recommends -yq locales systemd adduser From 486161ca532a269bdc696803396780588b5a58dc Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Wed, 28 Aug 2024 17:13:08 +0900 Subject: [PATCH 04/11] Move upgrade and ubuntu-minimal to the top --- userspace/base_setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index 61f4214d..d1d78f0a 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -13,6 +13,10 @@ apt-get update apt-get install --no-install-recommends -yq ca-certificates wget bash -c "$(wget -qO- https://git.io/vokNn)" +apt-get upgrade -yq + +apt-fast install -yq --no-install-recommends ubuntu-minimal + # Install packages apt-fast install --no-install-recommends -yq locales systemd adduser @@ -46,7 +50,6 @@ 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 \ @@ -87,7 +90,6 @@ apt-fast install --no-install-recommends -yq \ systemd-resolved \ traceroute \ tk-dev \ - ubuntu-minimal \ ubuntu-server \ ubuntu-standard \ udev \ From 2652b3e7b54fdab3a866e702c62c369c6e2101f9 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Wed, 28 Aug 2024 18:38:59 +0900 Subject: [PATCH 05/11] Remove redudant installation --- userspace/base_setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index d1d78f0a..b31d2997 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -17,9 +17,6 @@ apt-get upgrade -yq apt-fast install -yq --no-install-recommends ubuntu-minimal -# Install packages -apt-fast install --no-install-recommends -yq locales systemd adduser - # Create privileged user useradd -G sudo -m -s /bin/bash $USERNAME echo "$USERNAME:$PASSWD" | chpasswd From 23de548dc0f82a1212f457d0a5cfa9d7030304fc Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Thu, 29 Aug 2024 15:12:59 +0900 Subject: [PATCH 06/11] Move another library --- userspace/base_setup.sh | 3 +-- userspace/install_libraries.sh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index b31d2997..dde08362 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -92,8 +92,7 @@ apt-fast install --no-install-recommends -yq \ udev \ udhcpc \ wget \ - wireless-tools \ - zlib1g-dev + wireless-tools rm -rf /var/lib/apt/lists/* diff --git a/userspace/install_libraries.sh b/userspace/install_libraries.sh index 4c4b96be..9180e7d7 100755 --- a/userspace/install_libraries.sh +++ b/userspace/install_libraries.sh @@ -14,6 +14,7 @@ apt-fast update && apt-fast install --no-install-recommends -yq \ libsqlite3-dev \ libssl-dev \ libffi-dev \ + zlib1g-dev \ libacl1:armhf \ libasan6-armhf-cross \ libatomic1-armhf-cross \ From 8798590e915a6a8896ca9df0dedfea13ae07e9ff Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Thu, 29 Aug 2024 15:20:43 +0900 Subject: [PATCH 07/11] Merge and order apt install commands --- userspace/base_setup.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index dde08362..fee18804 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -53,46 +53,54 @@ apt-fast install --no-install-recommends -yq \ 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 \ + iputils-ping \ + isc-dhcp-client \ jq \ + kmod \ landscape-common \ libqmi-utils \ libtool \ llvm \ nano \ net-tools \ - nload \ network-manager \ + nload \ nvme-cli \ + openssh-server \ openssl \ ppp \ + rsyslog \ smartmontools \ speedtest-cli \ ssh \ sshfs \ sudo \ systemd-resolved \ - traceroute \ tk-dev \ + traceroute \ ubuntu-server \ ubuntu-standard \ udev \ udhcpc \ wget \ - wireless-tools + wireless-tools \ + wpasupplicant rm -rf /var/lib/apt/lists/* @@ -111,15 +119,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 \ - openssh-server \ - dnsmasq-base \ - isc-dhcp-client \ - iputils-ping \ - rsyslog \ - kmod \ - wpasupplicant \ - hostapd From 407e3ea70cbb1961ad2a28807daffcc97e574903 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Thu, 29 Aug 2024 15:26:16 +0900 Subject: [PATCH 08/11] Sort library apt packages --- userspace/install_libraries.sh | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/userspace/install_libraries.sh b/userspace/install_libraries.sh index 9180e7d7..4f5ab1c7 100755 --- a/userspace/install_libraries.sh +++ b/userspace/install_libraries.sh @@ -6,56 +6,61 @@ export DEBIAN_FRONTEND=noninteractive dpkg --add-architecture armhf apt-fast update && apt-fast install --no-install-recommends -yq \ - libi2c-dev \ - libncursesw5-dev \ - libnss-myhostname \ - libgdbm-dev \ - libc6-dev \ - libsqlite3-dev \ - libssl-dev \ - libffi-dev \ - zlib1g-dev \ libacl1:armhf \ libasan6-armhf-cross \ libatomic1-armhf-cross \ libattr1:armhf \ libaudit1:armhf \ libblkid1:armhf \ - libc6:armhf \ libc6-armhf-cross \ - libc6-dev:armhf \ + 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 \ + libgtk2.0-dev \ libgudev-1.0-0:armhf \ + libi2c-dev \ libinput-bin:armhf \ libinput-dev:armhf \ libinput10:armhf \ libjpeg-dev:armhf \ - libjpeg-turbo8:armhf \ libjpeg-turbo8-dev:armhf \ - libjpeg8:armhf \ + libjpeg-turbo8:armhf \ libjpeg8-dev:armhf \ + libjpeg8:armhf \ libkmod2:armhf \ libmtdev1t64:armhf \ - libpam0g:armhf \ + libncursesw5-dev \ + libnss-myhostname \ libpam0g-dev:armhf \ + libpam0g:armhf \ libpcre3:armhf \ libpixman-1-0:armhf \ libpng16-16t64:armhf \ libselinux1:armhf \ - libstdc++6:armhf \ + libsqlite3-dev \ + libssl-dev \ libstdc++6-armhf-cross \ + libstdc++6:armhf \ libubsan1-armhf-cross \ libudev-dev:armhf \ libudev1:armhf \ @@ -69,14 +74,9 @@ apt-fast update && apt-fast install --no-install-recommends -yq \ libxdmcp6:armhf \ libxext6:armhf \ libxkbcommon0:armhf \ + libxml2:armhf \ libxrender1:armhf \ - linux-libc-dev:armhf \ linux-libc-dev-armhf-cross \ - zlib1g:armhf \ - libegl1 \ - libegl-dev \ - libgles1 \ - libgles2 \ - libgles-dev \ - libgtk2.0-dev \ - libxml2:armhf \ + linux-libc-dev:armhf \ + zlib1g-dev \ + zlib1g:armhf From 588b85e324bc894f29c89d2b3f566eabd447c621 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Thu, 29 Aug 2024 17:31:33 +0900 Subject: [PATCH 09/11] Move libgtk2.0-dev after libinput-dev:armhf --- userspace/install_libraries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userspace/install_libraries.sh b/userspace/install_libraries.sh index 4f5ab1c7..f450a82c 100755 --- a/userspace/install_libraries.sh +++ b/userspace/install_libraries.sh @@ -36,11 +36,11 @@ apt-fast update && apt-fast install --no-install-recommends -yq \ libgles2 \ libglib2.0-0t64:armhf \ libgomp1-armhf-cross \ - libgtk2.0-dev \ 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 \ From 30e176d06cc6460f9ceb1a40a67c2a69a5928428 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Fri, 30 Aug 2024 09:11:21 +0900 Subject: [PATCH 10/11] Remove items that are already being installed --- userspace/base_setup.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index fee18804..1beb8bbf 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -61,7 +61,6 @@ apt-fast install --no-install-recommends -yq \ evtest \ gdb \ git \ - git-core \ git-lfs \ hostapd \ htop \ @@ -69,10 +68,8 @@ apt-fast install --no-install-recommends -yq \ ifmetric \ ifupdown \ iptables-persistent \ - iputils-ping \ isc-dhcp-client \ jq \ - kmod \ landscape-common \ libqmi-utils \ libtool \ @@ -83,22 +80,18 @@ apt-fast install --no-install-recommends -yq \ nload \ nvme-cli \ openssh-server \ - openssl \ ppp \ rsyslog \ smartmontools \ speedtest-cli \ ssh \ sshfs \ - sudo \ systemd-resolved \ tk-dev \ traceroute \ ubuntu-server \ ubuntu-standard \ - udev \ udhcpc \ - wget \ wireless-tools \ wpasupplicant From 66ed98a14feda2b1e17ecbd115d76af1916dd98e Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Fri, 30 Aug 2024 11:23:41 +0900 Subject: [PATCH 11/11] Move packages to extras --- userspace/base_setup.sh | 2 -- userspace/install_extras.sh | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index 1beb8bbf..f06ede4b 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -49,7 +49,6 @@ update-locale LANG=en_US.UTF-8 apt-fast install --no-install-recommends -yq \ alsa-utils \ - apport-retrace \ bc \ build-essential \ bzip2 \ @@ -83,7 +82,6 @@ apt-fast install --no-install-recommends -yq \ ppp \ rsyslog \ smartmontools \ - speedtest-cli \ ssh \ sshfs \ systemd-resolved \ 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