Setting Up

Published on April 2017 | Categories: Documents | Downloads: 61 | Comments: 0 | Views: 578
of 4
Download PDF   Embed   Report

Comments

Content

ECEN5623 – RTES

Tauseef Indikar
Cyclone V - Altera DE-1 SoC

Get Ubuntu
Download a clean copy of Ubuntu from
http://xillybus.com/downloads/xillinux-1.1-sockit.img.gz
extract and burn image onto sdcard using win32diskimager (on Windows) or dd (on Ubuntu)
Copy soc_system.rbf (attached below) to the fat partition which contains uImage & socfpga.dtb

soc_system.rbf

Important: Expand the size of the root partition to fit your sdcard size by using resize in gparted on Ubuntu VM
The image on terasic.com does not have a clean kernel and it does not contain UVC drivers or V4L2 library

Connection
Use Teraterm or Putty on windows or minicom on Ubuntu with the settings as:
Flow Control: None

Parity:None

BaudRate: 57600

DataBits:8

StopBits:1

Add an account and change hostname
Add password to root account and add a new account with sudo access. Doing this will allow you to ssh into the device
on the same network using DeviceHostName. Replace DeviceHostName and UserName with your choice for both.
I have used

UserName=tauseef

root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~#
root@localhost:~#

DeviceHostName=cyclonev

passwd
hostname cyclonev && echo cyclonev >/etc/hostname
echo '127.0.0.1 localhost localhost.localdomain cyclonev' >/etc/hosts
adduser tauseef
adduser tauseef sudo

Connect Ethernet to Internet
To add a permanent connection to internet using Ethernet port add these lines to /etc/network/interfaces and reboot.
tauseef@cyclonev:~$ sudo nano /etc/network/interfaces
#Add these lines at the end
auto eth0
iface eth0 inet dhcp
#Save and exit Ctrl+X
tauseef@cyclonev:~$ sudo reboot

To connect only temporarily
tauseef@cyclonev:~$ sudo ip link set dev eth0 down
tauseef@cyclonev:~$ sudo dhclient eth0

Verify connection
tauseef@cyclonev:~$ ping google.com

Add Universe to repositories
tauseef@cyclonev:~$ sudo nano /etc/apt/sources.list

#Uncomment the following two lines by removing #
deb http://ports.ubuntu.com/ubuntu-ports/ precise universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ precise universe

#Update repository information and upgrade – takes a long time
tauseef@cyclonev:~$ sudo apt-get update && sudo apt-get upgrade –y sudo apt-get install –
y -f

#You might need to reconfigure network in /etc/network/interfaces to use eth0 as dhcp after upgrade

Install SSH server on Device
tauseef@cyclonev:~$ sudo apt-get install avahi-daemon avahi-utils -y --reinstall
tauseef@cyclonev:~$ sudo apt-get install openssh-server -y --reinstall

Install Camorama
tauseef@cyclonev:~$ sudo apt-get install camorama

Install OpenCV
#Install Dependencies
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev
libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev
libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev -y

#Install Using repositories
sudo apt-get install libopencv-dev python-opencv

#Alternatively make your own installation
#Create directory to download and make installation
cd ~ && mkdir opencv && cd opencv
git clone https://github.com/Itseez/opencv.git
cmake opencv

#Create directory to save build and make configuration
cd opencv && mkdir release && cd release
cmake -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D
BUILD_EXAMPLES=NO ..

#Make Installation
make –j2 #change this number to the number of cores in your processor to install faster

#Verify Installation by checking Version
pkg-config --modversion opencv

VirtualBox – Ubuntu
VirtualBox Settings
Install VirtualBox Extension Pack for your version of VirtualBox
Goto Settings ->Devices
Choose USB3.0 (xHCI) Controller and Add Logitech, Inc. WebCam C200 [0009] to filters as shown below

Add GuestBox Additions to VM Ubuntu
VirtualBox Menu -> Insert Guest Additions CD Image…
Cancel the autorun prompt
Open terminal
# Login as true root
$ sudo su -l

# First Update & Upgrade to have the latest Kernel
# apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install -f –
y

# Restart with latest Kernel
# reboot

# Install additions
# cp /media/username/VBOXADDITIONS_version/VBoxLinuxAdditions.run /tmp
# chmod 777 /tmp/VBoxLinuxAdditions.run
# /tmp/VBoxLinuxAdditions.run

# Reboot
# reboot

Mount device on VM
You can use DeviceHostName.local or DeviceIPAddress to connect if hostname is not resolved.
Files - > Connect to server -> ssh://[email protected] or ssh://tauseef@DeviceIPAddress
This will give you folder view access to the device

SSH into the device
$ ssh [email protected]

Or
$ ssh root@DeviceIPAddress

Install OpenCV
#Install Dependencies
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev
libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev
libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev -y

#Install Using repositories
sudo apt-get install libopencv-dev python-opencv

#Alternatively make your own installation
#Create directory to download and make installation
cd ~ && mkdir opencv && cd opencv
git clone https://github.com/Itseez/opencv.git
cmake opencv

#Create directory to save build and make configuration
cd opencv && mkdir release && cd release
cmake -D WITH_CUDA=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D
BUILD_EXAMPLES=NO ..

#Make Installation
make –j2 #change this number to the number of cores in your processor to install faster

#Verify Installation by checking Version
pkg-config --modversion opencv

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close