Files
agnos-builder/userspace/base_setup.sh
T
Andrei Radulescu d665e03298 Ubuntu 24.04 (#188)
* separate out qtwayland5 compilation

* ubuntu 22.04

* temp build system image

* remove bionic deps

* temp packages update

* update armhf packages

* back to libstdc++6

* replaced remove dqt5-default meta package with actual depss

* fix for build libqmi crashing with /usr/bin/env: 'python': No such file or directory

* mapbox-gl-native gcc11 fix

* openpilot_dependencies.sh change

* ubuntu-base 24.04 daily current

* apt install meson because PEP 668

* temp g++-11 for mapbox-gl-native

* bump capnproto to 1.0.2

* temp build only agnos-compiler-mapbox-gl-native

* Fixes for compiling mapbox-gl-native

* Fixes for compiling ffmpeg

* Build main system image again

* pyopencl from git since no 2023.1.5 release since https://github.com/inducer/pyopencl/issues/705

* Try to fix checkinstall - no success

* apt capnproto & ffmpeg since can't figure out issue with checkinstall

* Commented removed services disable

* Ubuntu 24.04 currently has arm-none-eabi/12.2.1 but just use wildcard to go to first folder

* pyclean is missing ?!

* ubuntu-latest in tests workflow

* Updated README

* Reverted internal/package_ota.py changes

* rebuilt kernel

* poetry.lock update

* Simplified build_system pipeline

* headers for capnproto

* Fix typo

* Fix for checkinstall

* Reverted apt capnproto & ffmpeg

* Some cleaning in Dockerfile

* 24.04 libwayland-client

* libffi6:armhf deb file

* Updated qtwayland

* Revert "libffi6:armhf deb file"

This reverts commit bb9cb5da95.

* libffi.so.6.0.4

* qt5-qmake qtbase5-dev qtbase5-dev-tools already in qt5-default

* Removed qtwayland old files

* checkinstall temp fix

* QStandardPaths: wrong permissions on runtime directory /var/tmp/weston, 0770 instead of 0700

* temp permissions fix makes loading build spinner show

* temp build optimization

* 24.04 new libs

* build kernel don't use tools on aarch64/arm64

* updated boot image and ko files

* cleaning

* switch to release 24.04

* wip - downgrade qt and libwayland

* polkitd-pkla package to support polkit *.pkla

* fixed issue with old qt needing libssl 1.1.1f

* remove /.dockerenv file

* more cleaning

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-04-30 10:26:13 -07:00

209 lines
4.4 KiB
Bash
Executable File

#!/bin/bash -e
USERNAME=comma
PASSWD=comma
HOST=comma
# Create identification file
touch /TICI
touch /AGNOS
# Add armhf as supported architecture
dpkg --add-architecture armhf
# Install packages
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -yq locales systemd adduser
# Create privileged user
useradd -G sudo -m -s /bin/bash $USERNAME
echo "$USERNAME:$PASSWD" | chpasswd
groupadd gpio
groupadd gpu
adduser $USERNAME root
adduser $USERNAME video
adduser $USERNAME gpio
adduser $USERNAME adm
adduser $USERNAME gpu
adduser $USERNAME audio
adduser $USERNAME disk
adduser $USERNAME dialout
adduser $USERNAME systemd-journal
# Enable serial console on UART
systemctl enable serial-getty@ttyS0.service
# set kernel params
echo "net.ipv4.conf.all.rp_filter = 2" >> /etc/sysctl.conf
echo "vm.dirty_expire_centisecs = 200" >> /etc/sysctl.conf
# raise comma user's process priority limits
echo "comma - rtprio 100" >> /etc/security/limits.conf
echo "comma - nice -10" >> /etc/security/limits.conf
# Locale setup
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
apt-get upgrade -yq
apt-get install --no-install-recommends -yq \
alsa-utils \
apport-retrace \
bc \
build-essential \
bzip2 \
curl \
chrony \
cpuset \
dfu-util \
evtest \
git \
git-core \
git-lfs \
gdb \
htop \
i2c-tools \
ifmetric \
ifupdown \
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 \
nload \
network-manager \
nvme-cli \
openssl \
smartmontools \
speedtest-cli \
ssh \
sshfs \
sudo \
traceroute \
tk-dev \
ubuntu-minimal \
ubuntu-server \
ubuntu-standard \
udev \
udhcpc \
wget \
wireless-tools \
zlib1g-dev
rm -rf /var/lib/apt/lists/*
# Allow chrony to make a big adjustment to system time on boot
echo "makestep 0.1 3" >> /etc/chrony/chrony.conf
# Create dirs
mkdir /data && chown $USERNAME:$USERNAME /data
mkdir /persist && chown $USERNAME:$USERNAME /persist
# TODO: this is from 20.04, does it have a replacement?
# Disable automatic ondemand switching from ubuntu
#systemctl disable ondemand
# Disable pstore service that moves files out of /sys/fs/pstore
systemctl disable systemd-pstore.service
# Nopasswd sudo
echo "comma ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# setup /bin/sh symlink
ln -sf /bin/bash /bin/sh
# Install necessary libs
apt-get update -yq
apt-get 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 \
# TODO: put these back when updating weston & removing old libwayland-1.9.0-1.deb
# libwayland-client0:armhf \
# libwayland-cursor0:armhf \
# libwayland-server0:armhf \
# libwayland-dev \