refactor: simplify Gitea release workflow by using esptool for binary creation
This commit is contained in:
		
							
								
								
									
										37
									
								
								.github/workflows/providers/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								.github/workflows/providers/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -44,34 +44,27 @@ jobs: | |||||||
|         # Create OTA binary (firmware only) |         # Create OTA binary (firmware only) | ||||||
|         cp firmware.bin filaman_ota.bin |         cp firmware.bin filaman_ota.bin | ||||||
|          |          | ||||||
|         # Create basic flash layout |         # Use esptool to create the full binary | ||||||
|         echo "Creating initial 4MB flash image..." |         esptool.py --chip esp32 merge_bin \ | ||||||
|         dd if=/dev/zero bs=1M count=4 of=flash_4mb.bin |           --flash_mode dio \ | ||||||
|  |           --flash_freq 40m \ | ||||||
|  |           --flash_size 4MB \ | ||||||
|  |           --target-offset 0x0 \ | ||||||
|  |           -o filaman_full.bin \ | ||||||
|  |           0x1000 bootloader.bin \ | ||||||
|  |           0x8000 partitions.bin \ | ||||||
|  |           0x10000 firmware.bin \ | ||||||
|  |           0x3D0000 spiffs.bin | ||||||
|          |          | ||||||
|         # Create partition layout |         # Verify binaries | ||||||
|         echo "Writing bootloader..." |  | ||||||
|         dd if=bootloader.bin of=flash_4mb.bin bs=1 seek=$((0x1000)) conv=notrunc |  | ||||||
|          |  | ||||||
|         echo "Writing partitions..." |  | ||||||
|         dd if=partitions.bin of=flash_4mb.bin bs=1 seek=$((0x8000)) conv=notrunc |  | ||||||
|          |  | ||||||
|         echo "Writing firmware..." |  | ||||||
|         dd if=firmware.bin of=flash_4mb.bin bs=1 seek=$((0x10000)) conv=notrunc |  | ||||||
|          |  | ||||||
|         echo "Writing SPIFFS..." |  | ||||||
|         dd if=spiffs.bin of=flash_4mb.bin bs=1 seek=$((0x3D0000)) conv=notrunc |  | ||||||
|          |  | ||||||
|         # Rename to final name |  | ||||||
|         cp flash_4mb.bin filaman_full.bin |  | ||||||
|          |  | ||||||
|         # Verify file sizes and content |  | ||||||
|         echo "File sizes:" |         echo "File sizes:" | ||||||
|         ls -lh *.bin |         ls -lh *.bin | ||||||
|          |          | ||||||
|         echo "Binary information:" |         echo "Binary information:" | ||||||
|  |         echo "OTA binary info:" | ||||||
|         esptool.py --chip esp32 image_info filaman_ota.bin || true |         esptool.py --chip esp32 image_info filaman_ota.bin || true | ||||||
|         echo "Full binary info:" |         echo "Full binary first 64 bytes:" | ||||||
|         xxd -l 64 filaman_full.bin |         od -A x -t x1z -N 64 filaman_full.bin | ||||||
|  |  | ||||||
|     - name: Create Release |     - name: Create Release | ||||||
|       env: |       env: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user