mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-06-08 11:04:51 +08:00
misc lil cleanups (#582)
* cleanup apt hook * Move VERSION into rootfs overlay * Use broad rootfs overlay copy
This commit is contained in:
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -59,7 +59,7 @@ jobs:
|
||||
- name: Update VERSION
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo -n $(cat VERSION)-$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) > VERSION
|
||||
echo -n $(cat userspace/root/VERSION)-$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) > userspace/root/VERSION
|
||||
|
||||
- name: Build system
|
||||
env:
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
if: "contains(env.LAST_COMMIT_MESSAGE, '[upload]')"
|
||||
run: |
|
||||
echo ${{ github.event.number }} > output/ota/PR
|
||||
cp VERSION output/ota
|
||||
cp userspace/root/VERSION output/ota
|
||||
echo "${{ steps.stats.outputs.stats_summary }}" > output/ota/agnos_stats.txt
|
||||
|
||||
- name: Upload artifacts
|
||||
|
||||
@@ -78,12 +78,7 @@ RUN /tmp/agnos/openpilot_python_dependencies.sh
|
||||
FROM agnos-base
|
||||
|
||||
# Hardware rootfs overlay
|
||||
COPY ./userspace/root/etc/ /etc/
|
||||
COPY ./userspace/root/lib/ /usr/lib/
|
||||
COPY ./userspace/root/home/ /home/
|
||||
COPY ./userspace/root/sbin/ /usr/sbin/
|
||||
COPY ./userspace/root/system/ /system/
|
||||
COPY ./userspace/root/usr/ /usr/
|
||||
COPY ./userspace/root/ /
|
||||
RUN mkdir -p /dsp /firmware /persist /data /cache /rwtmp
|
||||
|
||||
COPY --from=agnos-compiler-libqmi /tmp/libqmi.deb /tmp/
|
||||
@@ -166,12 +161,6 @@ RUN mkdir -p /tmptmp
|
||||
COPY ./userspace/readonly_setup.sh /tmptmp/readonly_setup.sh
|
||||
RUN /tmptmp/readonly_setup.sh && rm -rf /tmptmp
|
||||
|
||||
# copy at the end, after all apt usage
|
||||
COPY ./userspace/files/apt.conf /etc/apt/apt.conf
|
||||
|
||||
# copy version file
|
||||
COPY VERSION /VERSION
|
||||
|
||||
# ################# #
|
||||
# #### Cleanup #### #
|
||||
# ################# #
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Skip while Docker is assembling the image.
|
||||
if [ -f /.dockerenv ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sudo mount -o rw,remount /
|
||||
sudo resize2fs $(findmnt -n -o SOURCE /) &>/dev/null || sudo resize2fs $(findmnt -n -o SOURCE /)
|
||||
sudo mount -o remount,size=1500M /var
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Skip while Docker is assembling the image.
|
||||
if [ -f /.dockerenv ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sudo mount -o ro,remount / || true
|
||||
|
||||
Reference in New Issue
Block a user