Add support for multiple winbond chip versions

This commit is contained in:
2026-04-14 09:33:15 -07:00
parent a665473903
commit a238334ae5
5 changed files with 125 additions and 21 deletions
+10 -4
View File
@@ -42,8 +42,11 @@ step_flash_bios() {
info "Attach the programmer to the 4MB (top) chip."
prompt_continue
info "Flashing 4MB chip..."
run_cmd "sudo flashrom --programmer ch341a_spi -w top.rom" || return 1
if [ -z "$CHIP_4MB" ]; then
_resolve_chip CHIP_4MB || return 1
fi
info "Flashing 4MB chip ($CHIP_4MB)..."
run_cmd "sudo flashrom --programmer ch341a_spi -c \"$CHIP_4MB\" -w top.rom" || return 1
success "4MB chip flashed."
# Flash 8MB (bottom) chip
@@ -51,8 +54,11 @@ step_flash_bios() {
info "Now attach the programmer to the 8MB (bottom) chip."
prompt_continue
info "Flashing 8MB chip..."
run_cmd "sudo flashrom --programmer ch341a_spi -w bottom.rom" || return 1
if [ -z "$CHIP_8MB" ]; then
_resolve_chip CHIP_8MB || return 1
fi
info "Flashing 8MB chip ($CHIP_8MB)..."
run_cmd "sudo flashrom --programmer ch341a_spi -c \"$CHIP_8MB\" -w bottom.rom" || return 1
success "8MB chip flashed."
echo ""