diff --git a/README.md b/README.md
index 41d6ba571..bd66e82f0 100644
--- a/README.md
+++ b/README.md
@@ -1,94 +1,7 @@
fwupd
=====
-fwupd is a simple daemon to allow session software to update device firmware on
-your local machine. It's designed for desktops, but this project is probably
-quite interesting for phones, tablets and server farms, so I'd be really happy
-if this gets used on other non-desktop hardware.
-
-You can either use a GUI software manager like GNOME Software to view and apply
-updates, the command-line tool or the system D-Bus interface directly.
-
-Introduction
-------------
-
-Updating firmware easily is actually split into two parts:
-
- * Providing metadata about what vendor updates are available (AppStream)
- * A mechanism to actually apply the file onto specific hardware (this project)
-
-What do we actually need to apply firmware easily? A raw binary firmware file
-isn't so useful, and so Microsoft have decided we should all package it up in a
-.cab file (a bit like a .zip file) along with a .inf file that describes the
-update in more detail. The .inf file gives us the hardware ID of what the
-firmware is referring to, as well as the vendor and a short update description.
-
-I'm asking friendly upstream vendors to also include a MetaInfo file alongside
-the .inf file in the firmware .cab file. This means we can have fully localized
-update descriptions, along with all the usual things you'd expect from an
-update, e.g. the upstream vendor, the licensing information, etc.
-
-A lot of people don't have UEFI hardware that is capable of applying capsule
-firmware updates, so I've also added a ColorHug provider, which predictably also
-lets you update the firmware on your ColorHug devices.
-
-I'm also happy to accept patches for other hardware that supports updates,
-although the internal API isn't 100% stable yet. The provider concept allows
-vendors to do pretty much anything to get the list of attached hardware, as long
-as a unique hardware component is in some way mapped to a GUID value.
-Ideally the tools would be open source, or better still not needing any external
-tools at all. Reading a VID/PID and then writing firmware to a chip usually
-isn't rocket science.
-
-What is standardised is the metadata, using AppStream 0.9 as the interchange
-format. A lot of tools already talk AppStream and so this makes working with
-other desktop and server tools very easy. Actually generating the AppStream
-metadata can either be done using using `appstream-builder` or the Linux
-Vendor Firmware Service.
-
-Security
---------
-
-By default, any users are able to install firmware to removable hardware.
-The logic here is that if the hardware can be removed, it can easily be moved to
-a device that the user already has root access on, and asking for authentication
-would just be security theatre.
-
-For non-removable devices, e.g. UEFI firmware, admin users are able to update
-firmware without the root password. By default, we already let admin user and
-root update glibc and the kernel without additional authentication, and these
-would be a much easier target to backdoor. The firmware updates themselves
-have a checksum, and the metadata describing this checksum is provided by the
-distribution either as GPG-signed repository metadata, or installed from a
-package, which is expected to also be signed. It is important that clients that
-are downloading firmware for fwupd check the checksum before asking fwupd to
-update a specific device.
-
-User Interaction
-----------------
-
-No user interaction should be required when actually applying updates. Making
-it prohibited means we can do the upgrade with a fancy graphical splash screen,
-without having to worry about locales and input methods. Updating firmware
-should be no more dangerous than installing a new kernel or glibc package.
-
-Offline Updates Lifecycle
--------------------------
-
-Offline updates are done using a special boot target which means that the usual
-graphical environment is not started. Once the firmware update has completed the
-system will reboot.
-
-Devices go through the following lifecycles:
-
- * created -> `SCHEDULED` -> `SUCCESS` -> deleted
- * created -> `SCHEDULED` -> `FAILED` -> deleted
-
-Any user-visible output is available using the `GetResults()` D-Bus method, and
-the database entry is only deleted once the `ClearResults()` method is called.
-
-The results are obtained and cleared either using a provider-supplied method
-or using a small SQLite database located at `/var/lib/fwupd/pending.db`
+This project aims to make updating firmware on Linux automatic, safe and reliable.
ColorHug Support
----------------
@@ -98,195 +11,14 @@ provides. Compile it from source https://github.com/hughsie/colord or grab the
RPMs here http://people.freedesktop.org/~hughsient/fedora/
If you don't want or need this functionality you can use the
-`--disable-colorhug` option.
+
- Updating the firmware on your ColorHugALS device improves performance and
- adds new features.
- This stable release fixes the following bugs:
+A lot of people don't have UEFI hardware that is capable of applying capsule
+firmware updates, so I've also added a ColorHug provider, which predictably also
+lets you update the firmware on your ColorHug devices.
+
+I'm also happy to accept patches for other hardware that supports updates.
+The provider concept allows vendors to do pretty much anything to get the list
+of attached hardware, as long as a unique hardware component is in some way
+mapped to a GUID value.
+Ideally the tools would be open source, or better still not needing any external
+tools at all.
+Reading a VID/PID and then writing firmware to a chip usually isn't rocket science.
+
+AppStream 0.9
+is used as the interchange format for update descriptions.
+A lot of tools already talk AppStream and so this makes working with
+other desktop and server tools very easy. Actually generating the AppStream
+metadata can either be done using using
+fwupd is implemented as a D-Bus activated service that is autostarted when
+required.
+
+The 'client' which is typically
+The latest code is always available at GitHub
+and this is also the place to file bugs or feature requests.
+You can trivially get the code by doing:
+
+You can also install all the required dependancies using:
+
+There are currently several ways to detect the firmware version:
+
+For generic USB devices you can use a firmware vendor extensions that are used
+by several OpenHardware projects.
+This means the fwupd daemon can obtain the GUID and firmware version without
+claiming the interface on the device and preventing other software from using it.
+
+To implement the firmware version extension just create an interface descriptor
+with class code
+Furthermore, using the firmware GUID extension allows fwupd to detect firmware
+updates for devices it does not know how to update.
+These types of devices will however show up in the command line and GUI tools,
+so the user is at least aware that updates are available.
+
+To implement this, add an interface descriptor with class code
+Offline updates are done using a special boot target which means that the usual
+graphical environment is not started. Once the firmware update has completed the
+system will reboot.
+
+Devices go through the following lifecycles:
+
+Any user-visible output is available using the
+The results are obtained and cleared either using a provider-supplied method
+or using a small SQLite database located at
+Installing a public key to
+Only very few keys will be installed by default. These are the keys of
+vendors who have a proven security track record and a thorough understanding of
+public-private key security.
+
+In particular, private keys should only be kept on Hardware Security
+Mechanisms, and used on machines (or virtual machine) that have limited network
+access, or networking completely disabled.
+The machine and any backups also need to be kept physically secure.
+
+If you think your key should be added by default and trusted by all users,
+please open a pull request with details about your company including items such
+as a daytime phone number and any relevant security policies already in place.
+
+This project aims to make updating firmware on Linux automatic, safe and reliable.
+
+To update a BIOS or network card firmware in Linux traditionally meant rebooting into Microsoft Windows, or
+preparing a MSDOS floppy disk (!) and hoping that everything would
+work after the update.
+
+Now that we have UEFI as a boot mechanism it's much more important to
+update firmware on devices, as these updates can fix serious security bugs.
+Periodically searching a vendor website for updates is a manual and
+error-prone task and not something we should ask users to do.
+
+Providing a firmware update service actually requires two things:
+
+Traditionally firmware is packaged up in a
+ Go back to the submission page.
+
+fwupd is a simple daemon to allow session software to update device firmware on
+your local machine. It's designed for desktops, but this project is
+also usable on phones, tablets and on headless servers.
+You can either use a GUI software manager like GNOME Software to view and apply
+updates, the command-line tool or the system D-Bus interface directly.
+
+New versions of GNOME Software will show and auto-download pending updates automatically:
+
+Double clicking on the
+fwupd ships a command line
+You can see all the command line options using
+If there are supported devices available then the fwupd daemon will be
+launched when queried for the first time.
+This exports an interface that can be queried from any language with
+a D-Bus binding such as C, Python or Java.
+
+By default, any users are able to install firmware to removable hardware.
+The logic here is that if the hardware can be removed, it can easily be moved to
+a device that the user already has root access on, and asking for authentication
+would just be security theatre.
+
+For non-removable devices, e.g. UEFI firmware, admin users are able to update
+trusted firmware without the root password.
+By default, we already let admin user and root update glibc and the kernel
+without additional authentication, and these would be a much easier target to backdoor.
+The firmware updates themselves are signed and have a checksum, and the metadata
+describing this checksum is provided by the distribution either as
+GPG-signed repository metadata, or installed from a package, which is
+expected to also be signed.
+
+No user interaction should be required when actually applying updates.
+Making it prohibited means we can do the upgrade with a fancy graphical
+splash screen, without having to worry about locales and input methods.
+Updating firmware should be no more dangerous than installing a new kernel
+or glibc package.
+
+ This page provides a place for hardware vendors to submit packaged
+ firmware updates, typically
+ Clients such as fwupd
+ periodically check for updated metadata at this site and will offer the firmware
+ to end users or be installed automatically depending on site policy.
+
+ NOTE: This service should only be used to distribute firmware that is
+ flashed onto non-volatile memory.
+ It is not designed for firmware that has to be uploaded to devices every time
+ the device is used.
+
+ There is no charge to vendors for the hosting or distribution of content.
+ When files are submitted the following actions are performed:
+ It is imperative that updates have been verified to work correctly on
+ all matching hardware.
+ By uploading a firmware file you must agree that:
+If you are not using the UEFI capsule update method you need to write a
+plugin for fwupd to trigger the firmware update from userspace.
+At the moment there is just UEFI and ColorHug providers, but others are welcome.
+
+As per the Microsoft guidelines
+package up your firmware into a
+You can create a
+It is recommended you name the
+--disable-colorhug
option.
UEFI Support
------------
-If you're wondering where to get `fwupdate` from, either compile it form source
-(you might also need a newer `efivar`) from https://github.com/rhinstaller/fwupdate
+If you're wondering where to get
fwupdate
from, either compile it form source
+(you might also need a newer
efivar
) from https://github.com/rhinstaller/fwupdate
or grab the RPMs here https://pjones.fedorapeople.org/fwupdate/
-If you don't want or need this functionality you can use the `--disable-uefi`
+If you don't want or need this functionality you can use the
--disable-uefi
option.
-
-Vendor Firmware Updates
-=======================
-
-This document explains what steps a vendor needs to take so that firmware
-updates are downloaded and applied to user hardware automatically.
-
-Different hardware update methods can be supported, but would require a new
-plugin and there would need to be interfaces available to be able to write
-(or at least trigger) the firmware from userspace as the root user.
-
-What do I have to do?
----------------------
-
-As per the [Microsoft guidelines](https://msdn.microsoft.com/en-us/library/windows/hardware/dn917810%28v=vs.85%29.aspx),
-package up your firmware into a `.cab` file, with these files inside:
-
-* The actual `.cap` file your engineers have created
-* The `.inf` file describing the .cap file,
- described [here](https://msdn.microsoft.com/en-us/library/windows/hardware/ff547402%28v=vs.85%29.aspx)
-* The optional `.asc` file which is a detached GPG signature of the firmware file.
-* The optional `.metainfo.xml` file with a long description and extra metadata,
- described [here](http://www.freedesktop.org/software/appstream/docs/sect-Quickstart-Addons.html)
-
-You can create a `.cab` file using `makecab.exe` on Windows and `gcab --create`
-on Linux.
-
-It is recommended you name the `.cab` file with the hardware name and the version
-number, e.g. `colorhug-als-1.2.3.cab`. It's mandatory that the files inside the
-`.cab` file have the same basename, for example this is would be valid:
-
- colorhug2-1.2.3.cab
- |- firmware.inf
- |- firmware.bin
- |- firmware.bin.asc
- \- firmware.metainfo.xml
-
-An example `.inf` file might look like this:
-
-```ini
-[Version]
-Class=Firmware
-ClassGuid={f2e7dd72-6468-4e36-b6f1-6488f42c1b52}
-DriverVer=03/03/2015,3.0.2
-
-[Firmware_CopyFiles]
-firmware.bin
-
-[Firmware_AddReg]
-HKR,,FirmwareId,,{84f40464-9272-4ef7-9399-cd95f12da696}
-HKR,,FirmwareVersion,%REG_DWORD%,0x0000000
-HKR,,FirmwareFilename,,firmware.bin
-
-```
-
-An example `.metainfo.xml` file might look like this:
-
-```xml
-
-
-
-
- fwupd: Firmware
+
+
Update DaemonIntroduction
+appstream-builder
or the
+Linux Vendor Firmware Service.
+Architecture
+
+
gnome-software
or fwupd
+does all the query, download and schedule steps.
+This means that the daemon has no network access and only acts as the mechanism
+for clients.
+Getting the code
+
+$ git clone https://github.com/hughsie/fwupd.git
+
+
+$ sudo dnf install docbook-utils gettext intltool libgudev1-devel \
+ colord-devel polkit-devel libgcab1-devel \
+ sqlite-devel gpgme-devel fwupdate-devel
+
+
+How does fwupd know the device firmware version?
+
+
+
+bcdVersion
for some USB deviceslibfwupdate
to get the ESRT table dataUSB Firmware Version Extensions
+0xff
, subclass code 0x46
and
+protocol 0x57
pointing to a string descriptor with the firmware version.
+An example commit to the ColorHug project can be found
+here.
+0xff
, subclass
+code 0x47
and protocol 0x55
pointing to a string descriptor with the GUID.
+If the GUID matches the <id>
obtained from the AppStream metadata then the
+device will be shown.
+An example commit to the ColorHug project can be found
+here.
+Offline Updates Lifecycle
+
+
+SCHEDULED
→ SUCCESS
→ deletedSCHEDULED
→ FAILED
→ deletedGetResults()
D-Bus method, and
+the database entry is only deleted once the ClearResults()
method is called.
+/var/lib/fwupd/pending.db
+Adding Trusted Keys
+/etc/pki/fwupd
allows firmware signed with a
+matching private key to be recognized as trusted, which may require less
+authentication to install than for untrusted files.
+By default trusted firmware can be upgraded (but not downgraded)
+without the user or administrator
+password.
+Adding a New Key
+History
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/website/favicon.ico b/docs/website/favicon.ico
new file mode 100644
index 000000000..ef1639c3a
Binary files /dev/null and b/docs/website/favicon.ico differ
diff --git a/docs/website/img/architecture-plan.png b/docs/website/img/architecture-plan.png
new file mode 100644
index 000000000..f8ccf9097
Binary files /dev/null and b/docs/website/img/architecture-plan.png differ
diff --git a/docs/website/img/dbus.png b/docs/website/img/dbus.png
new file mode 100644
index 000000000..aef9ed2ed
Binary files /dev/null and b/docs/website/img/dbus.png differ
diff --git a/docs/website/img/gnome-software1-thumb.png b/docs/website/img/gnome-software1-thumb.png
new file mode 100644
index 000000000..d26c3317c
Binary files /dev/null and b/docs/website/img/gnome-software1-thumb.png differ
diff --git a/docs/website/img/gnome-software1.png b/docs/website/img/gnome-software1.png
new file mode 100644
index 000000000..df1d27263
Binary files /dev/null and b/docs/website/img/gnome-software1.png differ
diff --git a/docs/website/img/gnome-software2-thumb.png b/docs/website/img/gnome-software2-thumb.png
new file mode 100644
index 000000000..a28e2932c
Binary files /dev/null and b/docs/website/img/gnome-software2-thumb.png differ
diff --git a/docs/website/img/gnome-software2.png b/docs/website/img/gnome-software2.png
new file mode 100644
index 000000000..b84d08a9a
Binary files /dev/null and b/docs/website/img/gnome-software2.png differ
diff --git a/docs/website/img/nav-devs.svg b/docs/website/img/nav-devs.svg
new file mode 100644
index 000000000..ed6044c41
--- /dev/null
+++ b/docs/website/img/nav-devs.svg
@@ -0,0 +1,100 @@
+
+
+
+
diff --git a/docs/website/img/nav-hw.svg b/docs/website/img/nav-hw.svg
new file mode 100644
index 000000000..43dcdab6d
--- /dev/null
+++ b/docs/website/img/nav-hw.svg
@@ -0,0 +1,125 @@
+
+
+
+
diff --git a/docs/website/img/nav-users.svg b/docs/website/img/nav-users.svg
new file mode 100644
index 000000000..88abc8b76
--- /dev/null
+++ b/docs/website/img/nav-users.svg
@@ -0,0 +1,102 @@
+
+
+
+
diff --git a/docs/website/index.html b/docs/website/index.html
new file mode 100644
index 000000000..36265cce7
--- /dev/null
+++ b/docs/website/index.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+query('SELECT name FROM users WHERE guid = "' . $id . '";');
+ return $res->fetch_assoc()['name'];
+}
+
+$db = lvfs_connect_db();
+$res = $db->query('SELECT * FROM firmware');
+while ($row = $res->fetch_assoc()) {
+ $vendor_name = lvfs_get_vendor_name($db, $row["vendor_key"]);
+ echo 'Vendor
+Filename
+Hash
+';
+ echo ' ';
+}
+
+lvfs_disconnect_db($db);
+
+?>
+' . $vendor_name . ' ';
+ echo '' . $row["filename"] . ' ';
+ echo '' . $row["hash"] . ' ';
+ echo 'fwupd: Updating
+
+
Firmware in LinuxIntroduction
+About
+
+
+
+
+cab
file which includes
+an inf
file that describes the update in more detail.
+We can also add extra metadata so we can have fully localized update descriptions,
+along with all the usual things you'd expect from an update, for example,
+security classification and licensing information.
+Result: Failed
';
+?>
+
+
+
+
+
+
+
+
+Test
+Result
+' . $title . ' ';
+ if ($_GET[$get_id] == 'False')
+ echo '☐ ' . $error_msg;
+ else
+ echo '☑ Passed';
+ echo ' ';
+}
+
+lvfs_result('authkey', 'Auth Key', 'Did not match any registered vendors');
+lvfs_result('sizecheck', 'Size Check', 'File was too small or large');
+lvfs_result('filetype', 'File Type', 'Not a valid cab
file');
+lvfs_result('metadata', 'Metadata', 'The firmware file had no valid metadata');
+lvfs_result('exists', 'Version Check', 'The firmware file already exists');
+
+?>
+
+fwupd: Firmware
+
+
Update DaemonIntroduction
+Using GNOME Software
+
+
cab
file is also supported:
+
+
+
Using the command line
+fwupdmgr
program.
+This allows administrators to get the list of upgradable devices,
+schedule offline updates or installing firmware on the live system.
+
+$ fwupdmgr get-devices
+Device: ro__sys_devices_pci0000_00_0000_00_1d_0_usb2_2_1_2_1_4_2_1_4_1_0
+ DisplayName: USB 3.0 VL812 B2 Hub
+ Provider: Udev
+ Guid: 26470009-97a8-4028-867a-bbbac6ee7bf0
+ Version: 9090
+ Internal: False
+ AllowOnline: False
+ AllowOffline: False
+Device: ro__sys_devices_pci0000_00_0000_00_01_0_0000_01_00_0
+ DisplayName: Barts LE [Radeon HD 6790]
+ Provider: Udev
+ Guid: e9b8eebd-b5f8-18d4-9fbd-d7da7711985c
+ Version: 013.012.000.019.000000
+ Internal: False
+ AllowOnline: False
+ AllowOffline: False
+Device: CHug-usb:00:01:04:04
+ DisplayName: ColorHugALS
+ Provider: ColorHug
+ Guid: 84f40464-9272-4ef7-9399-cd95f12da696
+ Version: 4.0.0
+ Internal: False
+ AllowOnline: True
+ AllowOffline: True
+
+--help
:
+
+$ fwupdmgr --help
+Usage:
+ fwupdmgr [OPTION…]
+
+ clear-results Clears the results from the last update
+ get-details Gets details about a firmware file
+ get-devices Get all devices that support firmware updates
+ get-results Gets the results from the last update
+ get-updates Gets the list of updates for connected hardware
+ install Install a firmware file on this hardware
+ update-offline Install the update the next time the computer is rebooted
+ update-online Install the update now
+ update-prepared Install prepared updates now
+
+Help Options:
+ -h, --help Show help options
+
+Application Options:
+ -v, --verbose Show extra debugging information
+ -f, --force Force the installation of firmware
+
+
+Using the D-Bus API
+
+
+$ $ gdbus call --system --dest org.freedesktop.fwupd --object-path / --method org.freedesktop.fwupd.GetDevices
+({'ro__sys_devices_pci0000_00_0000_00_1d_0_usb2_2_1_2_1_4_2_1_4_1_0':
+ {'Vendor': <'VIA'>,
+ 'Guid': <'26470009-97a8-4028-867a-bbbac6ee7bf0'>,
+ 'DisplayName': <'USB 3.0 VL812 B2 Hub'>,
+ 'Provider': <'Udev'>,
+ 'Version': <'9090'>,
+ 'Flags':
+
+Security
+User Interaction
+Linux Vendor
+
+
Firmware ServiceIntroduction
+cab
files.
+ This fire-and-forget service allows vendors to submit firmware updates
+ without generating and hosting metadata themselves.
+
+
+
+cab
file is moved to our infrastructure.Upload Firmware
+Legal
+
+
+
+
+Help With Submitting Firmware
+
+cab
file, with these files inside:
+
+
+cap
file your engineers have createdinf
file describing the .cap file.asc
file which is a detached GPG signature of the firmware file.metainfo.xml
file with a long description and extra metadatacab
file using makecab.exe
on Windows and gcab --create
+on Linux.
+cab
file with the hardware name and the version
+number, e.g. colorhug-als-1.2.3.cab
. It's mandatory that the files inside the
+cab
file have the same basename, for example this is would be valid:
+
+ colorhug2-1.2.3.cab
+ |- firmware.inf
+ |- firmware.bin
+ |- firmware.bin.asc
+ \- firmware.metainfo.xml
+
+
+An example inf
file looks like this:
+
+
+[Version] +Class=Firmware +ClassGuid={f2e7dd72-6468-4e36-b6f1-6488f42c1b52} +DriverVer=03/03/2015,3.0.2 + +[Firmware_CopyFiles] +firmware.bin + +[Firmware_AddReg] +HKR,,FirmwareId,,{84f40464-9272-4ef7-9399-cd95f12da696} +HKR,,FirmwareVersion,%REG_DWORD%,0x0000000 +HKR,,FirmwareFilename,,firmware.bin ++ +
+An example metainfo.xml
file looks like this:
+
+
+<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright 2015 Richard Hughes+ +--> +<component type="firmware"> + <id>84f40464-9272-4ef7-9399-cd95f12da696</id> + <name>ColorHugALS Firmware</name> + <summary>Firmware for the ColorHugALS Ambient Light Sensor</summary> + <description> + <p> + Updating the firmware on your ColorHugALS device improves performance and + adds new features. + </p> + </description> + <url type="homepage">http://www.hughski.com/</url> + <metadata_license>CC0-1.0</metadata_license> + <project_license>GPL-2.0+</project_license> + <developer_name>Hughski Limited</developer_name> + <releases> + <release version="3.0.2" timestamp="1424116753"> + <location>http://www.hughski.com/downloads/colorhug-als/firmware/colorhug-als-3.0.2.cab</location> + <description> + <p>This stable release fixes the following bugs:</p> + <ul> + <li>Fix the return code from GetHardwareVersion</li> + <li>Scale the output of TakeReadingRaw by the datasheet values</li> + </ul> + </description> + </release> + </releases> +</component> +
+If the firmware is not free software you have to indicate it in the
+metainfo.xml
file with <project_license>proprietary</project_license>
.
+
+The Linux Vendor Firmware Project signs the firmware image and repacks +the files into a new cabinet file for several reasons: +
+cat
file
+The best way to validate the metainfo file or firmware before submission is by using the
+appstream-util validate
tool available from the
+appstream-glib project.
+