fwupd/plugins/altos
Richard Hughes 87fb9ff447 Change the quirk file structure to be more efficient
This pivots the data storage so that the group is used as the preconditon
and the key name is used as the parameter to change. This allows a more natural
data flow, where a new device needs one new group and a few few keys, rather
than multiple groups, each with one key.

This also allows us to remove the key globbing when matching the version format
which is often a source of confusion.

Whilst changing all the quirk files, change the key prefixes to be more familiar
to Windows users (e.g. Hwid -> Smbios, and FuUsbDevice -> DeviceInstanceId)
who have to use the same IDs in Windows Update.

This also allows us to pre-match the desired plugin, rather than calling the
probe() function on each plugin.
2018-06-28 13:32:30 +01:00
..
data Add support for flashing the ChaosKey 2017-01-09 12:21:35 +00:00
altos.quirk Change the quirk file structure to be more efficient 2018-06-28 13:32:30 +01:00
fu-altos-device.c trivial: Convert FuAltosDevice to use G_DECLARE_FINAL_TYPE 2018-05-29 09:29:15 +01:00
fu-altos-device.h trivial: Convert FuAltosDevice to use G_DECLARE_FINAL_TYPE 2018-05-29 09:29:15 +01:00
fu-altos-firmware.c Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
fu-altos-firmware.h Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
fu-plugin-altos.c Change the quirk file structure to be more efficient 2018-06-28 13:32:30 +01:00
meson.build Change the quirk file structure to be more efficient 2018-06-28 13:32:30 +01:00
README.md Add support for flashing the ChaosKey 2017-01-09 12:21:35 +00:00

Altos Support

Introduction

Altos is a 8051 operating system for Altus-Metrum projects. The ChaosKey is a hardware random number generator that attaches via USB.

When the ChaosKey when inserted it appears as a device handled by the kernel with VID 0x1d50 and PID 0x60c6. If pins 1 and 5 are shorted as the device is connected then the bootloader is run, which presents VID 0xfffe and PID 0x000a.

The bootloader communication is not handled in the kernel, and a tty device is created so userspace can communicate with the hardware. Commands the bootloader accept are as follows:

List Information

Command: l\n Several lines of text about the device are transferred to the host, e.g.

altos-loader
manufacturer     altusmetrum.org
product          AltosFlash
flash-range      08001000 08008000
software-version 1.6.8

There doesn't appear to be any kind of end-of-message signal.

Read Flash

Command: R $addr\n where $addr is a memory address 0x8001000->0x8008000. 256 bytes of raw data are then transferred to the host.

Write Flash

Command: W $addr\n where $addr is a memory address 0x8001000->0x8008000. 256 bytes of raw data are then transferred to the device.

Application Mode

Command: v\n The device will reboot into application mode. This is typically performed after flashing firmware completes successfully.