Search This Blog

Wednesday, 16 December 2015

Parallella Board Notes (WIP)

SDHC cards tested;
Samsung 32GB Evo MicroSDHC (UHS-I Grade 1 Class 10)
SanDisk 16GB MicroSDHC (Class 4)

After burning headless image to SDHC card, use Putty to connect via SSH to the board.

Login to board - Username: Parallella Password: Parallella

Check SD card space with: df -h

Find root partition with: dmesg | grep "root"

Run fdisk to rebuilt the root partition: See https://parallella.org/forums/viewtopic.php?f=49&t=1373

Shutdown the board with: sudo shutdown -r now

Power off the board.

Power on the board and SSH login again with Putty.

Resize root partition with: sudo resize2fs /dev/mmcblk0p2

Check new SD card space with: df -h

Update system software with:
sudo apt-get update
sudo apt-get upgrade

Reboot the board: sudo reboot

Putty will lose connection. Restart putty and login (it may take time to reboot).

Update super-user password (make it something that's remembered, e.g. linaro)
sudo su
passwd
exit

Setup Git with user.name and user.email
https://help.github.com/articles/set-up-git/

git config --global push.default simple

Install cmake: sudo apt-get install cmake
Optional cmake-gui: sudo apt-get install cmake-qt-gui

Update cmake to latest:
wget https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz
tar xvf cmake-3.4.1.tar.gz
cd cmake-3.4.1
cmake .
make
sudo make install
Add export CMAKE_ROOT=/usr/local/share/cmake-3.4/ to .bashrc (then shutdown and relogin)
Check cmake is version 3.4: cmake --version

Install eog for image viewing: sudo apt-get install eog


http://www.browndeertechnology.com/docs/app_note_epiphany_parallella_build.pdf

wget http://www.mr511.de/software/libelf-0.8.13.tar.gz
wget http://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz
wget http://www.hyperrealm.com/libconfig/libconfig-1.4.8.tar.gz

Extract all and usual; ./configure ; sudo make install
flex --version
bison --version
m4 --version

echo $PATH
echo $LD_LIBRARY_PATH
vi .bashrc (if /usr/local/lib not in the LD_LIBRARY_PATH and relogin)

cd ~
wget http://www.browndeertechnology.com/code/coprthr-1.6.0-parallella.tgz
tar xvf coprthr-1.6.0-parallella.tgz
sudo ./browndeer/scripts/uninstall_coprthr_parallella.sh
sudo ./browndeer/scripts/install_coprthr_parallella.sh

cd ~
wget https://github.com/browndeer/coprthr/archive/v1.6.0.tar.gz
tar xvf v1.6.0.tar.gz
cd coprthr-1.6.0
./configure --enable-epiphany --disable-clete
make
sudo make install
mkdir work
cp –R /usr/local/browndeer/examples ./work
cp –R /usr/local/browndeer/test ./work
cd ./work/test
su (required so tests can assess /dev/mmap)
export PATH=/usr/local/browndeer/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/browndeer/lib:/usr/local/lib:$LD_LIBRARY_PATH
make quicktest
exit
cd ../examples/parallella/hello_opencl
gcc hello_opencl.c -o hello_opencl.x -I/usr/local/browndeer/include -L/usr/local/browndeer/lib -lcoprthr -lcoprthr_opencl
./hello_opencl.x

Install Xming X Server for Windows - http://sourceforge.net/projects/xming/
Set "Enable X11 forwarding" option in Putty -> Connection -> SSH -> X11

Install SFML: sudo apt-get install libsfml-dev libsfml-graphics2 libsfml-system2 libsfml-window2 libfreetype6-dev libxcb-image0-dev libudev-dev

Grab OpenCL cl2.hpp file from https://www.khronos.org/registry/cl/api/2.1/cl2.hpp
Put the cl2.hpp into /usr/local/browndeer/include/CL directory
It MUST be version from 2.1 (older versions had bad 1.1 support)

To see gcc pre-processor defines: gcc -dM -E - < /dev/null


Saturday, 7 May 2011

FTP Server and RedFly-Shield Socket class

I have been using Skewworks FTP server class to test my simple RedFly.Socket class. I got to a point where the FTP server was able to respond to a few FTP commands, including using 'get' to retrieve a file from the FEZ Domino SD card. But hit a snag when trying to send a file from the PC to the FTP server. It was becoming obvious that my simple implementation of a Socket class needed to have higher level functionality. Two thoughts were; implementing meaningful exception handling and function parameter checking, and hide in a lower layer the internal socket handling within the RedFly-Shield.

My search lead my to quite a few differing implementations of System.Net.Socket class library functions. Eventually I was draw to the implementation in the OpenSource Mono .Net core.

I've heavily refactored the RedFly.Socket class, and tweaked the FTP server and RedFly-Tester solution (make sure to grab at least r106 from the GoogleCode SVN repository).

As of r106 of the repository, the FTP server can perform most of the commands. 'get' and 'send' are quite limited at the moment though. They are restricted by the number of bytes for a file transferred.

I've got two new steps to take now -
  1. Try the RedFly.Socket class with other example code, such as HTTP client and server, DNS lookups, NTP sync.
  2. Finally update the UART reception handling.