From: Alex Koch Date: Wed, 28 Aug 2019 05:08:58 +0000 (+0200) Subject: PC Engines apu1: Replace name of board "APU" with "apu1" for older firmware versions... X-Git-Tag: 20200107~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21ef6d21edffed441ee8ef03695286eedec32367;p=people%2Fms%2Ffirmware-update.git PC Engines apu1: Replace name of board "APU" with "apu1" for older firmware versions and insert additional switch for chipname. Further information: https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md#corebootrom-flashing Fixes: #12143 Signed-off-by: Alex Koch Signed-off-by: Michael Tremer --- diff --git a/src/firmware-update.in b/src/firmware-update.in index 6c681b5..006705a 100644 --- a/src/firmware-update.in +++ b/src/firmware-update.in @@ -157,12 +157,17 @@ update_pcengines_apu() { shift 2 local programmer="internal" + local flashrom_args=() while [ $# -gt 0 ]; do case "${1}" in --allow-boardmismatch) programmer="internal:boardmismatch=force" ;; + # Pass any other arguments to flashrom + *) + flashrom_args+=( "${1}" ) + ;; esac shift done @@ -189,7 +194,7 @@ update_pcengines_apu() { # Perform update if get_consent "${firmware}"; then - do_flashrom -p "${programmer}" -w "${firmware}" + do_flashrom -p "${programmer}" -w "${firmware}" "${flashrom_args[@]}" fi } @@ -207,6 +212,12 @@ do_update() { echo "Detected ${vendor} ${board} running BIOS version ${bios_version}" case "${vendor},${board}" in + "PC Engines",APU|"PC Engines",apu1) + # APU1 boards need to have their chip set + update_pcengines_apu "apu1" "${bios_version}" --allow-boardmismatch \ + -c "MX25L1605A/MX25L1606E/MX25L1608E" + ;; + "PC Engines",APU*) update_pcengines_apu "${board,,}" "${bios_version}" --allow-boardmismatch ;;