Skip to content

Commit 08e7623

Browse files
committed
Update readme with more information about image
1 parent fb955c3 commit 08e7623

File tree

2 files changed

+117
-1
lines changed

2 files changed

+117
-1
lines changed

README.md

+117-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,120 @@
1-
# NervesSystemBbb
1+
# BeagleBone Black
22

33
[![Build Status](https://travis-ci.org/nerves-project/nerves_system_bbb.png?branch=master)](https://travis-ci.org/nerves-project/nerves_system_bbb)
44

5+
This is the base Nerves System configuration for the [BeagleBone Black](http://beagleboard.org/black).
6+
7+
![BeagleBone Black image](assets/images/beaglebone-black.png)
8+
<br><sup>[Image credit](#fritzing)</sup>
9+
10+
| Feature | Description |
11+
| -------------------- | ------------------------------- |
12+
| CPU | 1 GHz ARM Cortex-A8 |
13+
| Memory | 512 MB DRAM |
14+
| Storage | 4 GB eMMC Flash and MicroSD |
15+
| Linux kernel | 4.4.9 w/ BBB patches |
16+
| IEx terminal | ttyS0 via FTDI pins |
17+
| GPIO, I2C, SPI | Yes - Elixir ALE |
18+
| ADC | Yes |
19+
| PWM | Yes, but no Elixir support |
20+
| UART | ttyS0 + more via device tree overlay |
21+
| Camera | None |
22+
| Ethernet | Yes |
23+
| WiFi | Requires USB WiFi dongle |
24+
25+
## Console access
26+
27+
The console is configured to output to `ttyS0` by default. This is the
28+
UART output accessible by the 6 pin header labeled J1. A 3.3V FTDI
29+
cable is needed to access the output.
30+
31+
The HDMI output has been disabled via device tree to free up pins on the
32+
GPIO header. If you would like console access via HDMI, you will need
33+
to enable HDMI support in the Linux kernel, remove the HDMI disable
34+
argument in the uboot script providing kernel arguments, and change
35+
`erlinit.conf` to output to `tty1`.
36+
37+
## Linux versions
38+
39+
The BeagleBone Black has many options for Linux that vary by
40+
kernel version and patch set. Nerves tracks those maintained by
41+
Robert Nelson at https://eewiki.net/display/linuxonarm/BeagleBone+Black.
42+
His patch sets have `-rt` and `-ti`/`-bone` options. The `-rt` for real-time
43+
actually refers to `CONFIG_PREEMPT` and a couple other real-time options being
44+
configured in the Linux kernel. Nerves uses those options as well. Nerves
45+
follows the `-ti` patch set. See `nerves_system_br/boards/bbb` for the actual
46+
patches.
47+
48+
Be aware that if you have been using Linux kernel 3.8 on the BeagleBone, that there
49+
have been device tree overlay and PRU updates. File paths have changed for
50+
inserting device tree overlays.
51+
52+
## Device tree overlays
53+
54+
Most pins on the BBB's headers are configurable via the device tree.
55+
Configuration can be done at runtime via the [Universal I/O](https://github.com/cdsteinkuehler/beaglebone-universal-io)
56+
device tree overlays. These overlays are included in the kernel configuration
57+
for Nerves so you do not need to compile that project. Additionally, the
58+
`config-pin` script is available in `/usr/bin` on the target. It has
59+
minor modifications to run on Nerves.
60+
61+
### Universal I/O
62+
63+
The universal I/O overlays can be loaded manually or by using the `config-pin`
64+
shell script:
65+
66+
```
67+
iex(demo@nerves-0099)> :os.cmd('config-pin overlay cape-universaln')
68+
'Loading cape-universaln overlay\n'
69+
iex(demo@nerves-0099)> :os.cmd('config-pin -i P9_16') |> IO.puts
70+
Pin name: P9_16
71+
Function if no cape loaded: gpio
72+
Function if cape loaded: default gpio gpio_pu gpio_pd pwm
73+
Function information: gpio1_19 default gpio1_19 gpio1_19 gpio1_19 ehrpwm1B
74+
Cape: cape-universala cape-universal cape-universaln
75+
Kernel GPIO id: 51
76+
PRU GPIO id: 83
77+
78+
:ok
79+
iex(demo@nerves-0099)> :os.cmd('config-pin P9_16 pwm')
80+
```
81+
82+
### ADCs
83+
84+
The following example shows how to read values from the 7 ADC inputs in Elixir.
85+
86+
```
87+
iex(demo@nerves-0099)> File.write("/sys/devices/platform/bone_capemgr/slots","BB-ADC")
88+
:ok
89+
iex(demo@nerves-0099)> ls "/sys/bus/iio/devices/iio:device0"
90+
buffer dev in_voltage0_raw in_voltage1_raw
91+
in_voltage2_raw in_voltage3_raw in_voltage4_raw in_voltage5_raw
92+
in_voltage6_raw name of_node power
93+
scan_elements subsystem uevent
94+
iex(demo@nerves-0099)> File.read("/sys/bus/iio/devices/iio:device0/in_voltage0_raw")
95+
{:ok, "3891\n"}
96+
iex(demo@nerves-0099)> File.read("/sys/bus/iio/devices/iio:device0/in_voltage0_raw")
97+
{:ok, "3890\n"}
98+
iex(demo@nerves-0099)> File.read("/sys/bus/iio/devices/iio:device0/in_voltage0_raw")
99+
{:ok, "3891\n"}
100+
```
101+
102+
## Supported USB WiFi devices
103+
104+
The base image includes drivers and firmware for Ralink RT53xx
105+
(`rt2800usb` driver) and RealTek RTL8712U (`r8712u` driver) devices.
106+
107+
We are still working out which subset of all possible WiFi dongles to
108+
support in our images. At some point, we may have the option to support
109+
all dongles and selectively install modules at packaging time, but until
110+
then, these drivers and their associated firmware blobs add significantly
111+
to Nerves release images.
112+
113+
If you are unsure what driver your WiFi dongle requires, run Raspbian and configure WiFi
114+
for your device. At a shell prompt, run `lsmod` to see which drivers are loaded.
115+
Running `dmesg` may also give a clue. When using `dmesg`, reinsert the USB
116+
dongle to generate new log messages if you don't see them.
117+
5118
## Installation
6119

7120
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
@@ -17,3 +130,6 @@ If [available in Hex](https://hex.pm/docs/publish), the package can be installed
17130
def application do
18131
[applications: [:nerves_system_bbb]]
19132
end
133+
134+
135+
[Image credit](#fritzing): This image is from the [Fritzing](http://fritzing.org/home/) parts library.

assets/images/beaglebone-black.png

45.4 KB
Loading

0 commit comments

Comments
 (0)