Version 3 (modified by 6 years ago) ( diff ) | ,
---|
Ubuntu Linux Development System
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.
Foremost Ubuntu Desktop will need to be installed.
Alternately live boot Ubuntu off a USB drive or CD.
Be sure to allow for your changes to be persistant when using live boot.
A VM can be used, this method is least preferable.
After these procedures are complete run "apt-get update" command.
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.
Add Local User
Working as root can be hazardous.
- Add local user called 'username'
sudo adduser username
- "username" being the user added
- follow/complete prompts
- Add user 'username' to sudo group group
sudo usermod -aG sudo username
- This command will grant your new user sudo privileges
- -aG add to group
OpenSSH server (allow remote ssh)
- Install
sudo apt-get install openssh-server
- default configuration should provide operable connections
- Edit
/etc/ssh/sshd_config
and setPermitRootLogin yes
- Start service (or reboot)
/etc/init.d/ssh start
TFTP Server
Very popular TFTP server (recommended)
Install the software on a Linux Desktop machine:
sudo apt-get install tftpd-hpa
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)
TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure"
Be sure the tftpboot directory has modified permissions and ownership:
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
To re-start after re-configure:
sudo service tftpd-hpa restart
Development Tools
- install common dev toos:
sudo apt-get install build-essential git curl wget
Screen
Screen is an excellent terminal program as well as remote shell/session manager.
sudo apt-get install screen
Additionally you may want to customize your ~/.screenrc for scrolling via mousewheel etc:
cat ~/.screenrc defscrollback 5000 logfile /tmp/screenlog # Escale sequence #escape ^uu # enable scrolling in the terminal (not necessarily in the screen session) # if scrollback is scrolling through command history then you need to # enter scrollback 'copy mode' via Crtl+a Esc termcapinfo xterm* ti@:te@ # status hardstatus alwayslastline "%{= kw}%{g}[%=%{ =kw}%{w}%-w%{Y}[%{W}%n-%t%{Y}]%{w}%+w%=%{g}]"
If you encounter terminal type issues you can usually fix these by resizing your terminal to 80x24 and setting term type via:
export TERM=screen
Logging:
- the above .screenrc sets 'logfile' to /tmp/screenlog. Otherwise it defaults to 'screenlog.0' in your current directory
- 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
- to change the logfile name use cntl-A + : + logfile <name>
- to toggle logging use cntl-A H
- to dump the current scrollback buffer to a log use cntl-A h which will dump to 'hardcopy.<n>'
Conclusion
See our index to locate instructions for installing Jtag_usbv4 and BDK's.