reform

MNT Reform: Open Source Portable Computer
Log (Feed) | Files | Refs (Tags) | README

commit bc12a253f9c4ee5e9821100f0f687e0cef5d24ae
parent fc65203d24aaf1a17edb518dc97bce6ea47e9255
Author: Lukas F. Hartmann <lukas@mntre.com>
Date:   Mon, 11 Mar 2024 17:51:36 +0100

keyboard-fw: add fw download helper

Diffstat:
Areform2-keyboard-fw/download-fw.sh | 32++++++++++++++++++++++++++++++++
Mreform2-keyboard-fw/flash.sh | 2+-
2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/reform2-keyboard-fw/download-fw.sh b/reform2-keyboard-fw/download-fw.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +programname=$0 +fwver=$1 + +function usage { + echo "usage: $programname variant" + echo "" + echo "to download the firmware for the keyboard built into your MNT Reform:" + echo "" + echo " $programname 3_US # (if you have a QWERTY-US keyboard V3)" + echo " $programname 3 # (if you have a non-US keyboard V3)" + echo " $programname 2_US # (if you have a QWERTY-US keyboard V2)" + echo " $programname 2 # (if you have a non-US keyboard V2)" + echo "" + echo "if you want to flash a standalone USB keyboard, use one of the following:" + echo "" + echo " $programname 3_US-standalone" + echo " $programname 3-standalone" + echo " $programname 2_US-standalone" + echo " $programname 2-standalone" + echo "" + exit 1 +} + +if [ "$fwver" != "3_US" ] && [ "$fwver" != "2_US" ] && [ "$fwver" != "3" ] && [ "$fwver" != "2" ]; then + usage +fi + +mkdir -p bin +wget -O keyboard.hex "https://source.mnt.re/reform/reform/-/jobs/artifacts/master/raw/reform2-keyboard-fw/keyboard-$fwver.hex?job=build" + diff --git a/reform2-keyboard-fw/flash.sh b/reform2-keyboard-fw/flash.sh @@ -3,7 +3,7 @@ set -eu if [ ! -e ./keyboard.hex ]; then - echo "keyboard.hex doesn't exist" >&2 + echo "keyboard.hex doesn't exist. build it or use ./download-fw.sh to download it." >&2 exit 1 fi