Axoloti software installation (ubuntu 32bit)


#21

Thanks for your help. Have tried again (same machine, having renamed the original axoloti folder so as not to overwrite it).
This time was definitely from cloning the git directory but gives exactly the same error as above
[javac] public final static String AXOLOTI_VERSION = "fatal: Not a git repository

Also, not managed to get

git submodule update --init --recursive

to run - which folder does it run from & at what stage in the process? Currently running it from within the axoloti folder gives the same error:

fatal: Not a git repository (or any parent up to mount point /home/doris)

I'm not clear if compiling from source covers both the files in the normal installation (runtime & app bundle)?

Sorry for being clueless. I do have it working now, but having got this far, would like to replicate it & leave a description of how to do it on 32bit Debian for others. Yes, never built anything from source before, so I'm basically typing these things in without really understanding them...thanks.


#22

how are you cloning the repository?
are you running this in the directory into which you cloned?
(obviously the error your getting implies it is not a repository... )

the git submodule command is run in the axoloti directory you cloned, immediately after you have cloned the it.

yes, running the build.sh will ensure you have the runtime environment required.


#23

Doh! - I was using https://github.com/JohannesTaelman/axoloti.git
and it should be
git clone https://github.com/axoloti/axoloti.git
Yes it all works beautifully now - I'll put the commands all in one post.
Nice one - thanks Mark for helping me along.
Library works now, interestingly doing "git checkout master" in axoloti-contrib & -factory doesn't seem to do anything.


#24

[Edited to get the sudos in the right place]
How to compile axoloti on 32 bit LinuxMint 17, from source:
make sure you have the JDK installed, as per the instructions...OpenJDK Java 1.7 will do.
also install git if you haven't:

sudo apt-get install git

cloning from git makes a folder called axoloti - I started in home/Software & opened a terminal there

sudo git clone https://github.com/axoloti/axoloti.git
cd axoloti
sudo git submodule update --init --recursive
cd axoloti-contrib
sudo git checkout master
cd ..
cd axoloti-factory
sudo git checkout master
cd ..
cd platform_linux
nano build.sh

this edits the file, nano is a text editor - you could use gedit or similar.
add "|LinuxMint" (look in /etc/lsb-release and copy whatever comes after DISTRIB_ID=)
& remove references to lib32z1 lib32ncurses5 lib32bz2-1.0 files in both lines of build.sh (just stick a comment # in front of the file names after curl)
20 or so lines down, it should now look like this:
case $OS in
Ubuntu|Debian|LinuxMint)
echo "apt-get install -y libtool libudev-dev automake autoconf ant curl" # lib32z1 lib32ncurses5 lib32bz2-1.0"
sudo apt-get install -y libtool libudev-dev automake autoconf \
ant curl # lib32z1 lib32ncurses5 lib32bz2-1.0
then exit, saving changes

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install zlib1g:i386 libncurses5:i386 libbz2-1.0:i386
./build.sh

terminal now happily chuntering away: takes 5-10 mins to compile

cd ..
ant

then click on Axoloti.sh to run.


#25

The first (old) link just redirects to the 2nd (new) link, I'd be surprised if that 'd caused any issues.


#26

You're quite right - just tried (with my newfound confidence) & now compiles with both.
It seems to need sudo for the commands above.


#27

minor detail

sudo nano build.sh

does not need sudo


#28

have edited the post above so sudo's are in the right place! chuffed to be up & running thanks.


#29

Thanks @fuzzySi for following this all the way through!
its this kind of participation, that makes a strong community!
thank you

I'll send you a PM with my email, perhaps you can email me with your final build.sh,
and I can then 'diff' it, and adapt it, so it works 'out of the box' for other linux mint users in the future.

I'll also edit the 'read me ' file, to contain the above instructions.

(btw you should do the same to axoloti-contrib as you did for axoloti-factory)


#30

Thank you for your encouragement! Yes would be good to have this available to others more easily - will send you the final build.sh file.
Does the post above show axoloti-contrib correctly?


#31

This is my version of the build.sh file - actually only 3 changes - add LinuxMint & commented out some files

!/bin/bash

set -e

echo -e "\n\nAxoloti Install script for Linux"
echo -e "This will install Axoloti"
echo -e "Use at your own risk\n"
echo -e "Some packages will be installed with apt-get,"

echo -e "and all users will be granted permission to access some USB devices"
echo -e "For this you'll require sudo rights and need to enter your password...\n"

echo -e "Press RETURN to continue\nCTRL-C if you are unsure!\n"

read

PLATFORM_ROOT="$(cd $(dirname $0); pwd -P)"

ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
if [ -f /etc/lsb-release ]; then
. /etc/lsb-release
OS=$DISTRIB_ID
elif [ -f /etc/debian_version ]; then
OS=Debian # XXX or Ubuntu??
elif [ -f /etc/arch-release ]; then
OS=Archlinux
else
OS=$(uname -s)
fi

case $OS in
Ubuntu|Debian|LinuxMint) # add linux Mint and comment out libraries below
echo "apt-get install -y libtool libudev-dev automake autoconf ant curl" # lib32z1 lib32ncurses5 lib32bz2-1.0"
sudo apt-get install -y libtool libudev-dev automake autoconf \
ant curl # lib32z1 lib32ncurses5 lib32bz2-1.0
;;
Archlinux|Arch)
echo "pacman -Syy"
sudo pacman -Syy
echo "pacman -S --noconfirm apache-ant libtool automake autoconf curl lib32-ncurses lib32-bzip2"
sudo pacman -S --noconfirm apache-ant libtool automake autoconf curl \
lib32-ncurses lib32-bzip2
;;
*)
echo "Cannot handle dist: $OS"
exit
;;
esac

cd "$PLATFORM_ROOT"

./add_udev_rules.sh

mkdir -p "${PLATFORM_ROOT}/bin"
mkdir -p "${PLATFORM_ROOT}/lib"
mkdir -p "${PLATFORM_ROOT}/src"

if [ ! -d "${PLATFORM_ROOT}/../chibios" ];
then
cd "${PLATFORM_ROOT}/src"
CH_VERSION=2.6.9
ARDIR=ChibiOS_${CH_VERSION}
ARCHIVE=${ARDIR}.zip
if [ ! -f ${ARCHIVE} ];
then
echo "##### downloading ${ARCHIVE} #####"
curl -L http://sourceforge.net/projects/chibios/files/ChibiOS_RT%20stable/Version%20${CH_VERSION}/${ARCHIVE} > ${ARCHIVE}
else
echo "##### ${ARCHIVE} already downloaded #####"
fi
unzip -q -o ${ARCHIVE}
mv ${ARDIR} chibios
cd chibios/ext
unzip -q -o ./fatfs-0.9-patched.zip
cd ../../
mv chibios ../..
else
echo "##### chibios directory already present, skipping... #####"
fi

if [ ! -f "$PLATFORM_ROOT/bin/arm-none-eabi-gcc" ];
then
cd "${PLATFORM_ROOT}/src"
ARCHIVE=gcc-arm-none-eabi-4_9-2015q2-20150609-linux.tar.bz2
if [ ! -f ${ARCHIVE} ];
then
echo "downloading ${ARCHIVE}"
curl -L https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q2-update/+download/$ARCHIVE > $ARCHIVE
else
echo "${ARCHIVE} already downloaded"
fi
tar xfj ${ARCHIVE}
cp -rv gcc-arm-none-eabi-4_9-2015q2/* ..
rm -r gcc-arm-none-eabi-4_9-2015q2
else
echo "bin/arm-none-eabi-gcc already present, skipping..."
fi

if [ ! -f "$PLATFORM_ROOT/lib/libusb-1.0.a" ];
then
cd "${PLATFORM_ROOT}/src"
ARDIR=libusb-1.0.19
ARCHIVE=${ARDIR}.tar.bz2
if [ ! -f ${ARCHIVE} ];
then
echo "##### downloading ${ARCHIVE} #####"
curl -L http://sourceforge.net/projects/libusb/files/libusb-1.0/$ARDIR/$ARCHIVE/download > $ARCHIVE
else
echo "##### ${ARCHIVE} already downloaded #####"
fi
tar xfj ${ARCHIVE}

cd "${PLATFORM_ROOT}/src/libusb-1.0.19"

patch -N -p1 < ../libusb.stdfu.patch

./configure --prefix="${PLATFORM_ROOT}"
make
make install

else
echo "##### libusb already present, skipping... #####"
fi

if [ ! -f "${PLATFORM_ROOT}/bin/dfu-util" ];
then
cd "${PLATFORM_ROOT}/src"
ARDIR=dfu-util-0.8
ARCHIVE=${ARDIR}.tar.gz
if [ ! -f $ARCHIVE ];
then
echo "##### downloading ${ARCHIVE} #####"
curl -L http://dfu-util.sourceforge.net/releases/$ARCHIVE > $ARCHIVE
else
echo "##### ${ARCHIVE} already downloaded #####"
fi
tar xfz ${ARCHIVE}

cd "${PLATFORM_ROOT}/src/${ARDIR}"
./configure --prefix="${PLATFORM_ROOT}" USB_LIBS="${PLATFORM_ROOT}/lib/libusb-1.0.a -ludev -pthread" USB_CFLAGS="-I${PLATFORM_ROOT}/include/libusb-1.0/"
make
make install
make clean
ldd "${PLATFORM_ROOT}/bin/dfu-util"

else
echo "##### dfu-util already present, skipping... #####"
fi

case $OS in
Ubuntu|Debian|LinuxMint) # linux mint added
echo "apt-get install openjdk-7-jdk"
sudo apt-get install openjdk-7-jdk
;;
Archlinux)
echo "pacman -Syy jdk7-openjdk"
sudo pacman -S --noconfirm jdk7-openjdk
;;
esac

echo "##### compiling firmware... #####"
cd "${PLATFORM_ROOT}"
./compile_firmware.sh

echo "##### building GUI... #####"
cd "${PLATFORM_ROOT}"/..
ant

echo "DONE"


#32

Wouldn't it be easier to do all this on github?


#33

yes, but as OP said, he wasn't that familiar with git, I thought I would take it and review it.
of course, if you are familiar with shell scripting and git, please feel free to review, make changes and submit a PR. (Im a bit busy moving houses at the moment)


#34

Hey,

First of all, my specs:
- 6 year old thinkpad going strong!
- running Linux Mint 18.1 Serena 32-bit (Ubuntu 16.04 package base - Long Term Support)
- 32 bit

I tried installing following almost all instructions here - I even reinstalled my system especially for Axoloti - not kidding - but I did not realize i386 architecture was a problem :-/

When I run build.sh (the first one with some edits and the last one here posted by fuzzySi)

I get the following errors:

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-openjdk-i386/lib/tools.jar
Buildfile: /home/moi/axoloti/axoloti/build.xml

BUILD FAILED
/home/moi/axoloti/axoloti/nbproject/build-impl.xml:911: The following error occurred while executing this line:
/home/moi/axoloti/axoloti/nbproject/build-impl.xml:261: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-8-openjdk-i386/jre"

Greetz
dywen


#35

If your building Axoloti you need to install the java JDK , looks like you only have the JRE installed


#36

For the record:
Via Synaptic (package manager) I installed default-jdk

------>

BUILD SUCCESSFUL
Total time: 22 seconds
DONE

Thanks!
The first patch gave me sinus waves :smile: