summaryrefslogtreecommitdiffstats
path: root/quickstart-board.rst
blob: e0cdb72514dfd3060f4a83d1c55134ab8e6b4379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Quickstart: Just the Board
=============================

This page runs through the steps of configuring a "bare" Novena mainboard for
use as a display-less system using the factory-installed microSD card as the
rootfs media.

.. figure:: /img/novena-unbox-board-pvt2a.jpg
   :align: center
   :alt: Novena PVT2 just-the-board unboxing, Dec 2014
   :width: 100%

   *Novena PVT2 "Just-The-Board" contents (December 2014)*

.. topic:: Before you begin...

    You will need a 3.3V USB-FTDI cable and a computer to work from (as a
    terminal). You will also need an Ethernet cable if you want wired
    networking.

First, before applying power, attach the FTDI cable with the USB side connected
to your host machine and the UART end connected to the Novena. The correct UART
connection is described on the `"Using Novena PVT1" wiki page
<http://kosagi.com/w/index.php?title=Using_Novena_PVT1>`_, and is shown below.

.. TODO:: better image of attached cable

.. figure:: /img/novena-uart-console-pvt2-photo.jpg
   :align: center
   :alt: Novena UART Console Cable (PVT2)
   :width: 100%

   *Novena PVT2 board with FTDI UART cable attached to console port (note wire
   colors and orientation)*

.. figure:: /img/novena-uart-pinout.jpg
   :align: center
   :alt: Novena UART Pinout (PVT2)
   :width: 100%

   *Pinout of Novena PVT2 board console port, wire colors correspond to default
   FTDI UART connector*


Open a terminal program on the work machine and open the FTDI device using
115200 baud as the speed and "normal" settings for everything else (eg,
``8n1``). For example, on a UNIX machine you could use the ``screen`` command
line program::

    screen /dev/ttyUSB0 115200
    # Should be a blank screen until the Novena boots.
    # Type "Ctrl-A" then "k" to quit when you are done.

Or you could use minicom or GtkTerm or whatever your favorite is. If you get
access errors, you might need to add yourself to ``dialout`` or ``plugdev`` or
a group like that, then completely log out and log back in::

    $ ls -l /dev/ttyUSB0
    crw-rw---- 1 root dialout 188, 0 May 28 21:10 /dev/ttyUSB0
    $ groups
    SOMEBODY cdrom floppy audio dip video plugdev netdev
    $ sudo usermod SOMEBODY -a -G dialout
    $ groups
    SOMEBODY cdrom floppy audio dip video plugdev netdev
    $ # Still need to logout and back in, then:
    $ groups
    SOMEBODY dialout cdrom floppy audio dip video plugdev netdev

Finally, connect power to the Novena board's DC barrel jack. You should see
u-boot and then kernel boot messages stream out the console.

Eventually you will enter the `"first run" menu system
<http://www.kosagi.com/w/index.php?title=Novena-firstrun>`_, which was created
by ``xobs`` specifically for the Novena. You should be able to make reasonable
selections for yourself by reading the prompts; a US-centric set of defaults
for a headless (aka, no display) system might be:

 - "Configuring console-data": select "Don't touch keymap"
 - "Configuring locales": "en_US.UTF-8 UTF-8" or yours
 - "Configuring locales": the locale you selected
 - "Configuring tzdata": your region, or "none of the above" to get to UTC
 - Enter a new root password
 - Create a user account
 - Choose a hostname or accept the autogenerated one
 - Disable graphical logins

Following all the prompts, the system should get configured and you will be
able to login as the user you created. Blessed be!

The next step will be to get networking up and running so you can upgrade
and/or install new software.

.. note::
   You need a wired connection to install required utilities before you can
   configure the wireless interfaces.

**Configure Ethernet Networking**

Attach ethernet cable to a switch/router to the left-hand port (eth0). If DHCP
is enabled on the local network, the interface should be configured
automatically. Test the connection with::

    sudo ifconfig eth0
    sudo ping www.mit.edu

**Configure WiFi Networking**

Install packages (over the wired connection); be sure to add your user to the
netdev group when prompted::

    sudo apt-get install wireless-tools iw wicd-curses

Run ``wicd-curses`` to connect to a wireless access point. You should be
presented with a list of detected stations; hit enter to connect to a station,
or right arrow and then scroll down to enter a WPA/WPA2 password (if
necessary).

You could also install ``network-manager`` instead of ``wicd`` and use the
``nmtui`` command to connect to networks and manage wired networking as well.

**After networking is configured**

Once networking is going, you should definately update the ``apt`` package
database, and you may wish to upgrade all existing packages (from the factory
image) to the most recent available versions.

The default configured debian mirror (to download updates from) is in the
United States.  You might want to change the ``/etc/apt/sources.list`` file to
point to something closer; changing to ``http.debian.net`` will auto-select a
good mirror wherever you are in the world.

To update package information, a process which should run reasonably fast even
the first time::

    sudo apt-get update

The ``upgrade`` step could take 30+ minutes all together, even given a fast
connection, because disk I/O operations on the built-in microSD card are very
slow. Don't start this process until you are patient enough to let it finish
without interruption. You don't really need to do the ``upgrade`` up front
before you start experimenting, it's just a good idea to stay patched with bug
fixes and security updates. To upgrade all packages with new versions, run::

    sudo apt-get upgrade

You may encounter a dpkg problem with the dbus package ("Package
libdbus-1-3:armhf is not configured yet."). If this happens run ``sudo apt-get
install -f`` to fix configuration, then ``sudo apt-get upgrade`` to finish the
upgrade.

You will almost certainly find youself needing i2c control utilities if you
will be hacking on the Novena, eg to compile the FPGA userland tools, so now
would be a good time to do::

    sudo apt-get install i2c-tools libi2c-dev

**Fixing Audio**

The version of ``pulseaudio-novena`` that shipped with PVT2 boards (v1.0) has
some known problems that prevent audio from working correctly out of the box.
Later versions (v1.1) fix this, but as of January 10th 2015 have not been
pushed to the Kosagi apt repository as a package update.

As a work around, one can either build a new .deb and install that, or as a
hack just copy the updated configuration files by hand to the correct paths.
After this the audio will need to be unmuted and turned up using ``alsamixer``
as usual. ``mplayer`` works fine for playing audio files from the (headless)
command line.