Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Cleanup base setup #330

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
122 changes: 15 additions & 107 deletions userspace/base_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/*

Expand All @@ -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 \
4 changes: 3 additions & 1 deletion userspace/install_extras.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
82 changes: 82 additions & 0 deletions userspace/install_libraries.sh
Original file line number Diff line number Diff line change
@@ -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
Loading