]> git.ipfire.org Git - people/ms/firmware-update.git/commitdiff
PC Engines apu1: Replace name of board "APU" with "apu1" for older firmware versions...
authorAlex Koch <ipfire@starkstromkonsument.de>
Wed, 28 Aug 2019 05:08:58 +0000 (07:08 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Sep 2019 09:10:21 +0000 (09:10 +0000)
Further information: https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md#corebootrom-flashing

Fixes: #12143
Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/firmware-update.in

index 6c681b51dee6936fd08e796184f63c6db0b6018c..006705ab91bdb5383de381953576e2ce1095818f 100644 (file)
@@ -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
                        ;;