Version 9 (modified by 3 years ago) ( diff ) | ,
---|
Ubuntu Linux Development System
These instructions will detail configuring a desktop / laptop 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.
- Install Ubuntu
- Ubuntu Xenial (16.04LTS) recommended at this time (* Ubuntu Bionic (18.04LTS) is still being validated by Gateworks engineers )
- Alternately live boot Ubuntu off a USB drive or CD.
- https://tutorials.ubuntu.com/tutorial/try-ubuntu-before-you-install#0
- Be sure to allow for your changes to be persistent when using live boot.
After installing Ubuntu, 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.
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=":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
For more information see tftpserver.
Development Tools
Install common dev toos:
sudo apt-get install build-essential git curl wget
Configure Git to use 12 character SHA. This can potentially prevent version magic errors when building out of tree modules.
git config --global core.abbrev 12
To verify, go to your kernel build directory and execute the following command.
git rev-parse --short HEAD
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.