Giter Club home page Giter Club logo

servod-tools's Introduction

How do I shot Servo
-------------------

This set of tools lets you use a Servo control board for Chromebooks in some
kind of vaguely automated fashion. After installing these and configuring for
your local boards, you should have access to the CPU UART as
/dev/google-servo/$devicename/cpu-uart, and the EC as
/dev/google-servo/$devicename/ec-uart, as well as having servod itself
listening for more complex commands on a predictable port.


hdctools
--------

In order to actually communicate with the servo, you'll need to have hdctools
installed somewhere we can see it. This is available at:
https://chromium.googlesource.com/chromiumos/third_party/hdctools

You'll need libftdi-dev, tidy, and python-setuptools.

make
sudo make install
python setup.py build
sudo python setup.py install
sudo python setup.py develop


Kernel module
-------------

Build and install this kernel module. Those of you who pay attention to the
source may notice that it, in fact, does nothing. This is just here so the
kernel will actually bind to it, which will trigger udev rules, which will in
turn trigger systemd to start servod. There might be a better way to do this.

Anyway, just build and install it.


udev rules
----------

This udev rule is blindingly simple. Install it to /etc/udev/rules.d/.


systemd
-------

As above, but /etc/systemd/system/.


servod configuration
--------------------

The configuration, in /etc/google-servo.conf takes the form:
localalias,serial,port,boardtype

The localalias is what gets aliased into /dev/google-servo/$devicename/*, e.g.
peach-pi-on-my-desk, peach-pi-over-there, big-one, blaze-two. You get the
picture. The serial number comes from /sys/devices/*/serial; I recommend
discovering this with:
udevadm info --attribute-walk --name /dev/usb/google-servoN
The immediate parent of that device shown, should have an ATTR{serial} entry
in the form of "123456-12345".

Port is the port number to bind to for dut-control to use later. boardtype is
an internal value used by servo to work out how to communicate with the target
device; see hdctools/servo/data/ for something resembling a list of possible
values.


servod wrapper
--------------

This fairly trivial wrapper runs out of systemd and creates the device links
for /dev/google-servo/$devicename/*. You'll need python-numpy, python-pexpect,
python-pyudev, python-serial, and python-usb to run it.


Putting it all together
-----------------------

Once you've done all this, servod should turn up whenever you plug your board
in, and disappear once you haven't. Brilliant.

servod-tools's People

Contributors

fooishbar avatar khilman avatar mbgg avatar mmind avatar

Watchers

 avatar  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.