Aries Linux BSP User Manual

Transcription

Aries Linux BSP User Manual
Linux BSP for Aries SBC
DSC Document Number 748074x
Revision A.00
Revision A.00
Revision
Date
Comment
A.00
10/28/2015
Initial release
FOR TECHNICAL SUPPORT
PLEASE CONTACT:
[email protected]
October 2015
Copyright 2015
Diamond Systems Corporation
555 Ellis Street
Mountain View, CA 94043 USA
Tel 1-650-810-2500
Fax 1-650-810-2525
CONTENTS
1.
Introduction ....................................................................................................................................................... 3
1.1
Warranty / Disclaimer ................................................................................................................................. 3
1.2
Linux License and Support Information ..................................................................................................... 3
2. Software Development Kit Contents ............................................................................................................... 4
2.1
User Manual ............................................................................................................................................... 4
2.2
SATA-DOM disk ......................................................................................................................................... 4
2.3
Backup copy on DVD with image ............................................................................................................... 4
3. Quick Start Guide .............................................................................................................................................. 5
4. Linux Features .................................................................................................................................................. 6
4.1
Baseline Linux Distribution ......................................................................................................................... 6
4.2
Installed Applications ................................................................................................................................. 6
4.3
Gnome Unity and Classic GUI view ........................................................................................................... 6
4.4
Application / Feature Configuration ............................................................................................................ 7
4.5
FTP Server Enable Instructions ................................................................................................................. 7
4.6
HTTP Server Enable Instructions............................................................................................................... 7
5. Universal Driver ................................................................................................................................................ 8
5.1
Overview .................................................................................................................................................... 8
5.2
Steps to Compile Universal Driver ............................................................................................................. 9
5.3
Steps to install Universal Driver ............................................................................................................... 10
5.4
Steps to Install Universal Driver at Boot Time ......................................................................................... 10
5.5
Steps to Uninstall Universal Driver........................................................................................................... 10
5.6
Steps to Compile Test/demo Application ................................................................................................. 11
6. Reimaging a Corrupt Flashdisk ..................................................................................................................... 11
7. Reinstalling Linux ........................................................................................................................................... 11
7.1
Basic Linux Installation ............................................................................................................................. 11
7.2
Configuring Linux to Match the Runtime Image ....................................................................................... 11
8. Linux Passwords ............................................................................................................................................ 12
9. Troubleshooting.............................................................................................................................................. 13
9.1
Using Built-in ‘fsck’ to Fix Disk ................................................................................................................. 13
9.2
Using SSD on Separate Desktop PC to Recover Files or Perform File-System Check ‘fsck’ ................. 13
9.3
Checking BIOS to Ensure BSP Disk is Selected in Boot Disk Priority..................................................... 14
9.4
Resetting BIOS Options to Defaults ......................................................................................................... 18
9.5
Connecting VGA monitor ......................................................................................................................... 19
Appendix A: Ubuntu 14.04 Installation Steps ..................................................................................................... 20
Appendix B: Configuration of FTP Server ........................................................................................................... 33
Appendix C: Configuration of HTTP server ......................................................................................................... 34
Appendix D: Configuration of SSH server ........................................................................................................... 36
Appendix E: File Transfer through minicom ....................................................................................................... 37
Appendix F: File Reception through minicom .................................................................................................... 43
Appendix G: DD command for image Backup .................................................................................................... 44
Appendix H: create and Change Root User Password, Ubuntu New User Creation ...................................... 45
Appendix I: Load Universal Driver at Startup ..................................................................................................... 48
Appendix J: Disable check for updates ............................................................................................................... 49
Appendix K: Install additional utilities ................................................................................................................. 50
Appendix L: Switch between Gnome Unity and Classic Desktop GUI ............................................................. 50
Appendix M: Automatic login option ................................................................................................................... 53
Appendix N: Sound recording .............................................................................................................................. 55
Appendix O: Linux Image RE-flashing ................................................................................................................. 58
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 2
1. INTRODUCTION
This document describes the steps involved in using the Linux BSP with Diamond Systems’ Aries single board
computer and how to use Aries’ Linux bootable SATA-DOM disk.
For support please visit following website: http://www.diamondsystems.com/contact
1.1
Warranty / Disclaimer
1.2
Linux License and Support Information
Ubuntu is a collection of thousands of computer programs and documents created by a range of individuals,
teams and companies, each of these programs may come under a different license, find the licensing details from
the following web site.
http://www.ubuntu.com/about/about-ubuntu/licensing
The Aries BSP uses the Ubuntu-14.04 LTS OS. LTS is an abbreviation for “Long Term Support” and this OS has
support till 2019. For more details visit following site: https://wiki.ubuntu.com/LTS
Generic forum for Linux users:
http://www.linuxforums.org/
Distribution-specific help websites:
https://wiki.ubuntu.com/LTS
https://wiki.ubuntu.com/Releases
https://help.ubuntu.com/14.04/index.html
https://help.ubuntu.com/14.04/ubuntu-help/index.html
https://help.ubuntu.com/community
http://community.ubuntu.com/help-information/finding-help/support/
Official Ubuntu forum:
http://ubuntuforums.org/
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 3
2. SOFTWARE DEVELOPMENT KIT CONTENTS
The Aries Software Development Kit contains the user manual, a SATA-DOM disk pre-programmable with a
bootable Linux image, and a backup copy of the Linux image on DVD.
2.1
User Manual
This user manual contains details about using the Linux BSP. For the Aries SBC hardware user manual visit
following website: http://www.diamondsystems.com/products/aries
2.2
SATA-DOM disk
The SATA-DOM disk includes a bootable runtime Linux Ubuntu-14.04 OS image. In addition to demonstrating
Linux operation, the OS image also contains programs that can be used for demonstrating and validating many of
Aries’ hardware capabilities. Functions exercised by the bootable Linux OS image include:
Ethernet support
Audio support
DHCP, SSH, FTP,HTTP server support
USB mouse and keyboard support
USB 2.0 and 3.0 ports
Serial ports RS-232/422/485
SATA storage devices
Diamond Systems’ Universal Driver 7.00 for Linux 3.16
2.3
Backup copy on DVD with image
The SATA-DOM has a bootable Linux image on it. The same Linux image is provided on a DVD as a backup
copy. The user can flash the image on one more SATA-DOM if required, or can flash it on same SATA-DOM if the
existing image becomes corrupted.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 4
3. QUICK START GUIDE
Connect the SATA-DOM in the SATA socket of Aries board. The slot is shown in following picture. Then power
on the SBC. It directly boots to Ubuntu Desktop since the automatic login feature is enabled in the OS.
Figure 1: SATA Socket in Aries Board
Note: To provide power to the SATA-DOM, a jumper must be placed on pins 1 and 2 in Jumper Block JP2.
The Ubuntu-14.04 OS has the following user credentials:
User Name
Password
dscguest
dscguest
diamond
diamond
root
welcome
The board specific demo applications are placed in desktop folder and the Diamond Systems Universal Driver is
placed in the /usr/local/ directory.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 5
4. LINUX FEATURES
4.1
Baseline Linux Distribution
This BSP has an Ubuntu-14.04.2 Linux OS with kernel version 3.16.0-30, Linux headers 3.16.0-30, gcc version
4.8.2 and GNU make version 3.81.
For more information visit following website: https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/14.04
4.2
Installed Applications
The following applications are installed in the OS










4.3
minicom
yum
gcc
g++
gdb
ddd
eclipse
wine
gparted
myunity
Gnome Unity and Classic GUI view
There are two GUI interfaces available for Linux users; Gnome Unity and Gnome Classic.
Gnome Unity is a desktop environment bundles together a variety of X clients to provide common graphical user
interface elements such as icons, toolbars, wallpapers, and desktop widgets. Additionally, most desktop
environments include a set of integrated applications and utilities. The following picture shows the Gnome Unity
GUI interface.
Figure 2: Ubuntu GUI Desktop
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 6
Gnome Classic is a completely menu based interface. The following picture shows gnome classic GUI interface.
Figure 3: Accessories
The Ubuntu-14.04 uses Gnome Unity by default. This BSP also offers the Gnome Classic GUI interface. To
switch between Gnome unity and Gnome classic Refer Appendix L
4.4
Application / Feature Configuration
Refer to Appendix K
4.5
FTP Server Enable Instructions
Refer to Appendix B
4.6
HTTP Server Enable Instructions
Refer to Appendix C
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 7
5. UNIVERSAL DRIVER
5.1
Overview
Universal Driver is a software toolkit that provides a C language interface capability for Diamond Systems' I/O
boards. It is provided free with all of Diamond Systems' hardware products and may also be downloaded free
from the Diamond Systems website (http://www.diamondsystems.com/products/ud70). It supports all the data
acquisition features of Diamond Systems’ products, plus support for the watchdog timers on Diamond Systems’
SBCs.
The Linux DSCUD-7.00 installation differs entirely from Windows. For interrupt features and PCI devices (i.e.,
PC/104-Plus, PCI-104, and PCIe MiniCards), the Universal Driver kernel module must be compiled on the target
system before installing the driver because the Linux kernel version varies based on the Linux OS chosen.
Instructions If You Don't Need Interrupt Features
This kernel module is required to support high speed processing of interrupts from the data acquisition boards,
and PCI devices require the module to operate. However, if the user doesn’t intend to use interrupts from the
board, or if using a PC/104 board, there is no need to install this kernel module. Examples of interrupt functions
are: RMM1616UserInterruptSet () and RMM1616UserInterruptStop (). Simple functions like RMM1616DAConvert
() and digital I/O operations do not require interrupts.
If the application does not need interrupts, simply extract the driver files, link to the driver library (libdscud-7.00.a)
with application program and do not run the compile.sh or install.sh shell scripts or do anything with kernel source
code, or create a kernel module.
Things to Do Before You Install
The driver uses a Linux kernel module developed by Diamond Systems to handle interrupt processing. If the
application will use any interrupt related functions of the driver, this kernel module is required.
To build a Linux kernel module you must have the kernel header source code in your system (and applicable
C/C++ compiler). Additionally, kernel modules are built for a specific version of the kernel, so if you build the
module for one version and then attempt to load the module under another version, errors or unexpected results
may occur. Most likely, the Linux will reject the kernel module as being in an invalid module format if from an
incompatible system.
This BSP has all the necessary build environment elements for kernel module compilation like kernel headers,
gcc compiler and GNU make utility.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 8
5.2
Steps to Compile Universal Driver
Change the directory where Diamond Systems’ Universal Driver resides to: cd /usr/local/dscud-7.00
Run ./compile.sh
EXAMPLE:
linux:/usr/local/dscud # ./compile.sh
Diamond Systems Universal Driver Installer
-----------------------------------------This installer compiles a kernel module which supports interrupt driven data acquisition features of Diamond
Systems’ products.
If you are not using the interrupt driven features of the board you do not need to run this installer.
Online documentation for this driver is available at http://docs.diamondsystems.com/dscud/
Hit CONTROL-C at any time to exit this installer.
[[HIT ENTER TO CONTINUE]]
Step One: Locate Kernel Source Code
------------------------------------------The installer will now scan your system looking for Linux kernel source code. The /usr/src directory and the
/lib/modules directory will be scanned.
Select a Linux kernel version below that you will run on your TARGET system. Type the number next to the
selection and hit ENTER.
0) Kernel 3.16.7 (/lib/modules/3.16.0-30-generic-pae/build)
1) Kernel 3.16.7 (/usr/src/linux-headers-3.16.0-30-generic-pae)
For example type 1
Step Two: Compile Kernel Module
-----------------------------------------The installer is now ready to compile the Linux kernel module. If errors occur see the README file in this
directory as well as the online DSCUD documentation for help.
This kernel module will only load under the exact Linux kernel version which you have installed in the directory
/usr/src/linux-headers-3.16.0-30-generic-pae.
[[HIT ENTER TO CONTINUE]]
--> Compiling kernel module for your system <-rm -f dscudkp.ko dscudkp.o dscudkp.mod.*
make-C/usr/src/linux-headers-3.16.0-30-generic-pae SUBDIRS=/home/ami/Desktop/delete/dscud-7.00 modules
make [1]: Entering directory `/usr/src/linux-headers-3.16.0-30-generic-pae'
CC [M] /home/ami/Desktop/delete/dscud-7.00/dscudkp.o
Building modules, stage 2.
MODPOST 1 modules
CC
/home/ami/Desktop/delete/dscud-7.00/dscudkp.mod.o
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 9
LD [M] /home/ami/Desktop/delete/dscud-7.00/dscudkp.ko
make [1]: Leaving directory `/usr/src/linux-headers-3.2.0-29-generic-pae'
--> Installing module dscudkp.o in /lib/modules/misc <-mkdir -p /lib/modules/misc
cp dscudkp.ko /lib/modules/misc/
Step Three: Final Instructions
----------------------------The dscudkp kernel module has been installed in /lib/modules/misc/. You must copy this
file to the same location on your target system.
The install.sh script will load the kernel module so that it can be used by the driver. You must run this script each
time the Linux system boots. See the README file for help with this.
Driver compilation complete.
• In the example above, the dscudkp.ko was compiled to be used on the system that
has Linux-3.16.17. If User has completed all the steps in development PC, copy
/lib/modules/misc/dcudkp.ko and /usr/local/dscud-7.00 directory to target board
Using identical respective locations.
• Once copying the files to target system is done, change directory to the dscud-7.00
Folder and run the command to install the driver.
5.3
Steps to install Universal Driver
Change to the directory cd /usr/local/dscud-7.00
Run - ./install.sh
This script file loads the universal driver kernel module and creates file as /dev/dscud
To confirm the driver loaded successfully run the following command
$lsmod | grep dscudkp
which will show the driver name filtered from the list of loaded drivers.
Installing and setting up Universal Driver support on our target system is done.
5.4
Steps to Install Universal Driver at Boot Time
Refer to Appendix I
5.5
Steps to Uninstall Universal Driver
Run the following command to uninstall the driver
$. /uninstall.sh
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 10
5.6
Steps to Compile Test/demo Application
To compile demo applications, go to demo application source directory and run make command in terminal, it
compiles the demo application and creates executable in the current directory.
To compile demo application
$ make
To run built executable
$ ./Executable_name ( ex. $./ARIESLED )
6. REIMAGING A CORRUPT FLASHDISK
If the Ubuntu OS does not boot with SATA-DOM, then try the steps given in troubleshooting section. If the issue
persists, reflash the SATA-DOM with the backup image provided in DVD.
To re-flash the SATA-DOM refer to Step 3 in Appendix G.
7. REINSTALLING LINUX
7.1
Basic Linux Installation
This section details how to develop an Ubuntu-14.04 Linux image for the Aries SBC on a SATA-DOM drive.
Install Ubuntu-14.04 OS on SATA-DOM disk
 Refer to Appendix A
7.2
Configuring Linux to Match the Runtime Image
Install additional utilities on the Ubuntu image

The user may require utilities like Eclipse IDE, partition manager, minicom etc. The freshly installed
Ubuntu-OS will not have those utilities by default. To install required additional utilities refer to
Appendix K.
Configure HTTP, FTP and SSH server

Refer to Appendix B, C and D respectively
Create new user and password if required

Refer to Appendix H
Install Gnome Classic GUI Desktop interface

The Ubuntu-14.04 OS has Gnome Unity interface by default, to change to the Gnome Classic
desktop interface, refer to Appendix L.
Enable automatic login option if required
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 11

Refer to Appendix M
Place the current Diamond Systems’ Universal Driver at /usr/local directory
Compile Universal Driver

In general under Linux system, kernel modules are built for a specific version of the kernel, so if
modules are built for one kernel version and then in an attempt to load the module under another
kernel version, errors or unexpected results may occur. Most likely, the Linux will reject the kernel
module as being in an invalid module format if from an incompatible system. Therefore the Universal
Driver must be compiled on and installed on the Ubuntu-14.04 OS. Follow Section 5, steps 3 and 4.
Place required board specific demo applications at Desktop directory.
Load Universal Driver at start up

To load Universal Driver at OS boot time, refer to Appendix I.
The Ubuntu-14.04 kernel version 3.16.0-30 has required drivers to support all the peripherals present on
the Aries SBC.
The next step is to make a copy of the Aries Linux image, refer to Appendix G
8. LINUX PASSWORDS
The Ubuntu-14.04 OS has following user credentials:
User name
Password
dscguest
dscguest
diamond
diamond
root
welcome
To create new user or change root user password

Refer to Appendix H
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 12
9. TROUBLESHOOTING
9.1
Using Built-in ‘fsck’ to Fix Disk
fsck is used to check and optionally repair one or more Linux file systems. The file system can be a device
name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home). If the SATA-DOM is booted to terminal,
then type the following command.
$fsck /dev/sdxxx
The exit code returned by fsck is the sum of the following conditions:
0
- No errors
1
- File system errors corrected
2
- System should be rebooted
4
- File system errors left uncorrected
8
- Operational error
16 - Usage or syntax error
32 - Fsck canceled by user request
128 - Shared library error
If file system errors are not corrected then re-flash the image on the SATA-DOM using the backup in DVD. To reflash, please refer to step 3 in Appendix G
9.2
Using SSD on Separate Desktop PC to Recover Files or Perform File-System Check
‘fsck’
To find out the SATA-DOM device name, connect the SATA-DOM on a separate PC which has the same Linux
OS version and type the following command in the PC terminal with root user permission:
$fdisk –l
The above command will list storage devices names connected to the PC, locate the SATA-DOM based on size
from the displayed list. If one or more storage media has same size, then remove the SATA-DOM and try the
same command. Check which device name is not displayed when compared with the previous list.
Once the SATA-DOM device name is found (e.g /dev/sdc) then type the following command in terminal:
$ fsck /dev/sdc
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 13
9.3
Checking BIOS to Ensure BSP Disk is Selected in Boot Disk Priority
The BIOS setup screen may be entered during startup by pressing the Delete key on an attached keyboard.
Press the key repeatedly right after power-on or reset until the BIOS screen appears. After a certain amount of
time during startup, the BIOS will ignore the Delete key. If you wait too long and the system does not respond,
simply reset the system (or power down) and try again.
During SBC startup, press Delete key to enter BIOS setup screen.
Figure 4: BIOS Setup Screen
Use the mouse or right/left arrow key to select Advanced-> Miscellaneous Configuration
And press Enter
Figure 5: Select Miscellaneous Configuration
Select OS type as Linux
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 14
Figure 6: OS Selection
Make sure the SATA-DOM is selected as first boot device
The following picture shows that the first boot device is another device
Select Hard Drive BBS Priorities
Figure 7: Hard Drive BBS Priorities
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 15
Select desired as hard disk as first boot device ( SATA-DOM)
Figure 8: First boot Device
Select Boot option #1. Choose first boot device as SATA-DOM.
Figure 9: Select Boot Option #1
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 16
Figure 10: set System Boot Order
Go to “Save & Exit Setup” and select “Save Changes and Exit “ option then press the enter key
Figure 11: Save Changes and Exit
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 17
9.4
Resetting BIOS Options to Defaults
In order to load the default BIOS settings, enter the BIOS settings and select Save and Exit menu. Then select
Restore Defaults, and save/exit. This will restore the BIOS to the default state.
Figure 12: Load Optimized Defaults
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 18
9.5
Connecting VGA monitor
If a VGA display is desired, connect it to the Aries SBC as follows. See the Aries User Manual for more
information.
1. Obtain a VGA cable
Figure 13: VGA Cable
2. Connect one end of the VGA cable to the VGA connector on the Aries SBC.
3. Connect other end of the VGA cable to the VGA connector of a desktop monitor.
Figure 14: VGA Connector
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 19
APPENDIX A: UBUNTU 14.04 INSTALLATION STEPS
The chapter shows the steps to install the Ubuntu 14.04 operating system.
Step 1: Boot the SBA from Live CD
Load the Ubuntu 14.04 Live CD into the CD or DVD drive, and switch on the SBC with the disc still in the drive.
Watch the initial BIOS screen for a prompt that indicates which key to use for either:
a boot menu, or
the BIOS setup utility
The boot menu option is preferable. If you cannot see such a prompt, on many systems, the required key will be
F2 or Delete. Change the boot priority option to boot from drive.
Select the Install Ubuntu button:
Figure 15: Install Ubuntu
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 20
Step 2: Uncheck Options
Uncheck “Download updates while updating” and “Install this third party section” if they are checked.
Figure 16: Uncheck Download Updates
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 21
Step 3: Installation Type Selection
Select “Something else” option and click continue.
Figure 17: Installation Type Selection
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 22
Step 4: Creating New Empty Partition Table
Click the “New Partition Table” and Click “continue”.
Figure 18: Creating new empty partition table
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 23
Select the “free space” and click the “+” button
Figure 19: Select Free space
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 24
Select “Ext4 journaling file system” option
Select “ / ” for the Mount point and click Ok
Figure 20: Select Ext4
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 25
Click Install now
Figure 21: Click Install Now
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 26
Step 5: Not Selecting a Partition for Use of Swap Space
To increase life-span of SATA-DOM flashdisk, it is better to not use swap space because the Linux OS accesses
swap space frequently. The Aries SBC has 2GB or 4GB soldered SDRAM which is enough. Click “Continue” to
avoid allocating a partition for swap space.
Figure 22: Installation without Swap Space
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 27
Step 6: Time Zone Configuration
Select the country by moving around the World map.
After selecting the country, press Continue.
Figure 23: Time Zone Configuration
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 28
Step 7: Language Selection
Select the language and press continue.
Figure 24: Select Language
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 29
Step 8: Set the User Name
Provide the user name and password.
For example user name is dscguest, type the user name in the ‘Your name’ section.
For example password is dscguest, type the password in ‘Choose a password ’section.
The given Your name becomes the user account name for the system and also serves as the administrator
Figure 25: User name and password
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 30
Step 9: Welcome Screen
The following screen will be appear and the system will install the OS.
Figure 26: Installing System
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 31
Step 10: Restart
Restart the system to complete the Ubuntu 14.04 OS installation once the following window appears.
Figure 27: Restart Now
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 32
APPENDIX B: CONFIGURATION OF FTP SERVER
The chapter shows the steps to install an FTP server installation in the Ubuntu 14.04 operating system.
Step 1: Installing the FTP Server on Ubuntu
Switch to root user.
$ su root
$ enter the root login password
$ apt-get install vsftpd
Open vsftpd.conf file, the file is present in /etc path.
$ vi /etc/vsftpd.conf
Edit vsftpd.conf file to enable to upload and download files from the ftp server.
Uncomment the below mentioned lines in the file.
listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=077 (Changing the mask value)
annon_upload_enable=YES
annon_mkdir_write_enable=YES
Step 2: Create a Directory to Upload and Download the FTP Server
$ setfacl –d –m g::rwx /srv/ftp
$ setfacl –d –m o::rwx /srv/ftp
$ mkdir –p /srv/ftp/upload
$ mkdir –p /srv/ftp/download
$ chown ftp:ftp /srv/ftp/upload
$ chown ftp:ftp /srv/ftp/download
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 33
Step 3: Testing the FTP Server
Open a web browser in development PC or target board or FTP client like Filezilla Type the following in address
space.
ftp://<IP address of Aries board>
example ftp://10.0.3.104
Note: To learn the IP address assigned to the Aries SBC, type following command in terminal:
$ifconfig
APPENDIX C: CONFIGURATION OF HTTP SERVER
The chapter shows the steps to install an Http server installation in the Ubuntu 14.04 live operating system.
Step 1: Installing the HTTP Web Server
Open the terminal.
Switch to root user.
$ su root
$ enter the root login password
Type the command.
$ apt-get install apache2
Step 2: Create and Serve Webpages to User
Copy the desired html files to the following directory:
$ cp example.html /var/www/html/
For example to view the Diamond Systems’ homepage, copy the Diamond System homepage url to the above
mentioned directory.
$ cp Diamond.html /var/www/html/
Step 3: Testing the HTTP Server
To confirm that HTTP server works properly, type the following in the web browser address space.
http://<IP address of Aries board >
example http://10.0.0.1
A window with a message “It Works !”appears as shown on the following page.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 34
Figure 28: It Works
To view desired html files in the web browser, example to view the Diamond Systems’ homepage, type the
following in web browser address space:
http://<ipaddress of target board/ Diamond.html > (ex: http://10.0.0.1/ Diamond.html)
Note: To learn the IP address assigned to the Aries SBC, type following command in terminal:
$ifconfig
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 35
APPENDIX D: CONFIGURATION OF SSH SERVER
Step 1: Installing the SSH Server
The section shows the steps of the basic setup of a ssh server in the Ubuntu 14.04 operating system.
Switch to root user.
$ su root
$ enter the root login password
Type the command.
$ apt-get install openssh-server
Step 2: Testing the SSH Server
The Aries SBC is now a SSH server. You can browse your folders and files from a remote machine. Type ssh
username@<IP address of Aries SBC> in remote machine and provide user password of your machine.
Figure 29: Testing SSH Server
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 36
APPENDIX E: FILE TRANSFER THROUGH MINICOM
Step 1: Serial Port Configuration
First, set yourself as root user and start minicom in configuration mode with the following command:
$ minicom –s
Figure 30: Start minicom
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 37
The following window appears:
Figure 31: minicom configuration
Move to the Serial port setup and press enter to continue. The following window appears:
Figure 32: Serial Port Setup
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 38
Type A to change serial device, here /dev/ttyS0 means for serial port 1 and change S0 to S1 or S2 based
on the requirement.
Type E to change baud rate, here 115200 8N1 means 115200 baud rate, 8 bit, no parity and 1 stop bit.
Once the setting is done press enter to continue. The following window appears:
Figure 33: Save setup as dfl
Select save setup as dfl and press enter to save the setup, then press exit to proceed further. It will
display initializing modem.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 39
Step 2: File Transfer
Press ctrt+A then Z for mincom’s various option and the following window will appear:
Figure 34: Minicom Command Summary
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 40
Press s to send files , it will show the following window:
Figure 35: Press S to send file
Select any of the file transfer protocol, but in the reception side the same file transfer protocol must be
selected. After selecting press enter to continue, the following window will appear:
Figure 36: Select file to transfer
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 41
Select the Goto option:
Figure 37: Select Goto Option
Enter file name like diamond_file_sample.txt. If the file is not present in current directory, enter full file
path name in the box.
The file receiving side must be waiting to receive the file, and then go for the next step.
Press enter to send the file.
Figure 38: Press enter to send file
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 42
Figure 39: Sending files
APPENDIX F: FILE RECEPTION THROUGH MINICOM
Step 1: Serial Port Configuration
Follow the Appendix E step 1 for serial port configuration.
Step 2: File Reception
Follow the Appendix E step 2 for file reception. Instead of pressing s for sending file, press r for receiving file. The
systems will ask the user to select the file transfer protocol. Select and press enter to receive file. The file will be
received and stored in current directory.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 43
APPENDIX G: DD COMMAND FOR IMAGE BACKUP
Step 1: Introduction
There are several ways to back up a Linux system. This section provides practical examples on using the dd
command to back up the Linux system. dd is a powerful UNIX utility. It can also be used to copy data. Only a
super user can execute the dd command.
Step 2: Image Backup
Connect the SATA drive in a development PC by using SATA-DOM to USB cable or if you don’t have the
cable, boot the target board with some other hard disk (m-SATA port) where the SATA-DOM drive will be
detected as external memory card.
Become a root user and enter following command in terminal
$fdisk –l
The screen appears as follows:
Figure 40: image backup
From the above window, it is clear that /dev/sdb is the SATA-DOM drive (32.0GB).
Use the following command to make a Linux image backup:
$ dd if=/dev/sdb of=Linux_Backup_image.img
Where if is input file, of is output file
It will take a minimum of 15 minutes and the img file will be saved in current directory.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 44
Step 3: Image Restore
The image restoring medium must have same size as original medium.
Insert the restoring medium formatted in the FAT format.
Use fdisk –l command to learn about the restoring medium. Ex /dev/sdb or /dev/sdc
Once you found the device, use the following command to restore the image
Change your directory where the img file saved and run the following command
$ dd if= Linux_Backup_image.img of=/dev/sdb
It will take a minimum of 15 minutes to restore the image. Once done, the medium is ready to boot the
OS.
APPENDIX H: CREATE AND CHANGE ROOT USER PASSWORD, UBUNTU NEW USER
CREATION
Step 1: Steps to Create Root User Password
Figure 41: Steps to create root user password
Open terminal
$sudo passwd root
$enter dscguest password
It will ask you for a new password and to reenter the same password when it asks for reconfirmation.
$enter new password for root
$re-enter password for root.
It will show updated password successfully.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 45
Step 2: Steps to Change Root User Password
Figure 42: Steps to Change Root user password
Switch to root user
$su root
$enter the existing root user password
To change the root password, type as
$passwd
It will ask you for a new password and then to reenter the same password when it asks for
reconfirmation.
It will show updated password successfully.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 46
Step 3: Steps to Add a New User
Figure 43: Steps to add new user
Become root user
$su root
Once you become root user , enter " adduser username" command in
$adduser diamond
It will ask you for a password and then to reenter the same password when it asks for reconfirmation.
It will ask “Enter new value or Press enter for default”, press enter.
It will ask “Is the information correct”, enter ‘y’.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 47
APPENDIX I: LOAD UNIVERSAL DRIVER AT STARTUP
To load the Universal Driver software (dscudkp.ko) at OS boot time, the install.sh file must be executed by the OS
from /usr/local/dscud-7.00 directory. In order to run this script automatically by OS, It can call the script
from /etc/rc.local which is the correct place for custom scripts to run at boot time. Add the script file path in
/etc/rc.local file as follows:
Become root user
$su root
Open rc.local file and add script file path
$gedit /etc/rc.local
Figure 44: Load Universal Driver at Startup
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 48
APPENDIX J: DISABLE CHECK FOR UPDATES
To turn off auto-update via Ubuntu Software Center, open the Ubuntu Software Center and go to Edit --> Software
Sources. Choose "Never" for "Automatically check for updates".
Figure 45: Disable Check for updates
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 49
APPENDIX K: INSTALL ADDITIONAL UTILITIES
To install additional utilities like minicom, eclipse, g++ etc, type the following commands in terminal
$apt-get install minicom // Com port Utility
$apt-get install g++
// C++ compiler
$apt-get install gdb
// C program debugger
$apt-get install ddd
// Graphical front-end for command-line debuggers
$apt-get install eclipse
// Eclipse IDE
$apt-get install wine
// Allows Linux users to run Windows programs
$apt-get install gparted // Gnome-based partition manager
$apt-get install eclipse-cdt // C/C++ plug-in tools for Eclipse
$apt-get install myunity // Allows modification of GNOME Desktop Classic and
// Unity interfaces options in GUI
$ apt-get autoremove appmenu-gtk appmenu-gtk3 appmenu-qt // Removes
// annoying top-of-the-screen menus for all windows
APPENDIX L: SWITCH BETWEEN GNOME UNITY AND CLASSIC DESKTOP GUI
The Ubuntu 14.04 uses the Gnome Unity interface. To install the Gnome Classic interface, follow these steps:
To install the Gnome Classic interface
$apt-get install gnome-session-fallback
Once the above installation is completed , log out, and the following login screen appears:
Figure 46: Classic Desktop GUI
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 50
To choose Gnome Classic, click the Gnome symbol which is indicated in Figure 46 by the mouse pointer.
Select Gnome flash back and do login as unusual. It will login to Gnome Classic interface as follows:
Figure 47: Select desktop environment
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 51
Figure 48: Select Accessories
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 52
APPENDIX M: AUTOMATIC LOGIN OPTION
The Ubuntu-14.04 OS provides the option to automatically login. To enable the automatic login option, follow
these steps.
Step 1: Select Dash home as shown in following picture.
Figure 49: Automatic Login Option
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 53
Step 2: Type user accounts as shown in following picture and select the user accounts icon.
Figure 50: Select User Accounts
Step 3: Click the unlock option and provide dscguest’s password as shown in following picture.
Figure 51: Click Unlock and provide password
Step 4: Click Automatic login off button, it will be changed to the on position as shown in following picture.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 54
Figure 52: Click Automatic Login
APPENDIX N: SOUND RECORDING
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 55
The GUI base sound recorder utility is broken in Ubuntu-14.04 OS, so the Ubuntu community suggests using the
command line application to record sound from MIC In or Line In port. Prior to recording sound, the user has to
select the sound input from Line In or MIC input port.
To select Mic In input port, select Microphone option as shown in following picture.
Figure 53: Select Microphone Option
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 56
To select Line In input port, select Line In option as shown in following picture.
Figure 54: Select LineIn Option
To record the sound from selected input port, run the following command in terminal, to stop recording press
Ctrl+C. The recorded file will be stored in current directory.
Figure 55: Stop Recording
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 57
APPENDIX O: LINUX IMAGE RE-FLASHING
If the SATA-DOM becomes corrupted, follow the steps given in the Troubleshooting section to recover the Linux
OS.
If the Linux OS cannot be recovered, follow this section to re-flash the Linux image. The following files are present
on the DVD which received along with the Aries Software Development Kit.
Files required
Linux BSP files
Aries_Ubuntu_Image.img.7z.001
Aries_Ubuntu_Image.img.7z.002
Aries_Ubuntu_Image.img.7z.003
Aries_Ubuntu_Image.img.7z.004
Aries_Ubuntu_Image.img.7z.005
Aries_Ubuntu_Image.img.7z.006
Tool to merge all Linux BSP files
hjsplit.exe
Setup Requirements
SATA-DOM power adapter - To provide power to SATA-DOM
SATA to USB cable – To connect SATA-DOM to Linux PC via USB interface
SATA-DOM of 32GB – Target media
A development PC with Linux OS – To re-flash Linux image
A development PC with windows 7 OS – To merge Linux BSP files
Merge Linux BSP files
Run hjsplit.exe in windows PC and select Join option
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 58
Select Input file
Browse the Linux BSP file location and select the first file
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 59
Then select start button
It will create Aries_Ubuntu_Image.img.7z file in current directory of Linux BSP files.
Store Linux BSP image to SATA-DOM
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 60
Boot to Ubuntu -12.04 or any Linux OS. The SATA-DOM should be connected to the same PC through
USB slot using SATA-USB convertor, the SATA-DOM should be powered using the power adapter board.
Once the OS boots, copy the Aries_Ubuntu_Image.img.7z to a folder, right click and extract the file.
Use fdisk –l command to know identify the restoring medium. Example /dev/sdb or /dev/sdc by seeing the
size of the SATA-DOM
Once you find your device, use the following command to restore the image.
Change to the directory where the img file is saved and run the following command
$ dd if= Aries_Ubuntu_Image.img of=/dev/sdb
It will take a minimum of 45 minutes. Once done, the medium is ready to boot the OS.
Aries Linux BSP User Manual Rev A.00
www.diamondsystems.com
Page 61