Sedona on Ubuntu Linux - Howto

982 views
Skip to first unread message

patrick

unread,
Aug 3, 2009, 4:08:18 PM8/3/09
to Sedona Framework
Here's a quick "how-to" to compile Sedona on Ubuntu using the latest
source code. It will probably work on any Debian based system. To
use it with Red-Hat or Fedora, you'll probably only need to use a
different package manager (rather than apt-get).

Enter the following lines into your Linux terminal:

sudo apt-get install mercurial jikes sun-java6-jdk
mkdir -p ~/repos/sedona-1.0
ln -s -T ~/repos/sedona-1.0 ~/sedonadev
cd ~/sedonadev
hg clone http://sedonadev.org/repos/sedona-1.0/
hg -R ~/sedonadev pull && hg -R ~/sedonadev update
bash --rcfile ~/sedonadev/adm/unix/init.sh
makeunixdev
exit

Now here's a brief explanation: The first line installs some package
dependencies. The second line makes some folders in your home
directory where the files will be stored (you might want to put them
somewhere else). The third line makes a symbolic link (the rest of
the commands would have to be modified individually if you chose a
different location - so we use a link so that they "appear" to be in
the location at ~/sedonadev). The fourth line puts you in the folder
where we're working. All of the above will be familiar to Ubuntu
users of the command line.

The fifth line creates a clone of the Sedona mercurial repository.

The sixth line is not necessary since you have a clone, but you might
want to use it later (like tomorrow or next week). The first part
pulls changes from the repository and the second part updates the
files on your machine that are out of date.

The seventh line starts a bash shell (inside your current shell) and
initializes some special environment variables.

'makeunixdev' is an alias for 'makeunixdev.py' which is a python
script that calls a few python scripts to build sedona.jar,
sedonac.jar, the SVM, and all the kits.

'exit' just exits the bash shell. You might want to stay in it and
run the SVM. I have a desktop shortcut that opens the bash shell like
that each time. From there it is easy to rebuild everything or run a
virtual machine from the command line.

To run the SVM using the example code enter the following commands:

sedonac ~/sedonadev/apps/test.sax
sedonac ~/sedonadev/scode/x86-test.xml
svm ~/sedonadev/scode/x86-test.scode ~/sedonadev/apps/test.sab

Patrick Cunningham

unread,
Aug 3, 2009, 4:24:14 PM8/3/09
to Sedona Framework
Correction - try this instead:

hg clone http://hg.sedonadev.org/repos/sedona-1.0/

Matthew

unread,
Aug 3, 2009, 4:36:47 PM8/3/09
to Sedona Framework
Another option is to source the init.sh in your login script. If you
are running bash

1. edit ~/.bashrc
2. Append the following lines:

# source Sedona environment
. ~/sedonadev/adm/unix/init.sh

3. Save

Now, every terminal/shell you open will be initialized for Sedona
development.

See also: http://sedonadev.org/doc/setup.html#unix

On Aug 3, 4:08 pm, patrick <pcunning...@tridium.com> wrote:
> Here's a quick "how-to" to compile Sedona on Ubuntu using the latest
> source code.  It will probably work on any Debian based system.  To
> use it with Red-Hat or Fedora, you'll probably only need to use a
> different package manager (rather than apt-get).
>
> Enter the following lines into your Linux terminal:
>
> sudo apt-get install mercurial jikes sun-java6-jdk
> mkdir -p ~/repos/sedona-1.0
> ln -s -T ~/repos/sedona-1.0 ~/sedonadev
> cd ~/sedonadev
> hg clonehttp://sedonadev.org/repos/sedona-1.0/

Patrick Cunningham

unread,
Aug 4, 2009, 2:08:17 PM8/4/09
to Sedona Framework
If you don't want to bother with mercurial, you could do this:

sudo apt-get install jikes sun-java6-jdk wget unzip
cd ~
wget -c http://www.sedonadev.org/download/build/Sedona-1.0.43.zip
mkdir -p ~/repos/sedona-1.0
unzip ~/Sedona-1.0.43.zip -d ~/repos/sedona-1.0/
ln -s -T ~/repos/sedona-1.0 ~/sedonadev
chmod ug+x ~/sedonadev/bin/*.sh

Patrick Cunningham

unread,
Aug 6, 2009, 11:13:00 AM8/6/09
to Sedona Framework
I had a little trouble with the clone command today. It was not
creating the ".hg" folder. Perhaps I was using it incorrectly. Here
are a complete set of revised commands:

sudo apt-get install mercurial jikes sun-java6-jdk
mkdir ~/repos
hg clone http://hg.sedonadev.org/repos/sedona-1.0/ ~/repos/sedona
ln -s -T ~/repos/sedona ~/sedonadev
hg -R ~/sedonadev pull && hg -R ~/sedonadev update
bash --rcfile ~/sedonadev/adm/unix/init.sh
makeunixdev
sedonac ~/sedonadev/apps/test.sax
sedonac ~/sedonadev/scode/x86-test.xml
svm ~/sedonadev/scode/x86-test.scode ~/sedonadev/apps/test.sab

You now have a virtual machine running on Ubuntu. Press Ctrl+C to
cancel. Type exit to leave the bash shell.

Note: init.sh assumes that you have set up a symbolic link at ~/
sedonadev that points to your local repository.
Reply all
Reply to author
Forward
0 new messages