Files
agnos-builder/scripts/setup-on-device.sh
T
Andrei Radulescu bdb9394d62 Ship non-sparse system image in OTA (#275)
* removed system-skip-chunks image

* removed sparsed system.img

* clean github workflow

* copy image to output

* fake system-skip-chunks [upload]

* sparse key must exist otherwise KeyError: 'sparse' in openpilot

* reduce image size to 5G otherwise MemoryError: Unable to allocate output buffer. in openpilot

* [upload]

* Revert "fake system-skip-chunks"

This reverts commit bcd11e7e32.

* recreate 10G image [upload]

* resize2fs

* resize2fs shrink image

* revert skip-chunks image

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-08-18 12:55:18 -07:00

29 lines
639 B
Bash
Executable File

#!/usr/bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
ROOT=$DIR/../
if [ ! -f /AGNOS ]; then
echo "Exiting, not running AGNOS"
exit 1
fi
sudo mount -o rw,remount /
sudo resize2fs $(findmnt -n -o SOURCE /)
echo "symlink /usr/comma"
sudo rm -rf /usr/comma
sudo ln -snf $ROOT/userspace/usr/comma/ /usr/comma
echo "cp systemd services"
for s in $(ls $ROOT/userspace/files/*.service); do
service=$(basename $s)
echo "- $service"
sudo rm -f /lib/systemd/system/$service
sudo cp $ROOT/userspace/files/$service /lib/systemd/system/
done
sudo $ROOT/userspace/services.sh
sudo mount -o ro,remount /