Mono can either be transferred through scp from a linux machine or windows box running cygwin or transferred through the USB mass storage partition of your Edison's flash memory. For instructions on transferring files using USB mass storage see transferring files through USB.
Move the mono tar or tar.bz2 file to an empty temporary directory for compilation.
tar
command in the current version of the Edison Yocto
image a flat copy or zipped version of mono source should be created on a separate machine and
transferred to the temporary folder instead of extracting the tar ball downloaded from mono-project.com
directly. If a zipped file is used to reduce transfer time the command
unzip mono-version.zip -d directory
can be used to extract the source files.
Steps taken from mono-project.com: How to make a smaller Mono install
Configuring, Compiling, and installing mono from source will take many hours(4). Make sure you have a reliable power connection and can leave your Edison module sitting for most of a day before beginning this process.
cd
into the directory containing your mono source. An ls
should look
something like this:
AUTHORS | config.sub | mkinstalldirs |
COPYING.LIB | configure | mono |
ChangeLog | configure.ac | mono-core.spec |
LICENSE | data | mono-core.spec.in |
Makefile.am | depcomp | mono-uninstalled.pc.in |
Makefile.in | docs | msvc |
NEWS | eglib | po |
README.md | external | runtime |
acinclude.m4 | ikvm-native | samples |
aclocal.m4 | install-sh | scripts |
autogen.sh | libgc | support |
build-mingw32.sh | ltmain.sh | test-driver |
compile | m4 | tools |
config.guess | man | winconfig.h |
config.h.in | mcs | |
config.rpath | missing |
Configure for minimal build
chmod a+x ./configure
mkdir /mono
./configure --enable-minimal=aot,profiler --prefix="/mono"
chmod a+x scripts/*
chmod a+x ./*sh
chmod a+x ./*/*sh
chmod a+x ./*/*/*sh
chmod a+x ./*/*/*/*sh
chmod a+x ./*/*/*/*/*sh
chmod a+x ./*/*/*/*/*/*sh
make CFLAGS=-Os
Create a mono/lib folder in your home directory and link to in in the /mono folder
mkdir ~/.local
mkdir ~/.local/mono
mkdir ~/.local/mono/lib
ln -s ~/.local/mono/lib /mono/lib
This will allow the mono libraries to install without consuming all of you root directory space.
Install mono from the compilation directory.
make install
Create mono and mcs(compiler) links in you /usr/bin folder
ln -s /mono/bin/mono /usr/bin/mono
ln -s /mono/bin/mcs /usr/bin/mcs
It is now safe to remove the Mono source files from your Edison module freeing ~1GB of space. All you
need to do is remove the directory you extracted the mono source code into and your done. This can be
done using the rm
command. Be careful with this command as it is easy to delete things you
didn't mean to silently and anything removed is removed permanently.
cd ../
rm -rf ./mono-source
Note: "mono-source" is the directory you created when extracting mono's source code.
Mono should now be installed on your Edison board. You can compile 32-bit .net console applications in
either mono develop, Visual Studio, or your Edison using mcs
and run them using the
mono app.exe
command.