@TODO What is this project all about, terms and what this document attempts to provide
Hardware required and supported for the platform itself:
EEG and data capturing hardware currently supported:
Assuming you are using recent Ubuntu-based Linux distribution (natively is preferred over VM if development will be long-term), the following steps in this section prepare the host system for cross-architecture developement - in other words, for cross-compiling.
sudo apt-get update -y;sudo apt-get upgrade -y;
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex mercurial automake manpages-posix manpages-posix-dev locate libevent-dev libssl-dev libpcap-dev minicom bluez bluez-tools bluez-utils libbluetooth* libglib2.0-dev;
The following are OPTIONAL, but help with many tasks related to development.
sudo apt-get install openssh-server;
sudo apt-get install ghex meld geany geany-plugins* gdb valgrind;
sudo apt-get purge pidgin thunderbird brasero cheese rhythmbox gnome-orca;
sudo apt-get remove duplicity onboard hexchat xzoom;
sudo apt-get autoremove;
As your system is only "prepared" by means of having pre-requisite software packages installed, the "buildroot" must be downloaded or "checked-out".
svn co svn://svn.code.sf.net/p/atomproducts/svn/trunk/intelliroot intelliroot
cd intelliroot
The buildroot is downloaded, but the default package and software configurations to be used by the build process need to be checked out and specified.
svn co svn://svn.code.sf.net/p/atomproducts/svn/trunk/configs configs
cp configs/Dev-barebones .config
Assuming that the system has Internet connectivity OR the packages are already present (i.e. the buildprocess has already been completed), the "OpenWRT feeds" will need to be updated and installed. This is performed through the following two commands:
./scripts/feeds update -a
./scripts/feeds install -a
If you wish to add your own feeds or modify existing ones, edit the entries in intelliroot/feeds.conf.default
OpenWRT which is the platform that Intellipi is built upon uses a generic, centralized menu for most items such as selecting packages etc... It is NCURSES and can accessed by running the command:
make menuconfig
Alternatively, the Linux kernel can be modified in a traditional way (this will look familiar to advanced Linux users)
make kernel_menuconfig
To build the image using the configuration you have specified (if following this doc - Dev-barebones) then all that remains is to run the below command.
make V=99 -j numberOfPhysicalCoresPlusOne
Note: if the build is failing - try building it using only a single process by not specifying the -j option. Otherwise, error messages are displayed chaotically in whatever order as the make server has no syncronization between parallel build processes.
To clean the build directory and rebuild from scratch (doesn't include the toolchain used for cross-compilation), run the command "make clean". If you run, "make distclean" beware! It will clean out the feeds, packages, and toolchain!
If the build was successfull, the standard read-to-use and RAMdisk image is ready to be burned (or more accurately "dd'd") to the SDcard (mini-sdcard for Pi2, A+ and B+). Note: SDcards and adapters can be affected by several things:
To write to the sdcard, you should be cautious in your choice - dd has the power to wreck your system if you start flashing to your host system SSD instead. To determine the SDcard, open a terminal, insert the sdcard into the reader (internal or external - the results will be similar, but not exact). The drive in the first example is: sdb and the second is mmcblk0
[31544.484735] usb-storage 1-1:1.0: USB Mass Storage device detected
[31544.484902] scsi host15: usb-storage 1-1:1.0
[31545.485342] scsi 15:0:0:0: Direct-Access USB Mass Storage Device PQ: 0 ANSI: 0 CCS
[31545.486251] sd 15:0:0:0: Attached scsi generic sg2 type 0
[31545.486976] sd 15:0:0:0: [sdb] 30392320 512-byte logical blocks: (15.5 GB/14.4 GiB)
[31545.487203] sd 15:0:0:0: [sdb] Write Protect is off
[31545.487210] sd 15:0:0:0: [sdb] Mode Sense: 03 00 00 00
[31545.487421] sd 15:0:0:0: [sdb] No Caching mode page found
[31545.487425] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[31545.492084] sdb: sdb1 sdb2
[31545.493341] sd 15:0:0:0: [sdb] Attached SCSI removable disk
[31545.711183] EXT4-fs (sdb2): mounted filesystem without journal. Opts: (null)
Alternatively, it could look like this for an sdcard using an internal reader:
[31605.781430] mmc0: new high speed SDHC card at address 0007
[31605.781616] mmcblk0: mmc0:0007 SD08G 7.43 GiB
[31605.782767] mmcblk0: p1 p2
Using the drive identifier found in the above step, replace "YOUR-DEV" with the one that indicates YOUR SD card in the following dd command. This will begin the flashing process and will be mostly silent until complete.
sudo dd if=bin/brcm2708/openwrt-brcm2708-sdcard-vfat-ext4.img of=/dev/YOUR-DEV bs=2M conv=fsync
DD will output something like the following to the terminal upon completion:
62+0 records in
62+0 records out
130023424 bytes (130 MB) copied, 14.9538 s, 8.7 MB/s
There are several ways - one is to use an HDMI capable display and a keyboard combo. Alternatively, you can setup an SSH connection if your device has an on-board Ethernet NIC or using a USB to serial TTY adapter. For the purposes of this document, it will illustrate how to connect to the IntelliPi using an Ethernet connection and SSH.
By default, the IntelliPi will be at the address, 192.168.20.100/24 by means of a static IP address. To connect to the device, your system will need to be on the same subnet - 192.168.20.x/24 (but x should not be 0, 100 or 255). The IntelliPi does not have Internet or DHCP connectivity configured (easily possible later).
To set your IP address to a static one within the 192.168.20.x range, and provided that your system's Ethernet interface is not controlled by the OS's network manger - the following steps address this AND how to gain SSH access.
sudo ifconfig YOUR_INTERFACE 192.168.20.10/24
ssh -l root 192.168.20.100
Using the above ssh command and you are able to connect! Then you will be prompted to access an SSH key (used for cryptographic or secure communications - same concept as the lock icon in your web-browser) and the default password is "atom".
Now you should be greated by a prompt that looks like this (although you may get an error message to remove the key as SSH may believe that it belongs to another device):
ssh -l root 192.168.20.100
The authenticity of host '192.168.20.100 (192.168.20.100)' can't be established.
RSA key fingerprint is 90:0f:90:06:8e:60:d7:53:0d:85:b8:ce:35:2d:51:bd.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.20.100' (RSA) to the list of known hosts.
root@192.168.20.100's password:
BusyBox v1.22.1 (2015-04-26 10:03:57 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.
ATOM EMBEDDED - Intellipi "Enabling Neural Freedom"
Distributed under GPLv2, MIT or inherited license(s)
-----------------------------------------------------
root@OpenWrt:~#
@TODO Overview of the architecture, packagefeeds/menu structure, what packages are available, which methods can data be obtained (OpenBCI or MUSE), getting started and building your own packages