Git Product home page Git Product logo

thunderbolt-nvm-linux's Introduction

Thunderbolt NVM updates for Linux

This repository contains payloads that for updating the Thunderbolt NVM on select Dell systems.

Why

Intel is working on releasing a full NVM update solution for Linux users that will integrate with fwupd.

As of now (12/20/16) this full solution is not yet ready, but Intel has released tools that advanced users can use to provide feedback to Intel and to perform NVM updates.

When the fwupd solution is complete upstream, the payloads will be moved to LVFS in .CAB files and this page will be updated to point how to use the full upstream solution.

How

Intel's solution requires a series of kernel patches that have not yet been included upstream. These patches are used for Thunderbolt networking, but also happen to be pre-requisites for NVM query and NVM flash.

First integrate these patches into locally.

The thunderbolt-icm kernel module can be ran out of tree via DKMS if you would prefer to not compile a local kernel build.
Dell has made available a DKMS deb package here.

Next, fetch the thunderbolt user space stack

3 separate components will need to be built and installed in this order:

  1. The Thunderbolt Daemon thunderboltd
  2. The thunderbolt FW flash library libtbtfwu
  3. The thunderbolt FW flash command line application tbtfwucli

Usage

After those components are all built and installed, you will be able to enumerate devices using this command:

# tbtfwucli EnumControllers

If the controller does not enumerate, then it is most likely asleep. Plug in a thunderbolt device to wake it up and try again.

If you don't have a Thunderbolt device, it's also possible to force the controller into flash mode to wake it up using a utility that is on this repository.

Once you have succesfully enumerated the controller ID, you can query the current NVM version using this command:

# tbtfwucli GetCurrentNVMVersion $CONTROLLERID

You can query the model using this command:

# tbtfwucli GetModelID $CONTROLLERID

Find the firmware payload in this repository that corresponds to that model and you can validate it using this command:

# tbtfwucli ValidateFWImage $CONTROLLERID $PAYLOAD

Finally you can flash the payload using this command:

# tbtfwucli FWUpdate $CONTROLLERID $PAYLOAD

It's important that the controller stay awake during this time. If you woke it using another device, leave that device plugged in until the update is done. If you woke it using the Dell force tool then you don't need to do anything.

Dell Force Tool

A tool is provided in this repository that can force a Thunderbolt controller on a Dell system into flashing mode. When in flashing mode the controller won't go to sleep, so be sure to take it out of flashing mode when you are done with interactions.

Pre-requisites:

  1. libsmbios development libraries
  2. efivar development libraries

To compile the tool:

# gcc -o force_dell_tbt force_dell_tbt.c -I /usr/include/efivar/ -lsmbios_c -lefivar

To force flashing mode:

# sudo ./force_dell_tbt 1

To force user mode:

# sudo ./force_dell_tbt 0

Feedback

Kernel feedback can be provided on the most recent kernel submission. As of 12/20 that's version 9

Issues with the userspace tools should be filed with project on github

To provide other general feedback:

thunderbolt-nvm-linux's People

Contributors

joseluisdiaz avatar superm1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.