Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .github/workflows/build.yaml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/pre_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- .github/workflows/*.yaml
workflow_dispatch:

jobs:
custom-firmware-build:
runs-on: ubuntu-24.04-arm
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive

- name: Load values vars.mk
run: cat vars.mk >> "$GITHUB_ENV"

- name: Restore Firmwares Cache
id: cache-firmwares
uses: actions/cache/restore@v4
with:
path: firmware/
key: firmwares-${{ runner.os }}-${{ runner.arch }}-${{ env.FIRMWARE_VERSION }}

- name: Restore Kernel Cache
id: cache-kernel
uses: actions/cache/restore@v4
with:
path: tmp/kernel/
key: kernels-${{ runner.os }}-${{ runner.arch }}-${{ env.KERNEL_SHA }}

- name: Install build dependencies
run: |
sudo apt-get update -y &&
sudo apt-get install -y build-essential cmake \
gcc-aarch64-linux-gnu pkg-config squashfs-tools git-core \
bc libssl-dev

- name: Set GIT_VERSION
shell: bash
run: |
nextVer=$(./scripts/next_version.sh paxx12)
echo "GIT_VERSION=${nextVer//v/}" | tee -a $GITHUB_ENV

- name: Download firmware
run: make firmware

- name: Build with Basic firmware
run: make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}.bin

- name: Build with Extended firmware
run: make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}.bin

- name: Clear Kernel Git Repo
run: git -C tmp/kernel/ clean -fdx

- name: Generate RELEASE details
run: |
echo "# Release ${{ env.GIT_VERSION }}" > RELEASE.tmp
echo "" >> RELEASE.tmp
cat RELEASE.md >> RELEASE.tmp

- 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.tmp
artifacts: "U1_*.bin"

- name: Save Firmwares Cache
if: steps.cache-firmwares.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: firmware/
key: firmwares-${{ runner.os }}-${{ runner.arch }}-${{ env.FIRMWARE_VERSION }}

- name: Save Kernel Cache
if: steps.cache-kernel.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: tmp/kernel/
key: kernels-${{ runner.os }}-${{ runner.arch }}-${{ env.KERNEL_SHA }}
94 changes: 94 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
on:
pull_request:
workflow_dispatch:

jobs:
custom-firmware-build:
runs-on: ubuntu-24.04-arm
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive

- name: Load values vars.mk
run: cat vars.mk >> "$GITHUB_ENV"

- name: Restore Firmwares Cache
id: cache-firmwares
uses: actions/cache/restore@v4
with:
path: firmware/
key: firmwares-${{ runner.os }}-${{ runner.arch }}-${{ env.FIRMWARE_VERSION }}

- name: Restore Kernel Cache
id: cache-kernel
uses: actions/cache/restore@v4
with:
path: tmp/kernel/
key: kernels-${{ runner.os }}-${{ runner.arch }}-${{ env.KERNEL_SHA }}

- name: Install build dependencies
run: |
sudo apt-get update -y &&
sudo apt-get install -y build-essential cmake \
gcc-aarch64-linux-gnu pkg-config squashfs-tools git-core \
bc libssl-dev

- name: Set GIT_VERSION
shell: bash
run: |
nextVer=$(./scripts/next_version.sh paxx12 test-pr-${{ github.event.pull_request.number }})
echo "GIT_VERSION=${nextVer//v/}" | tee -a $GITHUB_ENV

- name: Download firmware
run: make firmware

- name: Build with Basic firmware
run: make build PROFILE=basic OUTPUT_FILE=U1_basic_${{ env.GIT_VERSION }}.bin

- name: Build with Extended firmware
run: make build PROFILE=extended OUTPUT_FILE=U1_extended_${{ env.GIT_VERSION }}.bin

- name: Clear Kernel Git Repo
run: git -C tmp/kernel/ clean -fdx

- uses: actions/upload-artifact@v4
with:
name: basic-build
path: U1_basic_*.bin

- uses: actions/upload-artifact@v4
with:
name: extended-build
path: U1_extended_*.bin

- name: Comment PR with artifact links
uses: actions/github-script@v7
with:
script: |
const body = `✅ Build artifacts ready: [Download builds](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: body
});

- name: Save Firmwares Cache
if: steps.cache-firmwares.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: firmware/
key: firmwares-${{ runner.os }}-${{ runner.arch }}-${{ env.FIRMWARE_VERSION }}

- name: Save Kernel Cache
if: steps.cache-kernel.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: tmp/kernel/
key: kernels-${{ runner.os }}-${{ runner.arch }}-${{ env.KERNEL_SHA }}
37 changes: 20 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ all: tools

# ================= Build Tools =================

DEBUG_FIRMWARE_FILE := firmware/firmware_debug.bin
BASIC_FIRMWARE_FILE := firmware/firmware_basic.bin
EXTENDED_FIRMWARE_FILE := firmware/firmware_extended.bin

$(DEBUG_FIRMWARE_FILE): firmware/$(FIRMWARE_FILE) tools
./scripts/enable_debug_misc.sh $< tmp/debug $@

$(BASIC_FIRMWARE_FILE): firmware/$(FIRMWARE_FILE) tools
./scripts/create_firmware.sh $< tmp/basic $@ overlays/basic overlays/camera-native

$(EXTENDED_FIRMWARE_FILE): firmware/$(FIRMWARE_FILE) tools
./scripts/create_firmware.sh $< tmp/extended $@ overlays/basic overlays/camera-new overlays/fluidd-upgrade

basic_firmware: $(BASIC_FIRMWARE_FILE)
extended_firmware: $(EXTENDED_FIRMWARE_FILE)
debug_firmware: $(DEBUG_FIRMWARE_FILE)
extract_firmware: firmware/$(FIRMWARE_FILE) tools
OUTPUT_FILE := firmware/firmware.bin

ifeq (basic,$(PROFILE))
OVERLAYS += basic kernel-modules camera-native
else ifeq (extended,$(PROFILE))
OVERLAYS += basic kernel-modules camera-new fluidd-upgrade
endif

$(OUTPUT_FILE): firmware/$(FIRMWARE_FILE) tools
ifeq (,$(OVERLAYS))
@echo "No overlays specified. Set PROFILE variable to 'basic' or 'extended'."
@exit 1
endif
./scripts/create_firmware.sh $< tmp/extended $@ $(addprefix overlays/,$(OVERLAYS))

.PHONY: build
build: $(OUTPUT_FILE)

.PHONY: extract
extract: firmware/$(FIRMWARE_FILE) tools
./scripts/extract_squashfs.sh $< tmp/extracted

# ================= Tools =================
Expand Down
94 changes: 0 additions & 94 deletions README.dev.md

This file was deleted.

Loading