supports binary-format, only esp* supported for now

This commit is contained in:
Li Jie
2025-08-22 20:42:43 +08:00
parent 1f193c8533
commit ecaf7c8ac6
10 changed files with 568 additions and 15 deletions

View File

@@ -0,0 +1,14 @@
package firmware
import (
"fmt"
"strings"
)
func MakeFirmwareImage(infile, outfile, format string) error {
fmt.Printf("Creating firmware image from %s to %s with format %s\n", infile, outfile, format)
if strings.HasPrefix(format, "esp") {
return makeESPFirmareImage(infile, outfile, format)
}
return fmt.Errorf("unsupported firmware format: %s", format)
}