Code Monkey home page Code Monkey logo

libretech-overlays's Introduction

Libre Computer Linux Overlays

These overlays are designed to work with the 4.13 Linux fork from https://github.com/BayLibre/libretech-linux

Build

You need a "Overlay Enabled" device tree compiler, you can use the following one :

$ git clone https://github.com/RobertCNelson/dtc.git dtc --depth 1
$ cd dtc
dtc$ make all

Add the dtc binary in your PATH then :

make

Install

Copy the overlay/*.dtbo files in the /lib/firmware directory of your rootfs.

Copy the overlay.sh tool into the /usr/sbin directory of your rootfs.

Load

# mount x /sys/kernel/config -t configfs

(if not already mounted)

Then load the overlay (we can only specify part of the filename) :

UART A

Pinout :

  • TX will be on 7J1 Header Pin 8
  • RX will be on 7J1 Header Pin 10
  • CTS will be on 7J1 Header Pin 16
  • RTS will be on 7J1 Header Pin 18
# overlay.sh add libretech-cc-uarta

To enable a serial console on it :

# systemctl enable [email protected]
# systemctl start [email protected]

I2C AO

Pinout :

  • SDA will be on 7J1 Header Pin 3
  • SCL will be on 7J1 Header Pin 5
# overlay.sh add libretech-cc-i2c-ao

To scan available I2C devices :

# i2cdetect -y 1

To add a simple device, here a DS3231 RTC module :

# echo "ds3231 0x68" > /sys/class/i2c-adapter/i2c-1/new_device

You can also use the device specific overlay, before or after the bus overlay :

# overlay.sh add libretech-cc-ds3231-i2c-ao

I2C B

Pinout :

  • SDA will be on 7J1 Header Pin 27
  • SCL will be on 7J1 Header Pin 28
# overlay.sh add libretech-cc-i2c-b

To scan available I2C devices :

# i2cdetect -y 2

To add a simple device, here a DS3231 RTC module :

# echo "ds3231 0x68" > /sys/class/i2c-adapter/i2c-2/new_device

You can also use the device specific overlay, before or after the bus overlay :

# overlay.sh add libretech-cc-ds3231-i2c-b

SPICC

Pinout :

  • MOSI will be on 7J1 Header Pin 19
  • MISO will be on 7J1 Header Pin 21
  • CLK will be on 7J1 Header Pin 23
  • CS0 will be on 7J1 Header Pin 24
# overlay.sh add libretech-cc-spicc

The spidev interface can be activated by loading the spidev overlay :

# overlay.sh add libretech-cc-spidev-spicc

Unloading

Any overlay loading can be reverted by using the rm command instead of add like :

# overlay.sh rm libretech-cc-spicc

libretech-overlays's People

Contributors

superna9999 avatar jbrun3t avatar v10lator avatar

Watchers

Sebastien Jan avatar James Cloos avatar Benoit Cousson 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.