diff --git a/.github/workflows/pre_release.yaml b/.github/workflows/pre_release.yaml index 4f38130a..56bb6955 100644 --- a/.github/workflows/pre_release.yaml +++ b/.github/workflows/pre_release.yaml @@ -53,21 +53,23 @@ jobs: run: make firmware - name: Build with Basic firmware - run: sudo make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin + run: sudo GIT_VERSION=${{ env.GIT_VERSION }} make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin - name: Build with Extended firmware - run: sudo make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin + run: sudo GIT_VERSION=${{ env.GIT_VERSION }} make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin - name: Clear Kernel Git Repo run: sudo git -C tmp/kernel/ clean -fdx + - name: Generate Changelog + run: make changelog >> RELEASE.md + - name: 'Release debian files' uses: ncipollo/release-action@v1 with: tag: "v${{ env.GIT_VERSION }}" allowUpdates: false updateOnlyUnreleased: true - generateReleaseNotes: true prerelease: true bodyFile: RELEASE.md artifacts: "U1_*.bin" diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index b6ff4eb9..241f73a0 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -49,10 +49,10 @@ jobs: run: make firmware - name: Build with Basic firmware - run: sudo make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin + run: sudo GIT_VERSION=${{ env.GIT_VERSION }} make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}_upgrade.bin - name: Build with Extended firmware - run: sudo make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin + run: sudo GIT_VERSION=${{ env.GIT_VERSION }} make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}_upgrade.bin - name: Clear Kernel Git Repo run: sudo git -C tmp/kernel/ clean -fdx diff --git a/Makefile b/Makefile index 2e0241b2..0d359ee0 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ tools/%: FORCE firmware: firmware/$(FIRMWARE_FILE) firmware/$(FIRMWARE_FILE): - @mkdir -p firmware + @mkdir -ap firmware wget -O $@.tmp "https://public.resource.snapmaker.com/firmware/U1/$(FIRMWARE_FILE)" echo "$(FIRMWARE_SHA256) $@.tmp" | sha256sum -c --quiet mv $@.tmp $@ @@ -54,5 +54,10 @@ test: # ================= Helpers ================= +.PHONY: changelog +changelog: + @echo "## Changes since last release\n" + @git log $$(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s (%h) by @%an" + .PHONY: FORCE FORCE: diff --git a/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-mipi b/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-mipi index c7b70d58..d0613f8e 100755 --- a/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-mipi +++ b/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-mipi @@ -2,6 +2,11 @@ [ ! -e /oem/.camera-native ] || exit 0 +# Create temporary directory for timelapse files +umask 0022 +mkdir -p /userdata/.tmp_timelapse +chown -R lava:lava /userdata/.tmp_timelapse + CMD_CAPTURE=/usr/local/bin/capture-mipi-mpp CMD_CAPTURE_ARGS="--device /dev/video11 --format nv12 --jpeg-quality 7 --jpeg-sock /tmp/capture-mipi-jpeg.sock --mjpeg-sock /tmp/capture-mipi-mjpeg.sock --h264-sock /tmp/capture-mipi-h264.sock" @@ -11,6 +16,7 @@ CMD_WEBRTC_ARGS="--h264-sock /tmp/capture-mipi-h264.sock --webrtc-sock /tmp/capt CMD_HTTP=/usr/local/bin/stream-http.py CMD_HTTP_ARGS="--jpeg-sock /tmp/capture-mipi-jpeg.sock --mjpeg-sock /tmp/capture-mipi-mjpeg.sock --h264-sock /tmp/capture-mipi-h264.sock --webrtc-sock /tmp/capture-mipi-webrtc.sock --bind 127.0.0.1" +# Differently to Snapmaker, run as user lava, instead of the root user CMD_SNAP_MQTT=/usr/local/bin/stream-snap-mqtt.py CMD_SNAP_MQTT_ARGS="--jpeg-sock /tmp/capture-mipi-jpeg.sock --publish-dir /home/lava/printer_data/camera" @@ -25,7 +31,7 @@ start() { echo "OK" printf "Starting stream-webrtc: " - start-stop-daemon -S -b -q -m -p /var/run/stream-mipi-webrtc.pid -x $CMD_WEBRTC -- $CMD_WEBRTC_ARGS + start-stop-daemon -S -b -q -m -p /var/run/stream-mipi-webrtc.pid -c lava -x $CMD_WEBRTC -- $CMD_WEBRTC_ARGS echo "OK" printf "Starting stream-http: " diff --git a/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-usb b/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-usb index 2ff0e673..e1f252e0 100755 --- a/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-usb +++ b/overlays/camera-v4l2-mpp/root/etc/init.d/S99v4l2-mpp-usb @@ -22,7 +22,7 @@ start() { echo "OK" printf "Starting stream-webrtc: " - start-stop-daemon -S -b -q -m -p /var/run/stream-usb-webrtc.pid -x $CMD_WEBRTC -- $CMD_WEBRTC_ARGS + start-stop-daemon -S -b -q -m -p /var/run/stream-usb-webrtc.pid -c lava -x $CMD_WEBRTC -- $CMD_WEBRTC_ARGS echo "OK" printf "Starting stream-http: " diff --git a/overlays/camera-v4l2-mpp/scripts/01-v4l2-mpp.sh b/overlays/camera-v4l2-mpp/scripts/01-v4l2-mpp.sh index 69a2ecc0..811d2206 100755 --- a/overlays/camera-v4l2-mpp/scripts/01-v4l2-mpp.sh +++ b/overlays/camera-v4l2-mpp/scripts/01-v4l2-mpp.sh @@ -13,14 +13,11 @@ TARGET_DIR="$ROOT_DIR/tmp/v4l2-mpp" if [[ ! -d "$TARGET_DIR" ]]; then git clone https://github.com/paxx12/v4l2-mpp.git "$TARGET_DIR" --recursive - git -C "$TARGET_DIR" checkout b28cf38c484e281e0b234a06aac2a7a9e524d710 + git -C "$TARGET_DIR" checkout bc2582be0ec0b4014b35f2579b93e6c18e399cce fi -echo ">> Compiling MPP library..." -"$TARGET_DIR/deps/compile_mpp.sh" - -echo ">> Compiling libdatachannel library..." -"$TARGET_DIR/deps/compile_libdatachannel.sh" +echo ">> Compiling dependencies..." +make -C "$TARGET_DIR" deps echo ">> Compiling v4l2-mpp applications..." make -C "$TARGET_DIR" install DESTDIR="$1" diff --git a/overlays/fluidd-upgrade/scripts/01-install-fluidd.sh b/overlays/fluidd-upgrade/scripts/01-install-fluidd.sh index 0a9efcac..890c0905 100755 --- a/overlays/fluidd-upgrade/scripts/01-install-fluidd.sh +++ b/overlays/fluidd-upgrade/scripts/01-install-fluidd.sh @@ -11,9 +11,9 @@ set -eo pipefail TARGET_DIR="$ROOT_DIR/tmp" -VERSION=v1.35.0 +VERSION=v1.35.1 URL=https://github.com/fluidd-core/fluidd/releases/download/$VERSION/fluidd.zip -SHA256=07c557159c440009a197e0978d9a74c432b88e222a48723bf8e4578ddddb0025 +SHA256=5b8b525d9c65b2dfa83b238ee8fded105d1b34e3b73862aed10411bf977bb8f0 FILENAME=fluidd-$VERSION.zip if [[ ! -f "$TARGET_DIR/$FILENAME" ]]; then