From 372633b7bad94dff4cc5ad0741cd152a2c84144a Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Tue, 30 Jul 2024 20:32:22 +0300 Subject: [PATCH 1/3] also checkout submodules (#274) * also checkout submodules * [upload] --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 49fbdbf..318624b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v4 with: lfs: true + submodules: true - name: Get commit message run: | From e85baea9948f3f2a97a97523544636bd4de566be Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Tue, 30 Jul 2024 20:51:47 +0300 Subject: [PATCH 2/3] update flash scripts to always flash active slot (#264) * update flash scripts * flash active slot * more descriptive ending message --- flash_kernel.sh | 19 ++++++++++++------- flash_system.sh | 16 +++++++++++----- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/flash_kernel.sh b/flash_kernel.sh index 71e9445..a38a066 100755 --- a/flash_kernel.sh +++ b/flash_kernel.sh @@ -1,14 +1,19 @@ #!/bin/bash set -e -GREEN="\033[0;32m" -NO_COLOR='\033[0m' - DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd $DIR -echo "Flashing kernel..." -tools/edl w boot_a output/boot.img -tools/edl w boot_b output/boot.img +echo "Checking active slot..." +ACTIVE_SLOT=$(tools/edl getactiveslot | grep "Current active slot:" | awk '{print $NF}') -echo -e "${GREEN}Flashed boot_a and boot_b!${NO_COLOR}" +if [[ "$ACTIVE_SLOT" != "a" && "$ACTIVE_SLOT" != "b" ]]; then + echo "Invalid active slot: '$ACTIVE_SLOT'" + exit 1 +fi + +echo "Active slot: $ACTIVE_SLOT" +echo "Flashing boot_$ACTIVE_SLOT..." +tools/edl w boot_$ACTIVE_SLOT $DIR/output/boot.img + +echo "Flashed boot_$ACTIVE_SLOT!" diff --git a/flash_system.sh b/flash_system.sh index 9b506ee..d0e4d6d 100755 --- a/flash_system.sh +++ b/flash_system.sh @@ -4,12 +4,18 @@ set -e DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" cd $DIR -echo "Flashing system..." -tools/edl w system_a $DIR/output/system-skip-chunks.img +echo "Checking active slot..." +ACTIVE_SLOT=$(tools/edl getactiveslot | grep "Current active slot:" | awk '{print $NF}') -tools/edl setactiveslot a -tools/edl setbootablestoragedrive 1 +if [[ "$ACTIVE_SLOT" != "a" && "$ACTIVE_SLOT" != "b" ]]; then + echo "Invalid active slot: '$ACTIVE_SLOT'" + exit 1 +fi + +echo "Active slot: $ACTIVE_SLOT" +echo "Flashing system_$ACTIVE_SLOT..." +tools/edl w system_$ACTIVE_SLOT $DIR/output/system.img tools/edl reset -echo "Done!" +echo "Flashed system_$ACTIVE_SLOT!" From 360675b9357a9ec2dbfa80d9dd5220a9ad77a4b1 Mon Sep 17 00:00:00 2001 From: Robin Reckmann Date: Wed, 31 Jul 2024 22:56:02 +0900 Subject: [PATCH 3/3] Fix FromAsCasing warning (#277) Address FromAsCasing warning --- Dockerfile.agnos | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.agnos b/Dockerfile.agnos index d91027a..d5b9589 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -26,7 +26,7 @@ RUN /tmp/agnos/base_setup.sh # ################## # # #### Compiler #### # # ################## # -FROM agnos-base as agnos-compiler +FROM agnos-base AS agnos-compiler RUN apt-get update && apt-get install --no-install-recommends checkinstall # Install openpilot dependencies, probably needed for build, @@ -35,15 +35,15 @@ COPY ./userspace/openpilot_dependencies.sh /tmp/agnos/ RUN /tmp/agnos/openpilot_dependencies.sh # Individual compiling images -FROM agnos-compiler as agnos-compiler-capnp +FROM agnos-compiler AS agnos-compiler-capnp COPY ./userspace/compile-capnp.sh /tmp/agnos/ RUN /tmp/agnos/compile-capnp.sh -FROM agnos-compiler as agnos-compiler-ffmpeg +FROM agnos-compiler AS agnos-compiler-ffmpeg COPY ./userspace/compile-ffmpeg.sh /tmp/agnos/ RUN /tmp/agnos/compile-ffmpeg.sh -FROM agnos-compiler as agnos-compiler-qtwayland5 +FROM agnos-compiler AS agnos-compiler-qtwayland5 COPY ./userspace/compile-qtwayland5.sh /tmp/agnos/ COPY ./userspace/qtwayland/patch /tmp/agnos/ RUN /tmp/agnos/compile-qtwayland5.sh