| 1 | = Ubuntu Linux Development System = |
| 2 | |
| 3 | These 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 | |
| 5 | Formost Ubuntu Desktop will need to be installed. |
| 6 | |
| 7 | * https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0 |
| 8 | |
| 9 | Alternately live boot Ubuntu off a USB drive or CD. |
| 10 | |
| 11 | * https://tutorials.ubuntu.com/tutorial/try-ubuntu-before-you-install#0 |
| 12 | |
| 13 | Be sure to allow for your changes to be persistant when using live boot. |
| 14 | |
| 15 | * https://wiki.ubuntu.com/LiveUsbPendrivePersistent |
| 16 | |
| 17 | A VM can be used, this method is least preferable. |
| 18 | |
| 19 | * https://askubuntu.com/questions/142549/how-to-install-ubuntu-on-virtualbox |
| 20 | |
| 21 | After these procedures are complete run "apt-get update" command. |
| 22 | |
| 23 | The 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 | |
| 28 | Working as root can be hazardous. |
| 29 | |
| 30 | * Add local user called 'username' |
| 31 | {{{#!bash |
| 32 | sudo adduser username |
| 33 | }}} |
| 34 | - "username" being the user added |
| 35 | - follow/complete prompts |
| 36 | * Add user 'username' to sudo group group |
| 37 | {{{#!bash |
| 38 | sudo 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 |
| 48 | sudo 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 |
| 58 | Very popular TFTP server (recommended) |
| 59 | |
| 60 | Install the software on a Linux Desktop machine: |
| 61 | {{{#!bash |
| 62 | sudo apt-get install tftpd-hpa |
| 63 | }}} |
| 64 | |
| 65 | Modify 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 |
| 67 | TFTP_USERNAME="tftp" |
| 68 | TFTP_DIRECTORY="/tftpboot" |
| 69 | TFTP_ADDRESS="0.0.0.0:69" |
| 70 | TFTP_OPTIONS="--secure" |
| 71 | }}} |
| 72 | |
| 73 | Be sure the tftpboot directory has modified permissions and ownership: |
| 74 | |
| 75 | {{{#!bash |
| 76 | sudo mkdir /tftpboot |
| 77 | sudo chmod -R 777 /tftpboot |
| 78 | sudo chown -R nobody /tftpboot |
| 79 | }}} |
| 80 | |
| 81 | To re-start after re-configure: |
| 82 | {{{#!bash |
| 83 | sudo service tftpd-hpa restart |
| 84 | }}} |
| 85 | |
| 86 | |
| 87 | == Development Tools |
| 88 | * install common dev toos: |
| 89 | {{{#!bash |
| 90 | sudo apt-get install build-essential git curl wget |
| 91 | }}} |
| 92 | |
| 93 | == Screen |
| 94 | Screen is an excellent terminal program as well as remote shell/session manager. |
| 95 | |
| 96 | {{{#!bash |
| 97 | sudo apt-get install screen |
| 98 | }}} |
| 99 | |
| 100 | Additionally you may want to customize your ~/.screenrc for scrolling via mousewheel etc: |
| 101 | {{{#!bash |
| 102 | cat ~/.screenrc |
| 103 | defscrollback 5000 |
| 104 | |
| 105 | logfile /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 |
| 113 | termcapinfo xterm* ti@:te@ |
| 114 | |
| 115 | # status |
| 116 | hardstatus alwayslastline "%{= kw}%{g}[%=%{ =kw}%{w}%-w%{Y}[%{W}%n-%t%{Y}]%{w}%+w%=%{g}]" |
| 117 | }}} |
| 118 | |
| 119 | If you encounter terminal type issues you can usually fix these by resizing your terminal to 80x24 and setting term type via: |
| 120 | {{{#!bash |
| 121 | export TERM=screen |
| 122 | }}} |
| 123 | |
| 124 | Logging: |
| 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 | |
| 134 | See our [http://trac.gateworks.com/wiki/TitleIndex index] to locate instructions for installing Jtag_usbv4 and BDK's. |
| 135 | |