Documentation for “Zerocat Coreboot Machines”
Generated on: Sat, 15 Jul 2023 07:22:28 +0200
Repository: git://zerocat.org/zerocat/projects/coreboot-machines
Version: v0.16.15-0-63bfb956
Branch: master

Zerocat Coreboot Machines

Create very satisfying free software devices.

Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022, 2023 Kai Mertens kmx@posteo.net

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Section #../doc/README.md

README

Project Goal

The goal of Zerocat Coreboot Machines is to help you turn ThinkPad laptops into very satisfying free software devices: Create free firmware images (but use blobs if required), modify your hardware, install a fully free/libre operating system, improve configurations and follow best practice recommendations.

Prerequisites

It is assumed that you are running a GNU/Linux-libre operating system. We recommend to run GNU Guix System – alternatively, install the GNU Guix package manager.

Get the Sources

Use Git to clone the project’s sources:

    $ git clone git://zerocat.org/zerocat/projects/coreboot-machines

Change into the project’s documentation folder:

    $ cd coreboot-machines/doc/

Study this README.md to get started:

    $ cat ../doc/README.md

Paths

All paths within the documentation are relative to the location of the documentation source files, which are located in this project’s doc/ folder.

Tags

Versions are tagged according to the following pattern:

    v<major>.<minor>.<revision>

A tag should be annotated with related change log entries.

The first tag should be: v0.0.0

To checkout a version tag, run:

    git checkout vx.x.x

However, this should be optional.
Using the tip of branch master should be just fine.

Project Environment

Use GNU Make to create a dedicated profile, and an up-to-date profile generation. This allows you to match your environment to the one used by Zerocat, thus yielding for bit-identical results:

    $ make -C ../guix pull

Checkout the profile generation, instantiate channels, create a pure shell that provides nothing but prerequisites:

    $ make -C ../guix environment

To confirm that your project environment is properly set up, run:

    [env]$ make -C ../guix usage

Invocations of make to generate the documentation, compile the sources, etc., should be done from this project environment, only.

To restore the initial environment, later on, when you are done with this project, type:

    [env]$ exit

To remove this project’s handy guix profile, type:

    $ make -C ../guix clean

This will remove symlinks only. If you want to remove the profile from your system, run the GNU Guix Garbage Collector.

To list all available targets, type:

    $ make -C ../guix help

Make Documentation from Project’s Environment

To build the documentation, type:

    [env]$ make -C ../doc

The terminal output should provide a shortcut to the index.html file of the generated HTML documentation. Open this file with your favorite browser.

To get a full list of available targets, type:

    [env]$ make -C ../doc help

To clean-up, type:

    [env]$ make -C ../doc clean

Make Documentation from System’s Shell

To build the documentation in one go, type:

    $ echo "make -C ../doc" | make -C ../guix environment
Section #../doc/CONTRIBUTING.md

Contributing

Documentation Files

Documentation source files are written in markdown syntax. They should carry their individual copyright and license notices right below the title giving headline, e.g.:

    <Title-of-Document>
    ===================

    Copyright (C) <Year>  <Name-of-Author> <Email-Address>  

    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.3
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
    Texts. A copy of the license is included in the section entitled
    "GNU Free Documentation License".

    <Other-Headline>
    ----------------

    ...content...

The generated documentation carries a license notice right at top on its title page, with copyright statements generated from git log output.

Sections of the generated documentation are build from selected markdown source files, with their individual copyright and license notice stripped.

In order to enrich the generated documentation ...

... and adapt ../doc/Makefile to produce nice output.

In case more tools are needed, don't forget to update ../guix/manifest0.scm.

Images

To make your image look nice within the documentation, select a landscape layout of 16:9 aspect ratio.

Use ImageMagick to prepare your image, e.g.:

If your image is big, reduce it to a maximal width of 2000 pixel:

    mogrify -resize 2000x <image>

Please clean image files from metadata, before committing, i.e.:

    mogrify -strip <image>

If you embed your image into a markdown documentation file, use this syntax:

   ![<path/to/image>][]

   [<path/to/image>]:     <path/to/image>     "title message"

or alternatly:

   ![<path/to/image>][my-image-shortcut]

   [my-image-shortcut]:   <path/to/image>     "title message"

These patterns will guarantee that <img> tags will have their src, alt and title attributes properly set within the html output.

Code Files

Please use this license header for code source files:

    Zerocat Coreboot Machines --- Create very satisfying free software devices.

    Copyright (C) <Year>  <Name-of-Author> <Email-Address>

    This file is part of Zerocat Coreboot Machines.

    Zerocat Coreboot Machines is free software: you can redistribute it
    and/or modify it under the terms of the GNU General Public
    License as published by the Free Software Foundation, either
    version 3 of the License, or (at your option) any later
    version.

    Zerocat Coreboot Machines is distributed in the hope that it will be
    useful, but WITHOUT ANY WARRANTY; without even the implied
    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Zerocat Coreboot Machines.
    If not, see <http://www.gnu.org/licenses/>.

Shell Scripts

If you intend to write shell scripts, use this skeleton to make them work for GNU Guix:

    #!/bin/sh

    # Re-exec if we are not using Bash or are using Bash in POSIX mode.
    if [ -z "$BASH" ] || [ "$BASH" = "/bin/sh" ]; then
      bash=`command -v bash`
      if [ -z "$bash" ]; then
        echo "Couldn't find Bash, sorry!"
        exit 1
      else
        exec "$bash" "$0" "$@"
      fi
    fi

    # We're using Bash now.
    set -o errexit
    set -o nounset
    set -o pipefail

    # Your code goes here ...

ChangeLog

Update ../doc/CHANGES.md and list your contributions.

You can use git shortlog to get a starting point for your edit.

Section #../doc/COPYING.md

Copying

Zerocat Coreboot Machines ships copyrighted work.

Zerocat Coreboot Machines is free software. It makes use of free software approved licenses only and should be freely distributable:

Files located in folder hardware/, if available, describe hardware of a free design, licensed under:

Authorship, copyright and license information may be provided in more detail on a per-folder and/or per-file basis. Check the sources.

Please report a bug if you find the distribution hindered.
See Zerocat Website for contact information.

Section #../doc/CHANGES.md

CHANGES

Change Log

Change Logs can be created with:

    git shortlog vx.x.x..HEAD | tac | sed -r -e '1d; s/^[ ]*/* /; $d;' -

Changes ...

Changes between v0.16.14 and v0.16.15

Changes between v0.16.13 and v0.16.14

Changes between v0.16.12 and v0.16.13

Changes between v0.16.11 and v0.16.12

Changes between v0.16.10 and v0.16.11

Changes between v0.16.9 and v0.16.10

Changes between v0.16.8 and v0.16.9

Changes between v0.16.7 and v0.16.8

Changes between v0.16.6 and v0.16.7

Changes between v0.16.5 and v0.16.6

Changes between v0.16.4 and v0.16.5

Changes between v0.16.3 and v0.16.4

Changes between v0.16.2 and v0.16.3

This version comes with an upgraded documentation system, according to: Zerocat Project Template v0.0.12

Changes between v0.16.1 and v0.16.2

Changes between v0.16.0 and v0.16.1

Changes between v0.15.0 and v0.16.0

Changes between v0.14.0 and v0.15.0

Section #../doc/mainpage.md

Mainpage

Turn a small, but interesting set of ThinkPad laptops into very satisfying free software devices! Create new firmware, modify your hardware, install a fully free/libre operating system, and use it according to best practice recommendations.

Worked Example: Zerocat X230-Tablet

X230 Tablet with Zerocat Boot Menu

X230 Tablet with Zerocat Boot Menu

Supported Machines

¹ The set of frequently tested laptops is much smaller!
² TFT 1440×900px is supported by coreboot@4.8.1 only.
³ Avoid freezes with linux kernel option intel_idle.max_cstate=2.
° Do not touch the IME firmware.

Feature Chart of Zerocat’s Firmware

Tools and their Versions

In general, these project versions are used as default:

Some fallback versions are still supported:

Operating Systems

This project puts extra focus on fully free/libre operating systems:

  1. GNU Guix System

    This system can be run from fully encrypted partitions.

    Files like ../templates/zerocat-system-x86_64-encrypted.scm might help you to configure your GNU Guix System right after installation.

    Utility script ../util/grub-mkconfig-coreboot-guix.sh should help you to set up an optimized grub configuration file for GNU Guix System. This file works well with Zerocat’s boot menu.

  2. Trisquel GNU/Linux-libre

    The default installer will set up an unencrypted root partition.

    Trisquel is required by this project and its toolchain, as the GNU Ada-Compiler is needed to build the coreboot firmware.

  3. Parabola GNU/Linux-libre

    This system can be run from fully encrypted partitions.

    Project Zerocat Parabola Setup helps you to install this system.

  4. Hyperbola GNU/Linux-libre

    This system can be run from fully encrypted partitions.

    Project Zerocat Hyperbola Setup helps you to install this system.

See #../doc/supported-distros.md for more test results.

Get Started

To get started, see the following sections:

  1. #../doc/README.md
  2. #../doc/mainpage.md
  3. #../doc/battery-blacklist-removal.md
  4. #../doc/toolchain.md
  5. #../doc/operating-system.md
  6. #../doc/supported-distros.md
  7. #../doc/best-practice.md

Accessories

Once you have liberated your laptop, protect it!
Project Zerocat Sleeve helps you to make a nice sleeve for it.

Disclaimer

These sources are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Proceed with care, good luck!
Please report bugs.

Section #../doc/battery-blacklist-removal.md

Battery Blacklist Removal

On ThinkPads, the Embedded Controller (EC) is responsible to control LEDs, batteries, and more. Unfortunately, Lenovo maintains a battery blacklist on xx30 machines, preventing 3rd-party batteries to be charged. This blacklist is part of the Embedded Controller Program (ECP).

The ECP is located in the controller’s integrated flash memory, rather than in SPI flash chips on board. To update the program, no free software tool is available. Instead, a bootable CD-ROM or an MS-Windows utility has to be used. These proprietary tools are provided by the laptop’s manufacturer, Lenovo.

As free software enthusiasts do not want to run Windows, the Windows utility is of no use. However, the extracted El Torito image of the Bootable CD-ROM Update ISO File is of great interest. It can be modified to run the MS-DOS flashing utility that is shipped with the same image, bypassing Lenovo’s weak downgrade or roll-back restrictions.

Since most recent firmware has been signed by Lenovo, a roll-back to unsigned versions is mandatory.

Two free software projects, located on github, are to take into consideration:

  1. Project hamishcoleman/thinkpad-ec, which is used to remove the battery blacklist.
  2. Project gch1p/thinkpad-bios-software-flashing-guide, which helps to upgrade or downgrade the current BIOS and ECP to the versions used by the former project.

This document is supposed to be a summary, providing URLs, alternate checksums, worked examples and screenshots.

Once the ECP is replaced and the blacklist is removed, go ahead to further liberate your ThinkPad and flash a Zerocat ROM to onboard SPI flash chips!

Acronyms Explained

    BIOS – Basic Input Output System
    DOS  – Disk Operating System
    EC   – Embedded Controller
    ECP  – Embedded Conbtroller Program
    GNU  – Free Operating System, recursive acronym: “GNU is not Unix”
    ISO  – International Organization for Standardization
    LED  – Light Emitting Diode
    MS   – Microsoft
    ROM  – Read Only Memory
    SPI  – Small Peripheral Interface
    UEFI – Unified Extensible Firmware Interface
    USB  – Universal Serial Bus

Resource Projects

ThinkPad EC

URL: https://github.com/hamishcoleman/thinkpad-ec.git

Table, cited:

    | laptop        | last modifiable                               | first protected version                       |
    | ------        | ---------------                               | -----------------------                       |
    | t430          | BIOS 2.81 (G1ETC1WW) EC 1.13 (G1HT35WW)       | BIOS 2.82 (G1ETC2WW) EC 1.14 (G1HT36WW)       |
    | t430s         | BIOS 2.75 (G7ETB5WW) EC 1.16 (G7HT39WW)       | BIOS 2.76 (G7ETB6WW) EC 1.16 (G7HT40WW)       |
    | t530, t530i   | BIOS 2.76 (G4ETB6WW) EC 1.13 (G4HT39WW)       | BIOS 2.77 (G4ETB7WW) EC 1.14 (G4HT40WW)       |
    | w530          | BIOS 2.75 (G5ETB5WW) EC 1.13 (G4HT39WW)       | BIOS 2.76 (G5ETB6WW) EC 1.14 (G4HT40WW)       |
    | x230          | BIOS 2.75 (G2ETB5WW) EC 1.14 (G2HT35WW)       | BIOS 2.77 (G2ETB7WW) EC 1.15 (G2HT36WW)       |
    | x230t         | BIOS 2.73 (GCETB3WW) EC 1.14 (GCHT25WW)       | BIOS 2.75 (GCETB5WW) EC 1.15 (GCHT26WW)       |

Basically, these invocations of GNU Make are required to create USB media suitable for battery blacklist removal (replace ‘t530’ with your xx30 type of laptop):

    $ make really_clean
    $ make list_laptops
    $ make patch_disable_keyboard
    $ make patch_enable_battery
    $ make patched.t530.img
    $ # write image to USB media, carefully replace `/dev/sdX` with correct device name:
    $ sudo dd if=./patched.t530.img of=/dev/sdX bs=1M status=progress conv=fsync

ThinkPad BIOS Software Flashing Guide

URL: https://github.com/gch1p/thinkpad-bios-software-flashing-guide.git

To create bootable USB media suitable for firmware upgrade and downgrade, extract image from Bootable CD-ROM Update ISO File, mount the image, modify AUTOEXEC.BAT, unmount, write image to USB media:

    $ geteltorito -o ./dosflash.img <Bootable CD-ROM ISO File>
    $ sudo mount -t vfat ./dosflash.img /mnt -o loop,offset=16384
    $ # replace `command.com` with `dosflash.exe ...` as listed below, then save file and exit `nano`:
    $ sudo nano -E /mnt/AUTOEXEC.BAT
    $ sudo umount /mnt
    $ # write image to USB media, carefully replace `/dev/sdX` with correct device name:
    $ sudo dd if=./dosflash.img of=/dev/sdX bs=1M status=progress conv=fsync

Latest Lenovo Bootable CD-ROM Images, Modifiable

Example: Battery Blacklist Removal on T530

  1. Downgrading from BIOS 2.77 ECP 1.14 to BIOS 2.76 ECP 1.13:

    Enter ThinkPad Setup and adjust configurations ...

    • Main: Check firmware versions.
    • Date/Time: Adjust time settings.
    • Security: Allow UEFI BIOS to be updated.
    • Startup: Set startup mode to: Both, Legacy First

    Boot dosflash.img from USB media. The BIOS flash process starts straight away and gives you very little time to react or cancel ...

    ../images/IMG_2817.JPG

    The BIOS is flashed straight away, no menu.

    The machine boots again, but is not flashing a staged EC program as expected.

    Reboot and press F1 to enter setup, then verify that BIOS 2.76 ECP 1.13 is in effect. It is not, BIOS is 2.76, but ECP still is 1.14.

    Again, reboot from USB media.
    This time, the system program update utility menu appears on screen.

    ../images/IMG_2825.JPG

    Menu of Lenovo’s System Update Utility

    Select “2. Update system program”.
    It will not proceed, but gives you a message:

    ../images/IMG_2827.JPG

    Hmm, no chance to downgrade EC program.

    The thinkpad-ec project uses an older BIOS version anyway:

        make patched.t530.img
        Downloading t530 and t530i BIOS 2.74 (G4ETB4WW) EC 1.13 (G4HT39WW)
        [...]
    

    Let’s try a next downgrade, once more.

  2. Downgrading from BIOS 2.76 with unchanged ECP 1.14 to BIOS 2.74 ECP 1.13:

    Boot dosflash.img from USB media. Hmm, the BIOS is not downgraded automatically, as before, instead the utility menu shows up. Now selecting “2. Update system program”. The procedure works fine, screenshots available:

    ../images/IMG<em>2847.JPG

    1. Flashing BIOS and staging EC program

    ../images/IMG</em>2848.JPG

    2. Automatic reboot and flashing of staged EC program

    Enter ThinkPad Setup, finally, and check for versions: Done!

  3. Battery Blacklist Removal

    Now trying project thinkpad-ec for T530:

        $ make really_clean
        $ make patch_disable_keyboard
        $ make patch_enable_battery
        $ make patched.t530.img
        ...
        Your build has completed with the following details:
        ...
        Built ISO: b8d0a5623676869d37a37762501dba45fbd1af16  patched.t530.iso
        Based on code from: t530 and t530i BIOS 2.74 (G4ETB4WW) EC 1.13 (G4HT39WW)
        Buildinfo: v1-431-g75383a (20230326) patched.t530.img
        Built FL2: 357aaeb4ef6ffe472dee44e72b389fda161375dc  t530.G4HT39WW.s01D5100.FL2
        ...
        Patches applied:
        t530.G4HT39WW.img.d/006_battery_validate.patch
    
    1. Bootable USB media created with patched.t530.img.
    2. Startup mode set to: Both, Legacy First
    3. Power supply and charged Lenovo battery applied.

    Boot machine from USB media...

    ../images/IMG<em>2856.JPG

    Report

    ../images/IMG</em>2859.JPG

    Start

    ../images/IMG<em>2860.JPG

    1. Flashing BIOS and staging EC program

    ../images/IMG</em>2862.JPG

    2. Automatic reboot and flashing of staged EC program

    ../images/IMG_2863.JPG

    3. Final reboot, done.

    EC firmware flash procedure accomplished, the battery blacklist has been removed.

Example: Battery Blacklist Removal on X230 Tablet

  1. Downgrading from BIOS 2.75 ECP 1.15 to BIOS 2.73 ECP 1.14:

    Apply AC Adapter and insert a charged battery, type Lenovo or 3rd-party.

    Enter ThinkPad Setup and adjust the configuration:

    • Main: Check firmware versions.

    • Date/Time: Adjust date and time settings.

    • Security: Adjust ‘UEFI BIOS Update Option’ ...

      a) ‘Flash BIOS Updating by End-Users’ – Enabled
      b) ‘Secure Rollback Prevention’ – Disabled

    • Startup: Adjust UEFI/Legacy boot settings ...

      a) ‘UEFI/Legacy Boot’ – Both
      b) ‘UEFI/Legacy Boot Priority – Legacy First’

    ../images/IMG_2864.JPG

    ThinkPad Setup: Check firmware versions, adjust configuraton

    Boot dosflash.img on USB media ...

    ../images/IMG<em>2866.JPG

    During boot: Press F12 for boot menu, select USB media

    ../images/IMG</em>2867.JPG

    3rd-party battery detected, battery blacklist in action

    ../images/IMG<em>2868.JPG

    Firmware Update Utility, “Main Menu”

    ../images/IMG</em>2869.JPG

    Select “2. Update system program”

    ../images/IMG<em>2870.JPG

    Downgrade detected, to be confirmed

    ../images/IMG</em>2871.JPG

    Advice: Check AC adapter

    ../images/IMG<em>2872.JPG

    Advice: Check battery to be fully charged

    ../images/IMG</em>2873.JPG

    Warning: Do not remove power

    ../images/IMG<em>2874.JPG

    Info: Update process starting ...

    ../images/IMG</em>2876.JPG

    Warning: Process description

    ../images/IMG<em>2881.JPG

    Updating BIOS and staging EC program ...

    ../images/IMG</em>2882.JPG

    Automatic reboot, flashing EC program ...

    ../images/IMG_2883.JPG

    Final reboot, full downgrade accomplished!

  2. Battery Blacklist Removal

    Again, enter ThinkPad Setup and check firmware versions and settings.

    ../images/IMG_2884.JPG

    Entering Setup for firmware verification

    Now trying project thinkpad-ec for X230 Tablet:

        $ make really_clean
        $ make patch_disable_keyboard
        $ make patch_enable_battery
        $ make patched.x230t.img
        ...
        Your build has completed with the following details:
        ...
        Built ISO: 559fa92a680d8ad71a083316189db4ad9705964d  patched.x230t.iso
        Based on code from: x230t BIOS 2.73 (GCETB3WW) EC 1.14 (GCHT25WW)
        Buildinfo: v1-431-g75383a (20230323) patched.x230t.img
        Built FL2: b83140aaad161ff78fda83bf651b537375e2484e  x230t.GCHT25WW.s01DA000.FL2
        ...
        Patches applied:
        x230t.GCHT25WW.img.d/006_battery_validate.patch
    

    Boot patched.x230t.img on USB media ...

    ../images/IMG<em>2886.JPG

    Enter boot menu, select USB media

    ../images/IMG</em>2887.JPG

    3rd-party battery detected, battery blacklist in action

    ../images/IMG<em>2888.JPG

    Patched firmware update provides a nice summary

    ../images/IMG</em>2891.JPG

    Patched firmware update in progress, staging EC program ...

    ../images/IMG<em>2892.JPG

    Staging accomplished, reboot ahead ...

    ../images/IMG</em>2893.JPG

    Automatic reboot, flashing of staged EC program ...

    ../images/IMG_2894.JPG

    Replacement of EC program accomplished, battery blacklist removed

Section #../doc/toolchain.md

Toolchain

This project comes with a Set of Bash Scripts for the Trisquel GNU/Linux-libre Operating System, i.e. “Trisquel 10.0.1 (trisquel_10.0.1_amd64.iso)”. Experimental support for GNU Guix has been added, but this is Work in Progress. The set should help you to easily generate your custom Zerocat ROM for a small but interesting set of ThinkPad laptops, see #../doc/mainpage.md.

The toolchain is formed by scripts:

  1. ../src/setup-toolbox.sh
  2. ../src/gen-payload-seabios.sh
  3. ../src/gen-payload-grub.sh
  4. ../src/gen-rom-zerocat.sh

Please also make use of ../util/get-sysinfo.sh, which is an optional script. It retrieves useful system information and should be run twice on your target machine: Before and after your successful flash procedure.

Note that all scripts might be invoked with option --help to display usage information.

The intended order of script invocation is like:

  1. Change into folder src/:

        $ cd src/
    
  2. Invoke:

        $ bash setup-toolbox.sh --check
    

    This will check whether required programs and packages are available on your system. If any error is reported, please install the appropriate package and run the check again.

  3. Switch your internet connection on.

  4. Invoke:

        $ bash setup-toolbox.sh\
            --toolbox\
            --add-project coreboot seabios grub
    

    This will create a new, unique, empty toolbox folder and will populate it with sources of required external projects as like coreboot, seabios and grub. The script also runs apropriate git checkout commands in conjunction with ./configure or make, where applicable. More projects like libreboot, bios_extract, fcode-utils, UEFITool and flashrom might be specified as well, but they are not yet used by the scripts.

    Regarding grub, a review of its configuration will be displayed and your key input is required to continue.

    In case of script failure due to network issues, convenient resume options are lacking by the moment. In such a case, please specify the toolbox folder in use along with the broken project and try again. Make sure you will end up with your toolbox folder correctly populated.

    Per default, the following project versions are used:

    Set 1:

    • coreboot@4.14
    • grub@grub-2.06
    • seabios@rel-1.14.0

    You might override default versions by appending a different version string, i.e. coreboot@4.8.1 (not valid for x201) or grub@2.02.

    Set 2:

    • libreboot@r20160907
    • bios_extract@effb120
    • fcode_utils@v1.0.2
    • uefitool@0.26.0
    • flashrom@v1.2
  5. Internet connection is not required any more.

  6. Invoke:

        $ bash gen-payload-seabios.sh --usage
    

    This will list detailed usage information. In order to build the SeaBIOS payload for platform i386-coreboot, please pick your use case, e.g.:

    • In case you are heading to flash machines that do not require an external VGA Option ROM, invoke:

      $ bash gen-payload-seabios.sh\
          --toolbox <path/to/toolbox-folder>\
          --gen-payload
      
    • In case you are heading to flash machines that do require an external VGA Option ROM, invoke:

      $ bash gen-payload-seabios.sh\
          --toolbox <path/to/toolbox-folder>\
          --gen-payload\
          --config-no-vgarom
      

      That external ROM must be passed to ../src/gen-rom-zerocat.sh later on.

  7. Invoke:

        $ bash gen-payload-grub.sh --usage
    

    This will list detailed usage information. Please pick your use case, e.g.:

    • In order to generate the GRUB executable payload file for platform i386-coreboot, you might invoke:

      $ bash gen-payload-grub.sh\
          --clean\
          --toolbox <path/to/toolbox-folder>\
          --payload-dir <path/to/grub-payload-folder>\
          --gen-keymaps\
          --gen-payload
      

      This will pack the GRUB executable payload file for platform i386-coreboot, small version. The output’s name is hardcoded to grub@${version_grub}_i386-coreboot.elf.

    • In order to generate generic GRUB configuration files, you might – as a next step – invoke:

      $ bash gen-payload-grub.sh\
          --mostlyclean\
          --toolbox <path/to/toolbox-folder>\
          --payload-dir <path/to/grub-payload-folder>\
          --gen-config\
          --config-seabios\
          --strip-comments
      
    • In case you are heading for T60 machines, use additional options which remove incompatible menu entries from the GRUB boot menu:

      $ bash gen-payload-grub.sh\
          --mostlyclean\
          --toolbox <path/to/toolbox-folder>\
          --payload-dir <path/to/grub-payload-folder>\
          --gen-config\
          --config-seabios\
          --config-no-poweroff\
          --strip-comments
      
    • And finally, you might specify a dedicated Zerocat Background, if you like to:

      $ bash gen-payload-grub.sh\
          --payload-dir <path/to/grub-payload-folder>\
          --config-background <path/to/PNG-Image>
      

      This option might be used three times more in case you want to provide images of the flash procedure, for instance.

    In case you want to set up GRUB authorization, use option --config-authorization <user> <password> <scheme>.
    See --help output for details.

    In case you are using grub@2.02, feel free to set option --config-morse on an x60, t60, x200 and t400 target.

  8. Invoke:

        $ bash gen-rom-zerocat.sh --usage
    

    This will list detailed usage information of the last script to use. Please pick your target, e.g.:

    • In order to build your ROM for a ZC-X200, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target x200 --chipsize 8mb\
          --ifd-lock-regions --ifd-medisable\
          --ime none --gbe set_<macaddr-without-colons>\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME deleted. The MAC Address of the onboard Ethernet Controller will be set to a custom value. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The x200 is known to run fine without CPU microcode updates, hence no option --microcode.

    • In order to build your ROM for a ZC-X201, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target x201\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions\
          --ime keep --gbe keep\
          --microcode\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME untouched. The GbE Firmware is in use as extracted from the vendor ROM. If you try to modify the IME or the AltMeDisable bit, the fan is not controlled and your machine is likely to get overheated. Reboots fromout the GRUB Bootmenu will get stuck.

    • In order to build your ROM for a ZC-X230, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target x230\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions --ifd-altmedisable\
          --ime xtrunc --gbe set_<macaddr-without-colons>\
          --microcode\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME cleaned and extremely shrunk, and region BIOS increased. The MAC Address of the onboard Ethernet Controller will be set to a custom value. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The X230 seems to freeze in case CPU microcode updates are not provided, hence option --microcode. However, omit this option in case you want your machine to boot up in a blobfree manner. You might try to load updates later on with your operating system.

    • In order to build your ROM for a ZC-T430, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target t430\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions --ifd-altmedisable\
          --ime xtrunc --gbe set_<macaddr-without-colons>\
          --microcode\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME cleaned and extremely shrunk, and region BIOS increased. The MAC Address of the onboard Ethernet Controller will be set to a custom value. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The T430 seems to freeze in case CPU microcode updates are not provided, hence option --microcode. However, omit this option in case you want your machine to boot up in a blobfree manner. You might try to load updates later on with your operating system.

    • In order to build your ROM for a ZC-X1CarbonGen1, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target x1_carbon_gen1\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions --ifd-altmedisable\
          --ime xtrunc\
          --microcode\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME cleaned and exremely shrunk, and region BIOS increased. The X1 seems to freeze in case CPU microcode updates are not provided, hence option --microcode. However, omit this option in case you want your machine to boot up in a blobfree manner. You might try to load updates later on with your operating system.

    • In order to build your ROM for a ZC-X220, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target x220\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions --ifd-altmedisable\
          --ime xtrunc --gbe set_<macaddr-without-colons>\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME cleaned and shrunk, and region BIOS increased. The MAC Address of the onboard Ethernet Controller will be set to a custom value. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The x220 seems to run fine without CPU microcode updates, hence no option --microcode.

    • In order to build your ROM for a ZC-T420, you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target t420\
          --rom-factory <path/to/factory.bin>\
          --ifd-lock-regions --ifd-altmedisable\
          --ime trunc --gbe set_<macaddr-without-colons>\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      This will set up Zerocat’s ROM with region ME cleaned and shrunk, and region BIOS increased. The MAC Address of the onboard Ethernet Controller will be set to a custom value. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The t420 seems to run fine without CPU microcode updates, hence no option --microcode.

    • In order to build your ROM for a ZC-T60 with ATI Graphics (Mobility Radeon X1300), you might invoke:

      $ bash gen-rom-zerocat.sh\
          --toolbox <path/to/toolbox-folder>\
          --target t60_ati_mobility_radeon_x1300\
          --rom-vga <path/to/pci1002,7149.rom>\
          --payload-grub-dir <path/to/grub-payload-folder>
      

      Note file pci1002,7149.rom is an external, proprietary VGA Option ROM that you should have extracted from memory, before. See ../doc/t60-vgarom-extraction.md for details. The t60 seems to run fine without CPU microcode updates, hence no option --microcode.

    Upon script start, previously configured GRUB settings will be detected automatically, and secondary payloads will be compiled as required. Please take your time to review the reported settings.

    Occasionally, the script will require some user interaction. You should be safe to enter “yes” if asked to do so.

    If the script succeeds, a new folder has been created. It contains a fully configured zerocat.rom along with more files, checksums, backups and subfolders. The ROM can now be flashed to your target machine’s SPI chip. In case your target has a virtual SPI Chip formed by two physical ones, the ROM has been split into zerocat.rom.bottom for chip #1 and zerocat.rom.top for chip #2.

    Note, for targets other than x200, t400, t500, option --ifd-altmedisable is not available with coreboot@4.8.1.

Done, now head for flashing!
Good luck!

Section #../doc/operating-system.md

Operating System

GNU Guix System

Now that your device runs a free firmware, go ahead and install GNU Guix System along with these documents:

Section #../doc/supported-distros.md

Supported Distros

USB Media

Zerocat’s Boot Menu offers three different paths to boot USB live/installation media:

  1. Coreboot-GRUB2 -> USB -> Distro’s Grub2 Configuration File
  2. Coreboot-GRUB2 -> USB -> Distro’s Isolinux Configuration File
  3. Coreboot-GRUB2 -> SeaBIOS Payload -> USB -> Distro’s suggested boot path

See this table of tested USB installation media:

Distro                                      Applicable Boot Path
------                                      --------------------
GNU Guix System v1.2.0²                     1 (grub.cfg), 3 (via SeaBIOS)
Parabola Live Media – LXDE-OpenRC²          2 (isolinux.cfg), 3 (via SeaBIOS)
Hyperbola Live Media – Milky Way v0.4²      2 (isolinux.cfg)
Trisquel10²                                 2 (isolinux.cfg), 3 (via SeaBIOS)
Debian9¹                                    1 (grub.cfg), 3 (via SeaBIOS)
OpenSUSE¹                                   2 (isolinux.cfg), 3 (via SeaBIOS)
Qubes R4.0.3²                               3 (via SeaBIOS)

¹ preliminary information, to be tested more thoroughly
² confirmed information

Harddisk/SSD

Zerocat’s Boot Menu offers different paths to boot from internal disk (AHCI):

  1. Coreboot-GRUB2 -> AHCI -> Distro’s Grub2 Configuration File
  2. Coreboot-GRUB2 -> AHCI -> Distro’s Isolinux Configuration File
  3. Coreboot-GRUB2 -> AHCI -> Distro’s Kernel Linux
  4. Coreboot-GRUB2 -> SeaBIOS Payload -> Distro’s suggested boot path

See this table of tested installations:

Distro                        Applicable Boot Path
------                        --------------------
GNU Guix System²              1 (grub.cfg, coreboot_grub.cfg°), 4 (via SeaBIOS)
Hyperbola v0.4²               1 (grub.cfg), 3 (Kernel)
Parabola²                     1 (grub.cfg), 3 (Kernel)
Trisquel10¹                   1 (grub.cfg), 3 (Kernel), 4 (via SeaBIOS)
Debian9¹                      1 (grub.cfg), 4 (via SeaBIOS)
OpenSUSE²                     not yet supported
Qubes R4.0.3²                 4 (via SeaBIOS)

See this table of tested installations, using full disk encryption. Encrypted devices are to be unlocked via dedicated menu entry, first:

Distro                        Applicable Boot Path
------                        --------------------
GNU Guix System²              1 (grub.cfg, coreboot_grub.cfg°)
Hyperbola v0.4²               1 (grub.cfg), 3 (Kernel)
Parabola²                     1 (grub.cfg), 3 (Kernel)
Trisquel10²                   not applicable (boot partition is not encrypted)
Debian9²                      not yet tested
OpenSUSE²                     not yet supported
Qubes R4.0.3²                 not applicable (boot partition is not encrypted)

¹ preliminary information, to be tested more thoroughly
² confirmed information
° see ../util/grub-mkconfig-coreboot-guix.sh to create this file

Accessories

Files ../templates/zerocat-system-*.scm might help you to refine your GNU Guix System to match Zerocat products.

File ../util/grub-mkconfig-coreboot-guix.sh is provided to get your GNU Guix System booted with messages refined.

Section #../doc/best-practice.md

Best Practice

How to use your free software device, safely?

Integrated Disks

The firmware of integrated SSDs/Disks might request access to your memory according to SATA specification, so better don’t use them being plugged to the SATA port, directly. Instead, use them via standard SATA-to-USB2 adapter, which is not capable of granting direct access to your memory (DMA). Of course, this will slow down your system.

Integrated Wifi

Replace wifi cards that run with proprietary firmware. Or even better, replace cards that run with firmware at all. Use one that has no firmware, but is driven by the kernel driver only.

Section #../doc/x220-x230-microphone-hack.md

X220/X230 Microphone Hack

LED-Board with Microphones

Note the X220 and X230 LED-Board not only holds the system status LEDs, but as well two digital microphones. The LED-Board is connected to the motherboard via cable, which uses a 16-pin connector on the LED-Board versus a 30-pin connector at the system board.

LED-Board Connector, 16-Pin

On the X220, the pinout of the 16-Pin LED-Board Connector is estimated as like:

            +------------------------------------------------------+
            | +-----------------+-----------------------------+    |
            | |                 |                             |    |
            | |                 |                             |    |
············|·|·················|······                       |    |
  o o o o o o o o o o o o o o o o     : Short Edge            |    |
··|·|·|·|·|·····|·|·|·|·|·|·|·|········                       |    |
  | | | | |     | | | | | | | |                               |    |
  | | | | |     | | | | | | | +---------> Not Connected       |    |
  | | v v v     | | | | | | |                                 |    |
  | | MICBUS    | | | | | | |                                 |    |
  | |           | | | | | +-|----------->[LED Standby   ]<----+    |
  v v           | | | | +---|----------->[LED Batt1     ]<----+    |
  MIC           | | | +-----|----------->[LED Batt2     ]<----+    |
  PWR           +-|-|-------|----------->[LED WiFi      ]<----+    |
                  | +-------|----------->[LED HDD       ]<---------+
                  +---------|----------->[LED Bluetooth ]----+
                            |                                |
                            +--------------------------------+--- GND

How to Disable the Microphones

X220: TFT Connector, five contacts covered.

X220: TFT Connector, five contacts covered.

In case you want to disable the microphones on the X220, just follow the routes of the first five wires towards the TFT’s right hand sysboard connector and cover its first five contacts with a small adhesive strip. This seems to apply to the X230 as well.

Section #../doc/flashrom.md

Flashrom User Space Utility

This documentation is “Work In Progress”!

Sources

See webpage: https://www.flashrom.org/

Clone git repository, change into flashrom folder, checkout tag “v1.0” and type:

make

Multiple Chip Definitions

Note if flashrom stops due to multiple matching chip definitions in case of a Macronix chip, add ...

... and try again.

Coreboot Readout Examples

X60 Readout

$ sudo ./flashrom -p internal -r coreboot.bin

X200 Readout

$ sudo ./flashrom -p internal -c "MX25L6405D" -r coreboot.bin

X230 Readout

Note this is dangerous and might brick your Laptop!

$ sudo ./flashrom -p internal:laptop=force_I_want_a_brick --layout layout.txt --image bios -r coreboot.bin

flashrom v1.0 on Linux 4.4.0-131-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
coreboot table found at 0xbff79000.
========================================================================
WARNING! You seem to be running flashrom on an unsupported laptop.
Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing.
See the manpage and https://flashrom.org/Laptops for details.

If flash is shared with the EC, erase is guaranteed to brick your laptop
and write may brick your laptop.
Read and probe may irritate your EC and cause fan failure, backlight
failure and sudden poweroff.
You have been warned.
========================================================================
Proceeding anyway because user forced us to.
Found chipset "Intel QM77".
Enabling flash write... Warning: SPI Configuration Lockdown activated.
Enabling hardware sequencing due to multiple flash chips detected.
OK.
Found Programmer flash chip "Opaque flash chip" (12288 kB, Programmer-specific) mapped at physical address 0x0000000000000000.
Reading flash... done.

A “typical” SPI chip layout.txt file, created from an original lenovo firmware dump with coreboot’s ifdtool, looks like this:

$ ./ifdtool lenovo.bin -f layout.txt
$ cat layout.txt
00000000:00000fff fd
00500000:00bfffff bios
00003000:004fffff me
00001000:00002fff gbe

Write Examples

X200 Write

$ sudo ./flashrom -p internal -w coreboot.rom

X230 Write

This is dangerous and might brick your Laptop!

In order keep the EC idle (hopefully), speakers have been muted and radio has been switched off by kill-switch. All user applications (Browser, File Viewer, etc.) have been shut down except one terminal window. Host System: Trisquel8

To get a typical SPI Chip layout file, see section “X230 Readout”, above.

$ sudo ./flashrom -p internal:laptop=force_I_want_a_brick --layout x230-layout.txt --image bios -w x230-coreboot.rom

flashrom v1.0 on Linux 4.4.0-131-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using region: "bios".
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
coreboot table found at 0xbff79000.
========================================================================
WARNING! You seem to be running flashrom on an unsupported laptop.
Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing.
See the manpage and https://flashrom.org/Laptops for details.

If flash is shared with the EC, erase is guaranteed to brick your laptop
and write may brick your laptop.
Read and probe may irritate your EC and cause fan failure, backlight
failure and sudden poweroff.
You have been warned.
========================================================================
Proceeding anyway because user forced us to.
Found chipset "Intel QM77".
Enabling flash write... Warning: SPI Configuration Lockdown activated.
Enabling hardware sequencing due to multiple flash chips detected.
OK.
Found Programmer flash chip "Opaque flash chip" (12288 kB, Programmer-specific) mapped at physical address 0x0000000000000000.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
Section #../doc/gbe-phy-configuration-i82579lmv.md

GbE PHY Configuration i82579LM/V

82579LM/V GbE PHY Configuration for Intel 6 Series Express Chipset.

Specifications

File: ../templates/i82579lmv-gbe-6series.spec

To be used with coreboot’s bincfg utility.

Do not change names for macaddress, l1_gbedis and checksum_gbe, these words are updated by the toolchain.

Settings

File: ../templates/i82579lmv-gbe-6series.set

To be used with coreboot’s bincfg utility.
Seems to be applicable for Intel 7 Series Express Chipset as well.

Refer to ../templates/i82579lmv-gbe-6series.spec for applicable namespace.

Section #../doc/get-started-encrypted.md

Zerocat Machine with GNU Guix System (encrypted) – Get Started

Introduction

Your Zerocat Machine is a liberated ThinkPad Laptop, which starts with free, trustworthy software right at power-up.

The motherboard’s firmware has been deleted and – as far as achievable – replaced by free licensed firmware. This liberating procedure is explained in more detail within the project documentation of Zerocat Coreboot Machines: http://www.zerocat.org/coreboot-machines.html

The firmware replacement itself has been processed by means of Zerocat’s Chipflasher, an electronic device that respects and maintains essential freedoms of computer users: http://www.zerocat.org/chipflasher.html

The same applies to the selected operating system, GNU Guix System, which invents new, technical milestones for the GNU System, as founded by Richard M. Stallman.

Passwords

Within Chip

The GRUB2 console or some entries of the boot menu might be protected by a password. Use the following credentials if being asked for:

This GRUB2 username and its password can be changed by flashing a newly configured ROM image to the motherboard’s BIOS chip. It is not easily changed by software.

Partitions on Internal SSD

All partitions on your internal SSD are encrypted via LUKS and need to be unlocked during boot.

Depending on the type of your disk’s partition table, these are the names of your partitions:

Accounts of the GNU System

Your GNU Guix System might be shipped with three user accounts preconfigured, *root account*, *admin account*, and *normal user account*. If a *normal user account* is not yet configured, check the current system configuration file `/run/current-system/configuration.scm` for an out-commented template entry. 39222e0c9866f04e784e2a69b08ee5e8

The password can be changed by means of passwd. See info passwd for usage information.

  • admin account (administrative user, priviledged, standard administrative purposes)

    The password can be changed by means of passwd. See info passwd for usage information.

  • normal user account (normal user, no priviledges, every-day use, internet use)

    The password can be changed by means of passwd. See info passwd for usage information.

  • At the graphical login prompt, you might select the admin or the user account, but not the root account. To login as root, a virtual linux console or a user’s terminal is required.

    Boot your Machine

    Radio Devices

    You might want to disable radio devices by using the laptop’s kill switch, if any. It is often located at one of the device’s edges.

    Enter Passwords

    The entry of passwords will not be displayed on screen, thus no characters are to be seen. Enter your password blindly and finalize the entry with the “Enter” key. In case of a typo, you can still use the backspace key for correction, but you won’t see a cursor on screen.

    Power On

    Switch your device on and wait for the boot menu to appear. b61241fd2cc8407a9d7c7fce480d8c66

    In case of a typo, reach the end of the dialogue, turn back to the boot menu, and try again.

  • Type hotkey “g” to search on disk for the GRUB2 configuration file, provided by GNU Guix System. The GNU Guix boot menu will appear. Select the first, default entry.

    The initial RAM-disk starts up, asking itself for passwords again.

    (If the boot process gets stuck with message “loading kernel modules...”, try pressing the Backspace Key to trigger the process.)

    1. Unlock the root partition aka /dev/sda1.
    2. Unlock the home partition aka /dev/sda5 or /dev/sda3.
    3. Wait and watch the boot process until appearance of the graphical login prompt.
    4. Enter your selected username, i.e. user0 or user1.
    5. Enter user’s password.
    6. Your Xfce4 Session should start up.
  • Take Ownership

    Please change passwords as soon as you are familiar with your system, and before starting to use radio devices.

    Screensaver

    There should be a simple screensaver available, providing a black screen when active. To unlock, enter your user’s password directly, without any additional key hit.

    Suspend Mode

    Point and click onto the user menu, top right of your desktop, and select “Suspend” in order to enter suspend mode. Data is located in RAM, which is kept powered, but CPU is halted.

    In order to leave Suspend Mode and wake the machine back again, press the “Fn” button for about one second.

    Shutdown

    Point and click onto the user menu, top right of your desktop, and select “Shutdown”.

    Buttons and Blue Function Keys

    Special buttons and blue (gray?) function keys are configurable. Please check current settings of the Xfce4 Desktop Environment:

    Hints

    Important Manuals

    Please read the most important manuals. Open a terminal window by typing “Ctrl+Alt+T” and type the following commands:

    GNU Guix Examples

    Success!

    We wish you the best experience and success with your liberated Zerocat Guix Machine and would kindly ask for your supportive feedback for our website. See http://www.zerocat.org/team.html for contact details.

    Section #../doc/get-started-unencrypted.md

    Zerocat Machine with GNU Guix System (unencrypted) – Get Started

    Introduction

    Your Zerocat Machine is a liberated ThinkPad Laptop, which starts with free, trustworthy software right at power-up.

    The motherboard’s firmware has been deleted and – as far as achievable – replaced by free licensed firmware. This liberating procedure is explained in more detail within the project documentation of Zerocat Coreboot Machines: http://www.zerocat.org/coreboot-machines.html

    The firmware replacement itself has been processed by means of Zerocat’s Chipflasher, an electronic device that respects and maintains essential freedoms of computer users: http://www.zerocat.org/chipflasher.html

    The same applies to the selected operating system, GNU Guix System, which invents new, technical milestones for the GNU System, as founded by Richard M. Stallman.

    Passwords

    Within Chip

    The GRUB2 console or some entries of the boot menu might be protected by a password. Use the following credentials if being asked for:

    This GRUB2 username and its password can be changed by flashing a newly configured ROM image to the motherboard’s BIOS chip. It can be flashed fromout the operating system by means of the flashrom utility, once your GNU Guix System has been reconfigured to use kernel option iomem=relaxed.

    Flashing the BIOS chip is not a trivial process and comes with the risk of bricking your device.

    Partitions on Internal SSD

    Depending on the type of your disk’s partition table, these are their names:

    The partitions on your internal SSD are not encrypted via LUKS. They do not need to get unlocked during boot.

    Accounts of the GNU System

    Your GNU Guix System might be shipped with three user accounts preconfigured, root account, admin account, and normal user account.

    If a normal user account is not yet configured, check the current system configuration file /run/current-system/configuration.scm for an out-commented template entry.

    At the graphical login prompt, you might select the admin account or the normal user account, but not the root account. To login as root, a virtual linux console or a user’s terminal is required.

    Boot your Machine

    Radio Devices

    You might want to disable radio devices by using the laptop’s kill switch. It is often located at one of the device’s edges.

    Enter Passwords

    The entry of passwords will not be displayed on screen, thus no characters are to be seen. Enter your password blindly and finalize the entry with the “Enter” key. In case of a typo, you can still use the backspace key for correction, but you won’t see a cursor on screen.

    Power On

    Switch your device on and wait for the boot menu to appear.

    1. Type hotkey “x” to adjust the keymap for GRUB2. You will enter a dialogue which is controlled by the escape key only.

      The default keymap is “us”, but this won't be very useful in case your machine is equipped with a keyboard of a different layout.

      In case of a typo, reach the end of the dialogue, turn back to the boot menu, and try again.

      (You can skip this section in case your device has been configured to use a keymap matching the keyboard of the device.)

    2. Type hotkey “g” to search on disk for the GRUB2 configuration file, provided by GNU Guix System. The GNU Guix boot menu will appear. Select the first, default entry.

      The initial RAM-disk starts up.

      (If the boot process gets stuck with message “loading kernel modules...”, try pressing the Backspace Key to trigger the process.)

      1. Wait and watch the boot process until appearance of the graphical login prompt.
      2. Enter your selected username, i.e. user0 or user1.
      3. Enter the selected user’s password.
      4. Your Xfce4 session should start up.

    Take Ownership

    Please change passwords as soon as you are familiar with your system, and before starting to use radio devices.

    Screensaver

    There should be a simple screensaver available, providing a black screen when active. To unlock, enter your user’s password directly, without any additional key hit.

    Suspend Mode

    Point and click onto the user menu, top right of your desktop, and select “Suspend” in order to enter suspend mode. Data is located in RAM, which is kept powered, but CPU is halted.

    In order to leave suspend mode and awake the machine back again, press the “Fn” button for about one second.

    Shutdown

    Point and click onto the user menu, top right of your desktop, and select “Shutdown”.

    Buttons and Blue Function Keys

    Special buttons and blue (gray?) function keys are configurable. Please check current settings of the Xfce4 Desktop Environment:

    Hints

    Important Manuals

    Please read the most important manuals. Open a terminal window by typing “Ctrl+Alt+T” and type the following commands:

    GNU Guix Examples

    Success!

    We wish you the best experience and success with your liberated Zerocat Guix Machine and would kindly ask for your supportive feedback for our website. See http://www.zerocat.org/team.html for contact details.

    Section #../doc/grub@2.02_moddep-sorted.md

    All Modules of GRUB ”2.02“

    Top Level Modules

    videotest: gfxmenu
    odc: archelp
    loopback: extcmd
    gcry_des: crypto
    memrw: extcmd
    romfs: fshelp
    read:
    gcry_arcfour: crypto
    tftp: net priority_queue
    newc: archelp
    videotest_checksum: functional_test
    password_pbkdf2: crypto gcry_sha512 pbkdf2 normal
    gcry_seed: crypto
    pcidump: extcmd pci
    bsd: elf serial crypto gcry_md5 extcmd boot aout cpuid relocator mmap
    sfs: fshelp
    reiserfs: fshelp
    part_sunpc:
    jfs:
    help: extcmd normal
    configfile: normal
    cbls:
    gfxterm_menu: functional_test procfs normal
    gcry_idea: crypto
    tr: extcmd
    shift_test: functional_test
    ohci: cs5536 usb boot pci
    afs: fshelp
    spkmodem: terminfo
    usb_keyboard: usb keylayouts
    syslinuxcfg: extcmd normal
    usbms: scsi usb
    test_blockarg: extcmd normal
    true:
    affs: fshelp
    iso9660: fshelp
    exfat: fshelp
    setjmp_test: functional_test setjmp
    xfs: fshelp
    testspeed: extcmd normal
    cpio_be: archelp
    bswap_test: functional_test
    sleep: extcmd normal
    memdisk:
    mdraid09_be: diskfilter
    hfspluscomp: gzio hfsplus
    cmp:
    file: macho elf extcmd offsetio
    usbserial_usbdebug: serial usb usbserial_common
    morse:
    hashsum: crypto extcmd normal
    halt: pci acpi
    gdb: serial backtrace
    gfxterm_background: video_colors bitmap_scale extcmd bitmap
    gcry_dsa: verify mpi
    keystatus: extcmd
    linux: boot relocator mmap
    geli: cryptodisk crypto gcry_sha512 pbkdf2 gcry_sha256
    cmdline_cat_test: functional_test procfs normal
    part_sun:
    pbkdf2_test: functional_test pbkdf2 gcry_sha1
    usbserial_ftdi: serial usb usbserial_common
    bfs: fshelp
    hdparm: extcmd
    gcry_blowfish: crypto
    test:
    nilfs2: fshelp
    gcry_rsa: verify mpi
    nativedisk:
    minicmd:
    signature_test: functional_test procfs
    udf: fshelp
    xnu_uuid: gcry_md5
    uhci: usb pci
    pata: ata pci
    mul_test: functional_test
    adler32: crypto
    ehci: cs5536 usb boot pci
    part_bsd: part_msdos
    password: crypto normal
    sleep_test: functional_test datetime
    iorw: extcmd
    xnu: macho bitmap_scale random extcmd bitmap boot efiemu relocator mmap
    exfctest: functional_test
    zfsinfo: zfs
    ldm: part_gpt diskfilter part_msdos
    cmostest:
    eval: normal
    part_dvh:
    ext2: fshelp
    blocklist:
    part_acorn:
    videoinfo:
    part_msdos:
    lsmmap:
    multiboot: net boot relocator mmap
    png: bitmap
    jpeg: bitmap
    macbless: disk
    div_test: functional_test div
    regexp: extcmd normal
    usbserial_pl2303: serial usb usbserial_common
    cpio: archelp
    gcry_rmd160: crypto
    fat: fshelp
    ufs1_be:
    raid6rec: diskfilter
    http: net
    mda_text:
    lsacpi: extcmd acpi
    datehook: datetime normal
    loadenv: disk extcmd
    probe: extcmd
    tar: archelp
    hfs: fshelp
    progress: normal
    kernel:
    usbtest: usb
    tga: bitmap
    reboot: relocator
    zfscrypt: crypto pbkdf2 zfs extcmd gcry_sha1 gcry_rijndael
    dm_nv: diskfilter
    cmp_test: functional_test
    luks: cryptodisk crypto pbkdf2
    raid5rec: diskfilter
    crc64: crypto
    ctz_test: functional_test
    cbmemc: normal terminfo
    cmosdump:
    gcry_cast5: crypto
    squash4: fshelp lzopio xzio gzio
    part_plan:
    gcry_whirlpool: crypto
    gcry_tiger: crypto
    search: search_fs_uuid search_fs_file extcmd search_label
    lspci: extcmd pci
    cbtime:
    msdospart: disk parttool
    gcry_twofish: crypto
    part_dfly:
    xnu_uuid_test: functional_test
    testload:
    part_apple:
    date: datetime normal
    gcry_sha256: crypto
    ls: extcmd normal
    ntfscomp: ntfs
    hello: extcmd
    cat: extcmd
    ahci: ata boot pci
    linux16: boot relocator mmap
    ufs1:
    mdraid09: diskfilter
    lvm: diskfilter
    cbfs: archelp
    chain: elf boot cpuid relocator
    ufs2:
    time:
    setpci: extcmd pci
    gptsync: disk
    multiboot2: net boot relocator mmap acpi
    gcry_rfc2268: crypto
    mdraid1x: diskfilter
    play:
    part_amiga:
    minix3:
    minix3_be:
    minix2:
    minix2_be:
    minix:
    minix_be:
    echo: extcmd
    gcry_serpent: crypto
    gcry_md4: crypto
    gcry_camellia: crypto
    at_keyboard: keylayouts boot
    all_video: video_bochs video_cirrus
    

    Modules that are Dependencies of Others

    macho:
    terminfo: extcmd
    part_gpt:
    aout:
    elf:
    gfxmenu: video_colors trig bitmap_scale normal bitmap
    backtrace:
    xzio: crypto
    search_fs_file:
    disk:
    functional_test: btrfs extcmd
    gcry_rijndael: crypto
    gettext:
    gcry_sha1: crypto
    random: hexdump
    offsetio:
    video_colors:
    usb: pci
    search_fs_uuid:
    video_bochs: pci
    cpuid: extcmd
    cryptodisk: crypto extcmd procfs
    ata: scsi
    gzio:
    terminal:
    div:
    crypto:
    cs5536: pci
    gcry_sha512: crypto
    efiemu: gcry_crc crypto cpuid acpi
    fshelp:
    mmap:
    net: priority_queue datetime boot
    btrfs: lzopio gzio
    bitmap:
    ntfs: fshelp
    gcry_crc: crypto
    parttool: normal
    archelp:
    zfs: gzio
    bitmap_scale: bitmap
    procfs: archelp
    boot:
    keylayouts:
    relocator: mmap
    acpi: extcmd mmap
    serial: extcmd terminfo
    datetime:
    pci:
    hfsplus: fshelp
    extcmd:
    verify: crypto extcmd mpi gcry_sha1
    trig:
    priority_queue:
    diskfilter:
    hexdump: extcmd
    pbkdf2: crypto
    usbserial_common: serial usb
    lzopio: crypto
    video_cirrus: pci
    scsi:
    normal: terminal crypto extcmd boot gettext
    search_label:
    setjmp:
    mpi: crypto
    gcry_md5: crypto
    
    Section #../doc/how-to-modify-ifd.md

    How To Modify The Intel Flash Descriptor

    Most Intel Machines use their onboard flash chip to hold not just BIOS firmware, instead different firmare regions are set up to give space for other firmware as well. The first 4096 Bytes of that chip hold Intel’s description table which exactly describes position, size and access restrictions of these regions. This table is called “Intel Firmware Descriptor” or “Intel Flash Descriptor”, in short: “IFD”.

    Once you are dealing with coreboot or libreboot, different necessities arise to modify this description table.

    Region ME Deleted

    On libreboot compatible devices (i.e. X200, T400, T500, etc.), you are likely to delete region ME, the firmware region reserved to hold the proprietary firmware update for the integrated Intel Management Engine, a powerful controller on board. But with a deleted region, more space is available and should get reassigned to region BIOS, which holds your new coreboot BIOS firmware replacement.

    The Libreboot project already did that work, it offers a tool called ich9gen to create a modified firmware descriptor which can just be copied into the new coreboot ROM by means of the dd command. (This tool generates firmware for region GbE in the same go, it is bundled together. However, you might use the dd command again to seperate both regions in case you need to.)

    Retrieve the sources of the libreboot project:

    $ git clone https://notabug.org/libreboot/libreboot.git
    $ cd libreboot
    

    Let’s checkout at the latest release:

    $ git checkout r20160907
    $ cd resources/utilities/ich9deblob
    $ make
    

    Use the correct MAC address of your machine. It is usually stated on a sticker at the systemboard’s second RAM socket.

    $ ./ich9gen --macaddress xx:xx:xx:xx:xx:xx
    

    Do not use option --mac-address by mistake, as this will generate a GbE Configuration with a default MAC Address without warning the user. Do not omit the colons. Replace ‘xx’ with your hexadecimal values.

    This will generate some *.bin files and "How to Use" messages, i.e.:

    descriptor and gbe successfully written to the file: ich9fdgbe_8m.bin
    Now do: dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=1 count=12k conv=notrunc
    (in other words, add the modified descriptor+gbe to your ROM image)
    

    You should update your coreboot.rom with the apropriate dd command as a last action on it.

    Region ME Cleaned

    More recent machines (i.e. X220, X230, T430, T430s, etc.) do not allow you to delete region ME completely, unfortunately. However, the ME_Cleaner script is able to delete a signifcant number of sections of the firmware code. As a result, the IME controller boots up – but stays hang up in its Bring-Up-Phase. Hopefully it can't do any harm.

    Shrink Binary of Region ME

    Once me_cleaner.py cleaned, relocated and truncated the ME firmware, it might get shrunk even more. MECleaner’s log file suggests a new size, but this seems to be even more reducable by around 3× 4096 Bytes. Use hexdump -C to look for the last sector containing code in MECleaner’s binary output and determine the required minimal size, while maintaining flash erase sector size granularity. The dd command should be the right tool to create a smaller binary file of the truncated and shrunk ime firmware.

    Create and Fix Binary of Region IFD

    But useless to use this binary with coreboot without having created a new firmware descriptor binary:

    Dump the flash layout with ifdtool -f and create a modified one, see Example A below.

    Create a new, working flash descriptor with ifdtool -n and fix Byte Nº 0x51 (81 in decimal) with the value found in the previously extracted flash descriptor binary flashregion_0_flashdescriptor.bin, 0x1f for instance. The dd command helps you to copy that byte’s value. See Example B to see how the new flash descriptor dump should differ the default one.

    Example A: Modify X230 Firmware Layout

    Use ifdtool -f to extract the default layout, e.g.: X230

    00000000:00000fff fd
    00500000:00bfffff bios
    00003000:004fffff me
    00001000:00002fff gbe
    

    Modify the layout file. This is what can be used on an X230:

    00000000:00000fff fd
    00001000:00002fff gbe
    00003000:00017fff me
    00018000:00bfffff bios
    

    Size of ME-Region is 0x15000 Bytes instead of 0x18000 as suggested by me_cleaner.log. In comparison to the original flash layout on an X230, region BIOS has been increased – region ME has been decreased – by 0x4E8000 Bytes.

    Example B: Compare X230 Descriptor Dumps

    The diff -y command helps you to compare dumps (created with ifdtool -d) of the default descriptor and the new, fixed one. They should not differ but in four lines as listed:

    Found Region Section                                            Found Region Section
    FLREG0:    0x00000000                                           FLREG0:    0x00000000
      Flash Region 0 (Flash Descriptor): 00000000 - 00000fff          Flash Region 0 (Flash Descriptor): 00000000 - 00000fff
    FLREG1:    0x0bff0500                                         | FLREG1:    0x0bff0018
      Flash Region 1 (BIOS): 00500000 - 00bfffff                  |   Flash Region 1 (BIOS): 00018000 - 00bfffff
    FLREG2:    0x04ff0003                                         | FLREG2:    0x00170003
      Flash Region 2 (Intel ME): 00003000 - 004fffff              |   Flash Region 2 (Intel ME): 00003000 - 00017fff
    FLREG3:    0x00020001                                           FLREG3:    0x00020001
      Flash Region 3 (GbE): 00001000 - 00002fff                       Flash Region 3 (GbE): 00001000 - 00002fff
    FLREG4:    0x00001fff                                           FLREG4:    0x00001fff
      Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused     Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused
    

    Use Both Binaries with Coreboot

    Both newly created binaries of Region 0 and Region 2 should be used for the new coreboot.rom by means of ifdtool.

    Toolchain Scripts

    These procedures are applied by @ref gen-rom-zerocat.sh, which should help you to do it safely via --ime clean or --ime xtrunc. Use option --usage to get invocation examples. See source code for details.

    Section #../doc/ignore-coreboot-build-error.md

    Ignore Coreboot Build Error?

    NOTE: This file is outdated, but kept for reference.

    When compiling the coreboot image, you will stumble over an error message like that:

    Created CBFS (capacity = 2096856 bytes)
        CBFS       fallback/romstage
    E: Input file size (69908) greater than page size (65536).
    

    However, the build process won't stop, it finally succeeds.

    Examining the root of that message brings us to file util/cbfstool/cbfs_image.c of the coreboot project.

    This error is reported by function cbfs_locate_entry(...) which deals with three cases of content placement, case one, two and three. The reported error seems to be related to case two and three, see function’s code comment (as of commit e89d444043):

    /* Three cases of content location on memory page:
     * case 1.
     *          |  PAGE 1  |   PAGE 2  |
     *          |     <header><content>| Fit. Return start of content.
     *
     * case 2.
     *          |  PAGE 1  |   PAGE 2  |
     *          | <header><content>    | Fits when we shift content to align
     *  shift-> |  <header>|<content>  | at starting of PAGE 2.
     *
     * case 3. (large content filling whole page)
     *  | PAGE 1 |  PAGE 2  | PAGE 3 |
     *  |  <header>< content >       | Can't fit. If we shift content to
     *  |trial-> <header>< content > | PAGE 2, header can't fit in free
     *  |  shift->  <header><content> space, so we must use PAGE 3.
     *
     * The returned address can be then used as "base-address" (-b) in add-*
     * commands (will be re-calculated and positioned by cbfs_add_entry_at).
     * For stage targets, the address is also used to re-link stage before
     * being added into CBFS.
     */
    

    Therefor, I guess that this function is able to deal with our situation (input file > page), although the known error message has been issued previously. As the build process does NOT stop when the error message appears on screen, I suppose that this function does not return -1, indicating an error. A valid address value seems to be returned instead.

    For these reasons, I dare to interpret this error as a warning and probably the WARN macro should be used instead of the ERROR macro in order to emit the message.

    Note: In the above original comment snippet, the description of case 1 probably should be fixed to:

     * case 1.
     *          |  PAGE 1              |
     *          |     <header><content>| Fit. Return start of content.
     *
    

    I may be wrong! Please get in touch if you have a different opinion.

    Section #../doc/keymap-codes.md

    Keymap Codes

    Available on Trisquel

    TODO: How to get this output?

    af      bg        cn            et            group    it      latin           mk        nokia_vndr  rupeesign   sy         uz
    al      br        compose       eurosign      hp_vndr  jp      level3          ml        np          se          terminate  vn
    altwin  brai      ctrl          fi            hr       ke      level5          mm        olpc        sgi_vndr    th         xfree68_vndr
    am      bt        cz            fo            hu       keypad  lk              mn        pc          sharp_vndr  tj         za
    apl     bw        de            fr            ie       kg      lt              mt        ph          shift       tm
    ara     by        digital_vndr  fujitsu_vndr  il       kh      lv              mv        pk          si          tr
    at      ca        dk            gb            in       kpdl    ma              nbsp      pl          sk          tw
    az      capslock  ee            ge            inet     kr      macintosh_vndr  nec_vndr  pt          sn          typo
    ba      cd        empty         gh            iq       kz      mao             ng        ro          sony_vndr   tz
    bd      ch        epo           gn            ir       la      md              nl        rs          srvr_ctrl   ua
    be      cm        es            gr            is       latam   me              no        ru          sun_vndr    us
    

    Selection of Countries

    Missing output on GRUB’s Console is marked with “(?)”.
    Extra trouble like “unsupported scan code” is marked with “(!)”.

    GRUB Keymaps

    al at az
    ba be br
    ca cd ch cm cn cz
    de dk
    ee es
    fo fr
    gb gh
    hr hu
    is it
    jp
    ke kr
    lt lv
    md me ml mt
    ng nl no
    ph pl pt
    ro
    se si sk sn
    th tm tr
    us
    vn
    za
    

    For some country codes, variants intl, dvorak, latin9, qwerty and f are available.

    Section #../doc/remind-cmos-checksum-reset.md

    Remind CMOS Checksum Reset

    When flashing the Zerocat ROM onto an Already-Running-With-Coreboot-Machine, remember to reset the CMOS Checksum:

    The machine will then be forced to initialize the CMOS with its new values upon reboot.

    Section #../doc/t60-vgarom-extraction.md

    T60 VGAROM Extraction

    Some T60 configurations require an extracted proprietary VGA Option ROM. The ROM is to be extracted from memory, as vendor’s BIOS patches the VGA Option ROM loaded from chip.

    Please compare this information to: Coreboot VGA Support Page

    How-to

    Section #../doc/GNU-FDL.md

    GNU Free Documentation License

    Version 1.3, 3 November 2008

    Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org/

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

    0. PREAMBLE

    The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

    This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

    We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

    1. APPLICABILITY AND DEFINITIONS

    This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

    A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

    A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

    The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

    The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

    A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".

    Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

    The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

    The "publisher" means any person or entity that distributes copies of the Document to the public.

    A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.

    The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

    2. VERBATIM COPYING

    You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

    You may also lend copies, under the same conditions stated above, and you may publicly display copies.

    3. COPYING IN QUANTITY

    If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

    If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

    If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

    It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

    4. MODIFICATIONS

    You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

    If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

    You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

    You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

    The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

    5. COMBINING DOCUMENTS

    You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

    The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

    In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".

    6. COLLECTIONS OF DOCUMENTS

    You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

    You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

    7. AGGREGATION WITH INDEPENDENT WORKS

    A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

    If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

    8. TRANSLATION

    Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

    If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

    9. TERMINATION

    You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.

    10. FUTURE REVISIONS OF THIS LICENSE

    The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

    Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

    11. RELICENSING

    "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site.

    "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

    "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document.

    An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

    The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

    ADDENDUM: How to use this License for your documents

    To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

        Copyright (C)  YEAR  YOUR NAME.
        Permission is granted to copy, distribute and/or modify this document
        under the terms of the GNU Free Documentation License, Version 1.3
        or any later version published by the Free Software Foundation;
        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
        A copy of the license is included in the section entitled "GNU
        Free Documentation License".
    

    If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with … Texts." line with this:

        with the Invariant Sections being LIST THEIR TITLES, with the
        Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
    

    If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

    If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.

    Section #../doc/GNU-GPL.md

    GNU GENERAL PUBLIC LICENSE

    Version 3, 29 June 2007

    Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

    Preamble

    The GNU General Public License is a free, copyleft license for software and other kinds of works.

    The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

    When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

    To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

    For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

    Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

    For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

    Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

    Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

    The precise terms and conditions for copying, distribution and modification follow.

    TERMS AND CONDITIONS

    0. Definitions.

    "This License" refers to version 3 of the GNU General Public License.

    "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

    "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.

    To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.

    A "covered work" means either the unmodified Program or a work based on the Program.

    To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

    To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

    An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

    1. Source Code.

    The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.

    A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

    The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

    The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

    The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

    The Corresponding Source for a work in source code form is that same work.

    2. Basic Permissions.

    All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

    You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

    Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

    3. Protecting Users' Legal Rights From Anti-Circumvention Law.

    No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

    When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

    4. Conveying Verbatim Copies.

    You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

    You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

    5. Conveying Modified Source Versions.

    You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

    A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

    6. Conveying Non-Source Forms.

    You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

    A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

    A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

    "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

    If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

    The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

    Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

    7. Additional Terms.

    "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

    When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

    Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

    All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

    If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

    Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

    8. Termination.

    You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

    9. Acceptance Not Required for Having Copies.

    You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

    10. Automatic Licensing of Downstream Recipients.

    Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

    An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

    You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

    11. Patents.

    A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".

    A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

    Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

    In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

    If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

    If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

    A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

    Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

    12. No Surrender of Others' Freedom.

    If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

    13. Use with the GNU Affero General Public License.

    Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

    14. Revised Versions of this License.

    The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

    If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

    Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

    15. Disclaimer of Warranty.

    THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    16. Limitation of Liability.

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    17. Interpretation of Sections 15 and 16.

    If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

    END OF TERMS AND CONDITIONS

    How to Apply These Terms to Your New Programs

    If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

    To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

        <one line to give the program's name and a brief idea of what it does.>
        Copyright (C) <year>  <name of author>
    
        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
    

    Also add information on how to contact you by electronic and paper mail.

    If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

        <program>  Copyright (C) <year>  <name of author>
        This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
        This is free software, and you are welcome to redistribute it
        under certain conditions; type `show c' for details.
    

    The hypothetical commands \show w' and \show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".

    You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.

    The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html.