$ sudo apt-get update
$ sudo apt-get install ptux-sdk-overostorm
The following is a brief guide to creating a Pragmatux Device filesystem image for members of the Gumstix Overo Computer-on-Module family. This procedure has been verified on the Overo IronSTORM-P, attached to a Tobi expansion board.
Additional support resources for Gumstix products, including technical documentation, downloads, and mailing lists, are available at the Gumstix Developer Center website. Pragmatux-specific questions should be directed to the Pragmatux mailing lists. Pragmatux is not affiliated with Gumstix.
The development environment for creating programs, packages, and filesystem images is a desktop, laptop, or server running the Wheezy release of the Debian Linux distribution. That environment is called the workstation. The Gumstix Overo Storm COM is hereafter referred to as the device.
See the Pragmatux Website for TODO: instructions to create a Pragmatux Workstation. The workstation need not be a dedicated, physical machine: it is common to use a virtual machine or a chroot within another operating system, e.g. Ubuntu. The workstation setup instructions are verified to work in dedicated and virtual machine setups, but work with little to no modification in chroots.
A basic Pragmatux Workstation installation provides a pre-packaged SDK and related tools for supported devices including the Overo Storm. To install it:
$ sudo apt-get update
$ sudo apt-get install ptux-sdk-overostorm
The above commands install tens of packages containing the tools and code libraries essential for cross-development targeting a Pragmatux device runtime environment. If prompted, answer “yes” to install some packages without authentication.
Compose a filesystem using the default set of packages:
$ mkdir overostorm
$ cd overostorm
$ sudo fakeroot mkos-overostorm
The above commands create ptux.img
, a bootable SD card image for the
Overo Storm device.
When invoked without arguments, mkos-overostorm
composes a
filesystem with basic functionality: serial console, SSH
server, WiFi support, and so on.
You can manually add or remove packages on a running device using
package management tools already included in the default filesystem.
In addition, by passing arguments additional to mkos-overostorm
you
can change the features present in the filesystem it creates. See the
Pragmatux documentation for more information.
The Tobi expansion board has a USB mini-B connector that leads to the Overo Storm’s serial console. By connecting a serial terminal to this console, you can observe the board’s progress during boot and/or log into the board when prompted.
The serial console’s parameters are 115200-8-N-1 (115200 bits per second, 8 data bits, no parity bit, and 1 stop bit).
Use whatever serial terminal software and hardware you prefer; the instructions below use GNU screen on a Pragmatux workstation, which is included in the default setup:
$ sudo screen /dev/ttyUSB0 115200
For screen's
online help, type ctrl-a followed by ?. To quit, type ctrl-a k.
Use an SD card that is at least as large as the ptux.img
file itself
(usually about 1GB). A larger SD card will give you more storage area
on the device, but not until you resize the filesystem after first
boot (TODO: instructions forthcoming).
Use the dmesg
command, if necessary, to determine what name the
workstation assigns to your SD card when inserted, i.e. /dev/sdf
.
Write the image to an SD card:
$ sudo dd bs=1M if=ptux.img of=/dev/sdf
Disconnect power from the Overo Storm, insert the SD card into its card slot, then power up the board. Within a few seconds, the kernel should boot and write considerable output to the serial console. The very first time the operating system starts, it will go through a minute-long installation procedure and then automatically restart the board.
The output should look similar to the following. You should also see the blinking "heartbeat" LED on the Tobi board:
Setting up ncurses-base (5.7+20100313-5em1) ...
Setting up sensible-utils (0.0.4em1) ...
Setting up dpkg-autoconfigure (1.5~dev2) ...
Setting up devnodes-ptux (1.3) ...
Setting up sshd-run (1.0) ...
Setting up linux-overostorm (...) ...
[....]
The installation process generates much debugging, informational, and warning output due to the state of the system at installation time and the logging by packages being installed. While ignoring warnings is normally a bad practice, novice users can safely ignore warnings in this output when installing a default configuration unless the system fails to behave as expected after the after the first boot.
On the second and all subsequent boots, a login prompt leading to a command shell is offered on the serial console. The only account which exists following a basic installation is root with the password password.
Pragmatux 3.0 device ttyO2
device login: root
Password: password
By default, Pragmatux devices permit root logins over SSH only via an authorized key. Password-authenticated logins are disabled, and are not generally recommended.
To configure root login over SSH via authorized key, add the contents of
your personal id_rsa.pub
file to /root/.ssh/authorized_keys
on the
device using one of the following means:
copy/pasting it through the serial console;
using scp
to copy it over the ethernet link, or;
mounting the device’s SD card on your workstation.
Create the authorized_keys
file on the device, if it doesn’t already exist.
To enable password-authenticated root login over SSH, edit /etc/ssh/sshd_config
as follows.
Find the following line:
PermitRootLogin without-password
Change the above to read as follows:
# PermitRootLogin without-password
PermitRootLogin yes
Finally, restart the SSH server:
root@device:~# service sshd restart
By default, Pragmatux devices act as DHCP clients so that a DHCP
server can assign their network address. Use the ip
command at the
device’s serial console to determine what IP address was assigned by
your DHCP server:
Pragmatux 3.0 device ttyO2
device login: root
Password: password
root@device:~# ip addr show eth0
2: eth0: <...,UP,...>...
...
inet 192.168.88.3/24 ...
...
By default, WiFi devices are initialized in a disabled state. Use
rfkill
to enable a.k.a. "unblock" them:
root@device:~# rfkill unblock all
Next, use connmanctl
to scan for access points:
root@device:~# connmanctl
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
TLA Test Bench wifi_00198845cf8d_434322e3447487a_managed_none
HOME-D098 wifi_00198845cf8d_48452d44303938_managed_psk
xfinitywifi wifi_00198845cf8d_786e69747977696669_managed_none
wifi_00198845cf8d_hidden_managed_psk
TLA Guests wifi_00198845cf8d_4346573747320323447_managed_psk
Finally, connect to the selected access point. You may use tab-completion to assist in typing the long station identifier:
connmanctl> agent on
Agent registered
connmanctl> connect wifi_00198845cf8d_434322e3447487a_managed_none
[10992.965606] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Connected wifi_00198845cf8d_434322e3447487a_managed_none
If the selected access point requires a passphrase, connmanctl
will prompt for it.