Skip to content

Commit

Permalink
Add CI for the bridge firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
wh201906 committed Jan 20, 2024
1 parent 36f2416 commit d4feccf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build-bridge-firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: USB Bridge Firmware CI

on:
push:
paths:
- 'PM3_USB2TCP/firmware/*'
- 'PM3_USB2UDP/firmware/*'
- '.github/workflows/*'
pull_request:
paths:
- 'PM3_USB2TCP/firmware/*'
- 'PM3_USB2UDP/firmware/*'
- '.github/workflows/*'
workflow_dispatch:

jobs:
ubuntu-make:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targets: [esp32s2, esp32s3]
firmwares: [PM3_USB2TCP, PM3_USB2UDP]

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: ESP-IDF Build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.1.2
target: ${{ matrix.targets }}
path: ${{ matrix.firmwares }}/firmware
command: >
idf.py build &&
chmod -R 777 ./
- name: Install EspTool
run: pip install esptool

- name: Merge Firmware
run: |
# Merge Firmware
# The ${{ matrix.firmwares }}/firmware/build is owned by root, so the script cannot create merged binary there.
cp --no-preserve=mode,ownership --recursive ${{ matrix.firmwares }}/firmware/build ./
cd build
esptool.py --chip ${{ matrix.targets }} merge_bin -o ${{ matrix.firmwares }}-${{ matrix.targets }}-merged.bin @flash_args
- name: Get Build Info
run: |
echo "BUILD_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "BUILD_DATE=$(date +'%Y%m%d')" >> "$GITHUB_ENV"
- name: Upload Firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.firmwares }}-${{ matrix.targets }}-${{ env.BUILD_DATE }}-${{ env.BUILD_SHA }}
path: |
build/**/*.bin
!build/**/CMakeFiles/
2 changes: 1 addition & 1 deletion PM3_USB2TCP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This modding only contains the firmware of ESP32-S3, and it should work on most

# Tips:
1. To use this modding, you need a Proxmark3 client newer than commit [9c947eddcdbc66e76be6b33be9af4ce75e730b92](https://github.com/RfidResearchGroup/proxmark3/commit/9c947eddcdbc66e76be6b33be9af4ce75e730b92)
2. You need ESP-IDF to compile this project
2. You need ESP-IDF or GitHub Action to build this project
3. The ESP32-S3 can work as a soft-AP. The SSID and the password are defined in [PM3_Modding/PM3_USB2TCP/firmware/main/wifi/wifi.h](./firmware/main/wifi/wifi.h)
4. To connect to an existing AP like wireless router or mobile hotspot, you should follow these steps:
+ Set the correct SSID and password in [PM3_Modding/PM3_USB2TCP/firmware/main/wifi/wifi.h](./firmware/main/wifi/wifi.h)
Expand Down
2 changes: 1 addition & 1 deletion PM3_USB2UDP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This modding only contains the firmware of ESP32-S3, and it should work on most

# Tips:
1. To use this modding, you need a Proxmark3 client newer than commit [0c0967bcc56773e0b014fd4d89d5f893052928d3](https://github.com/RfidResearchGroup/proxmark3/commit/0c0967bcc56773e0b014fd4d89d5f893052928d3)
2. You need ESP-IDF to compile this project
2. You need ESP-IDF or GitHub Action to build this project
3. The ESP32-S3 can work as a soft-AP. The SSID and the password are defined in [PM3_Modding/PM3_USB2UDP/firmware/main/wifi/wifi.h](./firmware/main/wifi/wifi.h)
4. To connect to an existing AP like wireless router or mobile hotspot, you should follow these steps:
+ Set the correct SSID and password in [PM3_Modding/PM3_USB2UDP/firmware/main/wifi/wifi.h](./firmware/main/wifi/wifi.h)
Expand Down

0 comments on commit d4feccf

Please sign in to comment.