Conversation
…tion scripts Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
Co-authored-by: Crashkeyz <186653592+Crashkeyz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request adds Bruce Firmware sideload support to the Ultimatum Cardputer firmware, enabling users to run the firmware as a loadable application through Bruce Firmware without replacing their base firmware. This provides a flexible deployment option for testing and switching between different firmwares.
Key Changes
- Added automated installation scripts for Unix/macOS and Windows platforms with validation and error handling
- Created comprehensive documentation including quick start guide and detailed sideload instructions
- Implemented CI/CD workflow to automatically build, package, and release firmware bundles for Bruce Firmware compatibility
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
install-bruce-sideload.sh |
Bash installation script that copies firmware files to SD card with validation |
install-bruce-sideload.bat |
Windows batch script equivalent with per-file error checking |
docs/README.md |
Updated documentation index with links to new Bruce Firmware guides |
docs/QUICK_START_BRUCE.md |
New 3-step quick start guide with visual workflow diagrams |
docs/BRUCE_FIRMWARE_SIDELOAD.md |
Comprehensive installation and troubleshooting guide for sideload setup |
bruce_manifest.json |
Metadata manifest for Bruce Firmware loader with device specs and features |
README.md |
Added sideload section highlighting new installation option |
.github/workflows/bruce-firmware-package.yml |
CI/CD workflow for automated building, packaging, and release creation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cat > bruce-package/ultimatum/README.txt << 'EOF' | ||
| Ultimatum Cardputer Firmware - Bruce Firmware Sideload Package | ||
| ================================================================ | ||
|
|
||
| Installation Instructions: | ||
| 1. Copy the entire "ultimatum" folder to your SD card's "firmware" directory | ||
| 2. Full path should be: SD:/firmware/ultimatum/ | ||
| 3. Insert SD card into your M5Stack Cardputer running Bruce Firmware | ||
| 4. Navigate to sideload/apps menu in Bruce Firmware | ||
| 5. Select "Ultimatum Cardputer" to load | ||
|
|
||
| For detailed instructions, visit: | ||
| https://github.com/Crashkeyz/UltimatumCardputerKey/blob/main/docs/BRUCE_FIRMWARE_SIDELOAD.md | ||
|
|
||
| Files included: | ||
| - firmware.bin: Main firmware binary | ||
| - manifest.json: Metadata for Bruce Firmware | ||
| - default_16MB.csv: Partition table | ||
| - README.txt: This file | ||
| EOF |
There was a problem hiding this comment.
The workflow hardcodes version "1.0.0" in the generated README.txt. This should be dynamically extracted from bruce_manifest.json or another source to maintain consistency and avoid manual updates when the version changes.
| ## Advanced: Automated Installation Script | ||
|
|
||
| For advanced users, you can create a script to automate the SD card setup: | ||
|
|
||
| ```bash | ||
| #!/bin/bash | ||
| # setup-bruce-sideload.sh | ||
|
|
||
| SD_PATH="/path/to/your/sdcard" | ||
| FIRMWARE_DIR="$SD_PATH/firmware/ultimatum" | ||
|
|
||
| # Create directory structure | ||
| mkdir -p "$FIRMWARE_DIR" | ||
|
|
||
| # Copy firmware files | ||
| cp .pio/build/m5stack-cardputer/firmware.bin "$FIRMWARE_DIR/" | ||
| cp bruce_manifest.json "$FIRMWARE_DIR/manifest.json" | ||
| cp default_16MB.csv "$FIRMWARE_DIR/" | ||
|
|
||
| echo "Firmware copied to SD card successfully!" | ||
| echo "Safely eject SD card and insert into your Cardputer" | ||
| ``` | ||
|
|
||
| Make it executable and run: | ||
| ```bash | ||
| chmod +x setup-bruce-sideload.sh | ||
| ./setup-bruce-sideload.sh | ||
| ``` |
There was a problem hiding this comment.
The documentation example shows a bash script at lines 178-195 which is described as "Advanced: Automated Installation Script", but this functionality already exists in the repository as "install-bruce-sideload.sh". This creates confusion as users might not realize the script already exists. Consider updating this section to reference the existing installation scripts instead of providing a duplicate example.
| chmod +x setup-bruce-sideload.sh | ||
| ./setup-bruce-sideload.sh |
There was a problem hiding this comment.
The example script at line 200 references "setup-bruce-sideload.sh" but the actual script in the repository is named "install-bruce-sideload.sh". This inconsistency could confuse users. Either update the example to use the correct filename or clarify that this is a hypothetical example.
| chmod +x setup-bruce-sideload.sh | |
| ./setup-bruce-sideload.sh | |
| chmod +x install-bruce-sideload.sh | |
| ./install-bruce-sideload.sh |
| cat > "$TARGET_DIR/README.txt" << 'EOF' | ||
| Ultimatum Cardputer Firmware - Bruce Firmware Sideload Package | ||
| ================================================================ | ||
|
|
||
| This firmware can be loaded through Bruce Firmware's sideload menu. | ||
|
|
||
| To Use: | ||
| 1. Ensure this folder is at: SD:/firmware/ultimatum/ | ||
| 2. Boot your M5Stack Cardputer with Bruce Firmware | ||
| 3. Navigate to the sideload or apps menu | ||
| 4. Select "Ultimatum Cardputer" | ||
| 5. The firmware will load | ||
|
|
||
| To Return to Bruce Firmware: | ||
| - Simply restart your device | ||
|
|
||
| Files: | ||
| - firmware.bin: Main firmware binary | ||
| - manifest.json: Metadata for Bruce Firmware loader | ||
| - default_16MB.csv: Partition table for proper memory management | ||
| - README.txt: This file | ||
|
|
||
| For more information: | ||
| https://github.com/Crashkeyz/UltimatumCardputerKey/blob/main/docs/BRUCE_FIRMWARE_SIDELOAD.md | ||
|
|
||
| Version: 1.0.0 | ||
| EOF |
There was a problem hiding this comment.
The heredoc uses single quotes ('EOF') which prevents variable expansion, but the script then embeds a static version number (1.0.0) in the README. If the version changes, this hardcoded value will become outdated. Consider extracting the version from bruce_manifest.json or another source to ensure consistency across files.
| echo "✓ SD card found at: $SD_PATH" | ||
| echo "" | ||
|
|
||
| # Create firmware directory if it doesn't exist | ||
| echo "Creating directory structure..." | ||
| mkdir -p "$TARGET_DIR" | ||
|
|
||
| if [ ! -d "$TARGET_DIR" ]; then | ||
| echo "❌ Error: Could not create directory: $TARGET_DIR" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "✓ Directory created: $TARGET_DIR" | ||
| echo "" | ||
|
|
||
| # Check if firmware files exist locally | ||
| if [ ! -f ".pio/build/m5stack-cardputer/firmware.bin" ]; then | ||
| echo "❌ Error: Firmware binary not found!" | ||
| echo "" | ||
| echo "Please build the firmware first:" | ||
| echo " pio run -e m5stack-cardputer" | ||
| echo "" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Copy firmware files | ||
| echo "Copying firmware files..." | ||
|
|
||
| if cp .pio/build/m5stack-cardputer/firmware.bin "$TARGET_DIR/" && \ | ||
| cp bruce_manifest.json "$TARGET_DIR/manifest.json" && \ | ||
| cp default_16MB.csv "$TARGET_DIR/"; then | ||
| # Create a README in the target directory | ||
| cat > "$TARGET_DIR/README.txt" << 'EOF' | ||
| Ultimatum Cardputer Firmware - Bruce Firmware Sideload Package | ||
| ================================================================ | ||
|
|
||
| This firmware can be loaded through Bruce Firmware's sideload menu. | ||
|
|
||
| To Use: | ||
| 1. Ensure this folder is at: SD:/firmware/ultimatum/ | ||
| 2. Boot your M5Stack Cardputer with Bruce Firmware | ||
| 3. Navigate to the sideload or apps menu | ||
| 4. Select "Ultimatum Cardputer" | ||
| 5. The firmware will load | ||
|
|
||
| To Return to Bruce Firmware: | ||
| - Simply restart your device | ||
|
|
||
| Files: | ||
| - firmware.bin: Main firmware binary | ||
| - manifest.json: Metadata for Bruce Firmware loader | ||
| - default_16MB.csv: Partition table for proper memory management | ||
| - README.txt: This file | ||
|
|
||
| For more information: | ||
| https://github.com/Crashkeyz/UltimatumCardputerKey/blob/main/docs/BRUCE_FIRMWARE_SIDELOAD.md | ||
|
|
||
| Version: 1.0.0 | ||
| EOF | ||
|
|
||
| echo "✓ Files copied successfully!" |
There was a problem hiding this comment.
The script uses different visual checkmarks/cross symbols ('✓' vs '❌') compared to the batch script which uses '[OK]' and '[X]'. Consider standardizing the output symbols across both scripts for consistency, or use ASCII characters that work reliably across all terminal types.
| echo For more information: | ||
| echo https://github.com/Crashkeyz/UltimatumCardputerKey/blob/main/docs/BRUCE_FIRMWARE_SIDELOAD.md | ||
| echo. | ||
| echo Version: 1.0.0 |
There was a problem hiding this comment.
The hardcoded version number (1.0.0) in the README will become outdated when the version changes. This duplicates the version information from bruce_manifest.json, creating a maintenance burden. Consider either extracting the version dynamically or removing it from this generated file.
| echo Version: 1.0.0 | |
| echo Version: See manifest.json for the current firmware version |
| echo "Examples:" | ||
| echo " macOS: ./install-bruce-sideload.sh /Volumes/SDCARD" | ||
| echo " Linux: ./install-bruce-sideload.sh /media/user/SDCARD" | ||
| echo " Windows: Use install-bruce-sideload.bat instead" |
There was a problem hiding this comment.
The script reference to "install-bruce-sideload.bat" is misleading because the workflow generates a simpler "install.bat" file (line 136). Users downloading the GitHub release package will have "install.bat", not "install-bruce-sideload.bat". Consider updating this reference to match the actual filename in the generated package.
| echo " Windows: Use install-bruce-sideload.bat instead" | |
| echo " Windows: Use install.bat instead" |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Enables loading Ultimatum Cardputer firmware as a sideloadable application through Bruce Firmware, allowing users to run it alongside their base firmware without replacement.
Changes
Core Files
bruce_manifest.json- Metadata manifest for Bruce Firmware loader (device specs, features, binary paths)install-bruce-sideload.sh- Automated Unix/macOS installer with validation and error handlinginstall-bruce-sideload.bat- Windows equivalent with per-file error checkingDocumentation
docs/BRUCE_FIRMWARE_SIDELOAD.md- Complete installation guide with troubleshootingdocs/QUICK_START_BRUCE.md- 3-step quick start with visual workflowREADME.md- Added sideload section and installation optionsdocs/README.md- Updated documentation indexCI/CD
.github/workflows/bruce-firmware-package.yml- Automated build/packaging workflow that generates ZIP/TAR.GZ archives with installation scripts and creates GitHub releasesSD Card Structure
Usage
No firmware code modifications required. Maintains full compatibility with direct flashing.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.registry.nm1.platformio.org/home/REDACTED/.local/bin/platformio platformio run -e m5stack-cardputer(dns block)api.registry.platformio.org/home/REDACTED/.local/bin/platformio platformio run -e m5stack-cardputer(dns block)collector.platformio.org/home/REDACTED/.local/bin/platformio platformio run -e m5stack-cardputer(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.