Prereq's:
1. Need an ubuntu CD (Alternate or desktop CD should work)
2. Need a broadband connection (for updates and needed packages)
3. Need a computer with a free disk partition, or enough free space to shrink an existing partition (backup first!), OR vmware-player or VirtualBox to install it into a virtual machine (allows using linux on windows), setting up vmware-player or VirtualBox (http://virtualbox.org) to do this is beyond the scope of this document but I can assist users if requested.
First, install ubuntu. (stick in CD, boot off of it, Double Click the "Install" Icon in the gui follow prompts until done, it's pretty easy that an 8-18 year old should have little trouble with that part, if you get confused, call a neighborhood kid over to help you)
Next part. Login to your ubuntu install.
Then, open a Terminal (Go to top panel, upper left, it's under the Applications menu. in the Accessories submenu)
In this terminal run
- Code: Select all
sudo apt-get update
Now run
- Code: Select all
sudo apt-get upgrade
Once it comes back up, relogin and open a terminal again. (Applications->Accessories->Terminal)
Now we install all the stuff megatunix needs in one shot.
run this:
- Code: Select all
sudo apt-get install libtool libgtkglext1-dev g++ gcc flex bison glade-gnome-2 libglade2-dev make cvs gdb automake1.9
NOTE: For Ubuntu 9.10, use this line instead:
- Code: Select all
sudo apt-get install libtool libgtkglext1-dev g++ gcc flex bison glade-2 libglade2-dev make cvs gdb automake1.9
It'll prompt you for download a block of stuff, hit Y and got have a cup of coffee or a beer, or a smoke, or whatever floats your boat.
OK, you've gotten everything installed needed to compile megatunix from source or CVS.
Downloading and compiling a MegaTunix tarball
Run the Firefox browser and go to http://sourceforge.net/projects/megatunix scroll down and download the latest version (0.9.16 is up there now as of this writing)
Firefox will ask you if you want to open the file with an application or to Save to Disk. Select "Save to disk". Firefox by default puts everything on your desktop, so in that same terminal run
- Code: Select all
cd ~/Desktop
If you do an "ls" (list files, equal to "dir" on DOS/windows) you should see
- Code: Select all
megatunix-0.x.y.tar.gz
- Code: Select all
tar xvzf megatunix-x.y.z.tar.gz
"cd" (change directory) into the megatunix dir,
- Code: Select all
cd megatunix-0.<TAB> then <ENTER>
- Code: Select all
./configure ; make
It should complete in a couple minutes. When it is cone compiling run
- Code: Select all
sudo make install
END of procedure for users NOT wanting to use CVS
Downloading and compiling MegaTunix from CVS
To get a copy from CVS run these commands:
- Code: Select all
cd
mkdir cvs
cd cvs
For CVS, what you are going to do is to "checkout" a "working copy" from the repository stored on the sourceforge.net servers. You ONLY need to check it out once, once you have it you update with a single command below. When I make a change on my main system, I commit it to the repository. Users would then be able to run one command to get all my changes and their SOURCE tree would be completely up to date. It's good for users who want to get the very latest of megatunix in between releases (bugfixes or new features)
NOW for those that have been given DEVELOPER permissions (you know who you are) to CVS you run a couple different commands. If you don't know if you have developer permissions, then you probably don't so follow the Anonymous CVS procedure below:
Anonymous CVS Login
From within ~/cvs run:
- Code: Select all
cvs -d:pserver:anonymous@megatunix.cvs.sourceforge.net:/cvsroot/megatunix login
Hit enter when it prompts for a password. It may print an error saying cannot create /home/username/.cvspass. This can be safely ignored...
Anonymous CVS Checkout
Typically when using a CVS checkout you want to be on a specific developmental branch that I'm on. (I work on branches and merge to head for release, don't worry if this makes no sense to you)
When I tell people to use a CVS checkout I'll typically tell them to use a branch tag, you need to specify that tag to get the right code
I name my tags like PRE_0_9_19-branch. (current branch as of 6/15/09). so use the appropriate text for TAGNAME below.
- Code: Select all
cvs -z3 -d:pserver:anonymous@megatunix.cvs.sourceforge.net:/cvsroot/megatunix co -r TAGNAME -P MegaTunix
Goto the "Compiling a CVS snapshot" section BELOW.
DEVELOPER CVS Checkout
You need to know your sourceforge.net username/password to use this method.
First off, sourceforge.net developer CVS runs across an SSH connection, so the proper environment variable needs to be set:
- Code: Select all
export CVS_RSH=ssh
If you're a developer you should stick that line into your ~/.bashrc or ~/.bash_profile file. On Unix/Linux systems, "~/" is shorthand for "home directory", so "~/.bash_profile" is analagous to /home/dave/.bashrc assuming your username was "dave". The .bashrc file sets up aliases and environment variables used throughout your session.
- Code: Select all
cvs -d:ext:username@megatunix.cvs.sourceforge.net:/cvsroot/megatunix co -P MegaTunix
Replace username with your sourceforge.net use name. If you've never logged onto sourceforge.net it'll prompt you with a warning like:
- Code: Select all
The authenticity of host 'megatunix.cvs.sf.net (66.35.250.207)' can't be established.
DSA key fingerprint is 02:ab:7c:aa:49:ed:0b:a8:50:13:10:c2:3e:92:0f:42.
Are you sure you want to continue connecting (yes/no)?
Answer "Yes" to this.
It will prompt you for your sourceforge.net password in most cases. (It will NOT prompt if you have submitted a valid SSH key to sourceforge.net, if you don't know what an SSH key is don't worry)
End of developer CVS checkout routine
Compiling a CVS snapshot of MegaTunix (Applies to developer AND anonymous CVS access
- Code: Select all
cd ~/cvs/MegaTunix
./autogen.sh
make
If that succeeds without dying run:
- Code: Select all
sudo make install
It's now READY to RUN!!!
Now, if you want to keep up to date with changes as I commit them in between releases, that's even easier..
just cd into the MegaTunix directory:
- Code: Select all
cd ~/cvs/MegaTunix
and update your CVS to current
IF you want to change tags (i.e. if I did), specify the tag name preceded by a -r (-r = revision)
so to update to a specific tag use (an example would be PRE_0_9_19-branch)
- Code: Select all
cvs update -r TAGNAME -dP
otherwise
- Code: Select all
cvs update -dP
then rebuild;
- Code: Select all
./autogen.sh ; make clean ; make ; sudo make install
And you're up to date and running on the bleeding edge
To run MegaTunix, you should be able to run "megatunix" from any open terminal, or you can create a new icon (or launcher) on the desktop, though having it run from a terminal will show you output that might otherwise not be visible.
It sounds long and hard but in practice it really isn't.
NOTE about serial ports:
Under linux (and most unix's in general) all device drivers are accessed through "files" (In Unix/Linux basically EVERYTHING is a file) in a directory called /dev (or /devices on sun) Serial ports are known typically as /dev/ttySx with x being a number starting from 0 and going up. (/dev/ttyS0 = COM1 on windows, /dev/ttyS1 is COM2 and so on) For those of you with USB to serial adapters, they are usually named a little bit differently, typically /dev/ttyUSBx with x starting and 0 and going up. On MAC OS-X there tends to be multiple devices per serial port (because OS-X is based on the BSD codebase), /dev/ttyS's and /dev/cuax's. In megatunix's case you want the cua device instead of the tty one as some users have reported that the cua one worked but the tty one did NOT as the CUA one is a "raw callout device" and not just a text device (like os-X consider's some of it's tty's to be)
So, in megatunix the first thing most users need to change is the serial port, and that's on the "General" tab. The text will change from to red when you've made a change but NOT committed it (gotta hit enter to make megatunix try that device, notice the status messages below that box as it'll say if the device could be opened or not. Watch the titlebar for feedback as well. If you found an open port but no ECU, make sure that your ECU is powered up, and that you're actually using the right port (many computers have two serial ports), so try the other one just in case..
Enjoy!
David J. Andruczyk
MegaTunix Author
Updated 04/22/2008

