Changes between Initial Version and Version 1 of DevelopmentSystem


Ignore:
Timestamp:
01/18/2019 12:41:08 AM (6 years ago)
Author:
Cale Collins
Comment:

first draft

Legend:

Unmodified
Added
Removed
Modified
  • DevelopmentSystem

    v1 v1  
     1= Ubuntu Linux Development System =
     2
     3These instructions will detail configuring a desktop workstation in the same manner as the support and development teams at Gateworks.  The command examples used within the Gateworks wiki were written and tested using this or a similar configuration. 
     4
     5Formost Ubuntu Desktop will need to be installed. 
     6
     7* https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0
     8
     9Alternately live boot Ubuntu off a USB drive or CD.
     10
     11* https://tutorials.ubuntu.com/tutorial/try-ubuntu-before-you-install#0
     12
     13Be sure to allow for your changes to be persistant when using live boot.
     14
     15* https://wiki.ubuntu.com/LiveUsbPendrivePersistent
     16
     17A VM can be used, this method is least preferable. 
     18
     19* https://askubuntu.com/questions/142549/how-to-install-ubuntu-on-virtualbox
     20
     21After these procedures are complete run "apt-get update" command.
     22
     23The following are the package and configuration changes we make at Gateworks for a Linux Development System. These are tailored towards Ubuntu 16.04 x86-64 desktop, though a newer version can be used.
     24
     25
     26== Add Local User
     27
     28Working as root can be hazardous. 
     29
     30 * Add local user called 'username'
     31{{{#!bash
     32sudo adduser username
     33}}}
     34  - "username" being the user added
     35  - follow/complete prompts
     36 * Add user 'username' to sudo group group
     37{{{#!bash 
     38sudo usermod -aG sudo username
     39}}}
     40  - This command will grant your new user sudo privileges
     41  - -aG add to group 
     42
     43
     44== OpenSSH server (allow remote ssh)
     45
     46* Install
     47{{{#!bash
     48sudo apt-get install openssh-server
     49}}}
     50 * default configuration should provide operable connections
     51* Edit {{{/etc/ssh/sshd_config}}} and set {{{PermitRootLogin yes}}}
     52* Start service (or reboot)
     53{{{#!bash 
     54/etc/init.d/ssh start
     55}}}
     56
     57== TFTP Server
     58Very popular TFTP server (recommended)
     59
     60Install the software on a Linux Desktop machine:
     61{{{#!bash
     62sudo apt-get install tftpd-hpa
     63}}}
     64
     65Modify the config file for the TFTP server software (/etc/default/tftpd-hpa) and set the directory to anything where you would like to host the files (example /var/www/html/tftpboot)
     66{{{#!bash
     67TFTP_USERNAME="tftp"
     68TFTP_DIRECTORY="/tftpboot"
     69TFTP_ADDRESS="0.0.0.0:69"
     70TFTP_OPTIONS="--secure"
     71}}}
     72
     73Be sure the tftpboot directory has modified permissions and ownership:
     74
     75{{{#!bash
     76sudo mkdir /tftpboot
     77sudo chmod -R 777 /tftpboot
     78sudo chown -R nobody /tftpboot
     79}}}
     80
     81To re-start after re-configure:
     82{{{#!bash
     83sudo service tftpd-hpa restart
     84}}}
     85
     86
     87== Development Tools
     88* install common dev toos:
     89{{{#!bash
     90sudo apt-get install build-essential git curl wget
     91}}}
     92
     93== Screen
     94Screen is an excellent terminal program as well as remote shell/session manager.
     95
     96{{{#!bash
     97sudo apt-get install screen
     98}}}
     99
     100Additionally you may want to customize your ~/.screenrc for scrolling via mousewheel etc:
     101{{{#!bash
     102cat ~/.screenrc
     103defscrollback 5000
     104
     105logfile /tmp/screenlog
     106
     107# Escale sequence
     108#escape ^uu
     109
     110# enable scrolling in the terminal (not necessarily in the screen session)
     111# if scrollback is scrolling through command history then you need to
     112# enter scrollback 'copy mode' via Crtl+a Esc
     113termcapinfo xterm* ti@:te@
     114
     115# status
     116hardstatus alwayslastline "%{= kw}%{g}[%=%{ =kw}%{w}%-w%{Y}[%{W}%n-%t%{Y}]%{w}%+w%=%{g}]"
     117}}}
     118
     119If you encounter terminal type issues you can usually fix these by resizing your terminal to 80x24 and setting term type via:
     120{{{#!bash
     121export TERM=screen
     122}}}
     123
     124Logging:
     125* the above .screenrc sets 'logfile' to /tmp/screenlog. Otherwise it defaults to 'screenlog.0' in your current directory
     126* start screen with -L to enable logging (to logfile, which is defaulted to /tmp/screenlog if you use the .screenrc above). This will only log the first window
     127* to change the logfile name use cntl-A + : + logfile <name>
     128* to toggle logging use cntl-A H
     129* to dump the current scrollback buffer to a log use cntl-A h which will dump to 'hardcopy.<n>'
     130
     131
     132== Conclusion
     133
     134See our [http://trac.gateworks.com/wiki/TitleIndex index] to locate instructions for installing Jtag_usbv4 and BDK's. 
     135