Skip to content

Commit e986208

Browse files
committed
Use payload.dol for making builds
1 parent 2da2def commit e986208

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run: |
5353
cd gekkoboot
5454
if [ -f "gekkoboot.dol" ]; then
55-
cp gekkoboot.dol ${{ github.workspace }}/gekkoboot.dol
55+
cp gekkoboot.dol ${{ github.workspace }}/payload.dol
5656
else
5757
echo "gekkoboot.dol not found"
5858
exit 1

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
uses: mikepenz/release-changelog-builder-action@v5
8585
with:
8686
mode: "COMMIT"
87-
toTag: ${{ github.event.inputs.version }} # Explicitly set the current tag
87+
toTag: ${{ github.event.inputs.version }}
8888
configurationJson: |
8989
{
9090
"template": "#{{UNCATEGORIZED}}",

tools/build.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/bin/bash
2+
# -----------------------------------------------------------------------
3+
# build.sh - Builds PicoBoot firmware files for different platforms
4+
# -----------------------------------------------------------------------
5+
# Purpose:
6+
# Builds PicoBoot firmware files for both Raspberry Pi Pico and Pico 2
7+
# platforms. Processes gekkoboot.dol into payload files and creates
8+
# universal payload that works on both boards.
9+
# Outputs uf2 files into dist/ directory.
10+
#
11+
# Usage:
12+
# ./build.sh
13+
# -----------------------------------------------------------------------
214

315
set -e
416

@@ -16,25 +28,25 @@ build_type="RelWithDebInfo"
1628

1729
num_configs=${#platforms[@]}
1830

19-
if [ ! -f "gekkoboot.dol" ]; then
20-
echo -e "${RED}Error: gekkoboot.dol file not found${NC}"
31+
if [ ! -f "payload.dol" ]; then
32+
echo -e "${RED}Error: payload.dol file not found${NC}"
2133
exit 1
2234
fi
2335

2436
echo -e "${BLUE}##########################################################${NC}"
2537
echo -e "🚀 ${YELLOW}Generating payload uf2 files:${NC}"
26-
echo -e "📂 ${YELLOW}Build directory:${NC} ${GREEN}build/gekkoboot${NC}"
38+
echo -e "📂 ${YELLOW}Input file:${NC} ${GREEN}payload.dol${NC}"
2739
echo -e "${BLUE}##########################################################${NC}"
2840

2941
if [ ! -d "dist" ]; then
3042
mkdir dist
3143
fi
3244

3345
echo -e "\n🔨 ${YELLOW}Building payload uf2 file for Pico...${NC}"
34-
./process_ipl.py dist/payload_pico.uf2 gekkoboot.dol rp2040
46+
./process_ipl.py dist/payload_pico.uf2 payload.dol rp2040
3547

3648
echo -e "\n🔨 ${YELLOW}Building payload uf2 file for Pico 2...${NC}"
37-
./process_ipl.py dist/payload_pico2.uf2 gekkoboot.dol rp2350
49+
./process_ipl.py dist/payload_pico2.uf2 payload.dol rp2350
3850

3951
echo -e "\n🔨 ${YELLOW}Building universal payload uf2 file...${NC}"
4052
cat dist/payload_pico.uf2 dist/payload_pico2.uf2 > dist/payload_universal.uf2
@@ -63,13 +75,15 @@ for (( i=0; i<num_configs; i++ )); do
6375
cp build/${build_dir}/picoboot.uf2 dist/picoboot_${board_arch}.uf2
6476

6577
if [ "${platform}" == "rp2350" ]; then
66-
# RP2350 workaround for invalid core+payload uf2 file
6778
echo -e "\n🔨 ${YELLOW}RP2350 workaround: Building core uf2 file...${NC}"
6879
picotool uf2 convert build/${build_dir}/dist/picoboot.bin build/${build_dir}/picoboot.uf2 --family rp2350-arm-s
80+
else
81+
echo -e "\n🔨 ${YELLOW}RP2040 workaround: Padding binary to 4k block size...${NC}"
82+
tools/rp2040_4k_align.sh build/${build_dir}/dist/picoboot.bin build/${build_dir}/dist/picoboot_padded.bin
83+
picotool uf2 convert build/${build_dir}/dist/picoboot_padded.bin build/${build_dir}/picoboot.uf2 --family rp2040
6984
fi
7085

7186
echo -e "\n🔨 ${YELLOW}Merging binaries...${NC}"
72-
7387
uf2tool join -o dist/${output_file} build/${build_dir}/picoboot.uf2 dist/payload_${board_arch}.uf2 --family ${family}
7488

7589
echo -e "${GREEN}Build finished for ${platform} (${board})!${NC}\n"

0 commit comments

Comments
 (0)