Difference between revisions of "GettingTheGCSRunningonAGumstixBoard"

From PaparazziUAV
Jump to navigation Jump to search
Line 413: Line 413:
   615  ocamlfind list
   615  ocamlfind list


    7  apt-get install openssh-server
  33  sudo apt-get install bzip2 git-core make gcc g++ gnuplot glade imagemagick libpcre3-dev libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4
  34  login
  35  ocaml info pcre-ocaml
  36  opam info pcre-ocaml
  37  opam init
#Add more space
  39  mkfs.ext3 /dev/mmcblk0p3
  40  vol_id --uuid /dev/mmcblk0p3
  41  blkid /dev/mmcblk0p3
  42  vim /etc/fstab
  43  mv /home /oldHome
  45  mkdir /home
  46  mount /home
  47  mount
  48  mv /oldHome/* /home/
  49  rmdir /oldHome/
  60  opam install ocamlnet
  61  exit
  62  echo $DISPLAY
  63  xterm
  64  cd ~sergiu/paparazzi
  65  ./paparazzi
  67  vim pprz_src_test.sh
  69  vim Makefile
  70  vim sw/simulator/Makefile
  76  ./paparazzi
  79  ps aux|grep make
  81  opam install ocamlnet
  82  cd /root/.opam/system/build/ocamlnet.3.6.0/src/netstring
  84  make
  85  make installopt
  86  make install
  87  cd ..
  89  cd ..
  91  make
  92  make optinstall
  95  make install
  96  vim Makefile
  98  cd ..
  100  cd ocamlnet.3.6.0/src/netclient/
  101  make install
  103  ocamlfind
  105  vim    def build(self):
  106  vim /root/.opam/system/lib/findlib.conf
  108  vim /root/.opam/system/lib/findlib.conf
  112  cd /opt/
  114  cp ~sergiu/.opam/system/
  115  cp -r ~/.opam ~sergiu/
  116  chown -R sergiu ~sergiu/.opam
  117  mkdir opam_sw
#Which is correct?
  119  opam config env
  120  opam config env --root
  121  opam config env --root /opt/opam_sw/
  122  opam init --root /opt/opam_sw/
  124  opam printenv
  126  opam config
  127  opam list
  130  cd opam_sw/
  132  diff . ~/.opam/
  133  diff -r . ~/.opam/
  134  diff -r ./system/ ~/.opam/system/
  135  cp -r ~/.opam/system/lib system/lib/
  136  cat ~/.bashrc
  137  . /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
  143  cd ~sergiu/paparazzi
  145  make
  146  opam install xml-light
  147  make
  165  vim    /root/.opam/system/lib/findlib.conf
  166  cp -r /opt/opam_sw/system/lib/xml-light ~/.opam/system/lib/
  167  make
  168  opam install glibivy
  169  opam install glibivy2
  174  cd /home/sergiu/develop/ivy-ocaml/
  178  make install
  181  cd ~sergiu/paparazzi
  182  make
  183  ocamlfind list|grep labl
  184  opam list|grep labl
  185  opam install lablgtk
  186  make
  190  cp  -r  /opt/opam_sw/system/lib/lablgtk* ~/.opam/system/lib/
  191  make
  192  apt-cache search gnomecanvas
  193  apt-get install libgnomecanvas2-dev libgnomecanvas2-0
  194  make
  199  vim sw/lib/ocaml/Makefile
  200  make
  201  ocamlfind list | grep gnome
  202  opam install lablgtk2.gnomeui
  210  vim sw/lib/ocaml/Makefile
  211  vim sw/lib/ocaml/META.pprz
  212  make
  213  apt-cache search gmktemp
  214  mktemp
  215  vim sw/supervision/Makefile
  216  make
  219  sudo apt-get install  liblablgtk2-ocaml
  221  export LD_LIBRARY_PATH=/usr/lib/ocaml/stublibs/:$LD_LIBRARY_PATH
  222  make
  223  apt-get install  liblablgtk2-gnome-ocaml
  224  make
  228  CCFLAGS = -I/root/.opam/system/lib/lablgtk2/ make ground_segment
  229  CCFLAGS=-I/root/.opam/system/lib/lablgtk2/ make ground_segment
  230  CCFLAGS=-I/root/.opam/system/lib/ make ground_segment
  235  export CAML_LD_LIBRARY_PATH=/root/.opam/system/lib/lablgtk2/:/root/.opam/system/lib/:$CAML_LD_LIBRARY_PATH
  245  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.opam/system/lib/lablgtk2/:/root/.opam/system/lib/:/root/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
  255  vim sw/ground_segment/multimon/Makefile
  256  vim Makefile
  257  make pprzcenter
  258  make supervision
  260  cd sw/supervision/
  261  make
  262  export PPRZ_HOME=/home/sergiu/paparazzi/
  263  export PAPARAZZI_HOME=/home/sergiu/paparazzi/
  264  export PAPARAZZI_SRC=/home/sergiu/paparazzi/
  265  make supervision
  266  make
  267  vim Makefile
  268  vim sw/ground_segment/multimon/Makefile
  269  vim ../ground_segment/multimon/Makefile
  270  vim Makefile
  271  make
  272  vim Makefile
  273  ls
  274  ./paparazzicenter
  275  cd ../..
  276  ls
  279  cd sw/logalizer/
  280  vim Makefile
  281  make
  282  vim ../supervision/Makefile
  283  vim Makefile
  284  make
  285  vim Makefile
  286  make
  287  cd ../..
  292  vim sw/ground_segment/cockpit/Makefile
  297  vim sw/ground_segment/multimon/Makefile
  299  cd sw/ground_segment/multimon/
  300  make clean
  301  make
  302  cd ../..
  303  cd ..
  306  vim sw/supervision/Makefile
  307  vim sw/ground_segment/tmtc/Makefile
  308  make
  309  cd sw/ground_segment/tmtc/
  310  make clean
  311  make
  312  cd ../../..
  315  vim sw/simulator/Makefile
  316  cd sw/simulator/mak
  317  cd sw/simulator/
  318  make clean
  319  make
  320  cd ../..
  321  make ground_segment
  324  cd sw/ground_segment/joystick/
  332  cd ../tmtc/
  333  cd ../../tools/
  335  vim Makefile
  336  make clean
  337  cd ../
  338  find . -name input2ivy.ml
  339  cd ground_segment/joystick/
  340  make clean
  341  make
  346  cd ../../
  347  cd ..
  349  vim Makefile
  350  make
  351  make ground_segment
  353  X&
  354  export DISPLAY=:0
  355  xterm
  356  ./papara
  358  git status
  359  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010
  360  sw/ground_segment/cockpit/gcs
  361  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010
  362  mkdir /home/dirk
  363  mkdir /home/dirk/nonSynced
  365  ln -s /home/dirk/nonSynced/paparazzi /home/sergiu/paparazzi
  366  ln -s  /home/sergiu/paparazzi /home/dirk/nonSynced/paparazzi
  367  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010





Revision as of 19:27, 25 April 2013

Intro

Please take note that the page is in work at the moment and that I am doing my best to have it updated as soon as possible.

Would it not be great to have your small UAS in your backpack, throw it in the air and monitor and even adjust the flight via a small device in your pocket? If you think this would be awesome, read on, since that is what this page is all about. It is the first attempt and will not be about iPad, Android Phones, Amazon Kindles or the likes as a ground station. For this we have other wiki pages. No, we will use a thrusted solution; A Gumstix with Linux on it.

Outcome

Have the Paparazzi GCS monitoring and adjusting a UA via an small Gumstix based device.

Hardware

What do you need to get this working:

  1. A gumstix board
  2. Camera
  3. 3.5" screen (such as the LCD panel with the Chestnut) or 4.3"

Software

Needed softwares to run this application:

  1. Paparazzi software
  2. Kivy library
  3. Ubuntu kernel on your Gumstix
  4. Driver for the camera in order to be used with the Gumstix

How to start

Well, we have some tutorials on this wiki about how to install Paparazzi. If you need any help to install Kivy, please look at their website, you will find there a good tutorial about how to get started.

Create an OS

Pre-requisites

   4GB SD card or larger
   Download the pre-built image from [vexpress-ics-gcc47-armlt-staging-alt-open.img.gz]

Installation Steps

   unzip the downloaded pre-build image
   Insert SD card and note the assigned '/dev/sdX'
    $ dmesg
    $ SDCARD=/dev/sdX   (sdcard found from dmesg above)
    $ sudo dd bs=64k if=vexpress-ics-gcc47-armlt-staging-alt-open.img of=$SDCARD     
   Continue with the instructions below to Configure your TC2 board to boot the image [link].

Once you have the image written on your sd card you can insert it in the Gumstix and boot up. Then type the following in the CuteCom command prompt:

   printenv
   setenv defaultdisplay lcd43
   saveenv
   run mmcboot

After that you can reboot your system.

Connecting peripherals

When you have a Linux version running on your Gumstix, you can add a LCD, or a mouse, or a keyboard.

To set up your LCD you must follow these steps:

Connect trough CuteCom to the Gumstix Restart the board and hit a key within 5 seconds:

   Hit any key to stop autoboot: 5

Then type the following in the CuteCom command prompt:

   setenv defaultdisplay lcd43

Or, if you are using a 3.5" screen (such as the LCD panel with the Palo35):

   setenv defaultdisplay lcd35

You can save this setting for future boots by saving it:

   saveenv

Finally, continue with the boot process by typing in CuteCom command prompt:

   boot 


Connect to the Gumstix through the network

If you want to send files to the Gumstix, you can do it via a ssh connection. In order to do this, both devices, your computer and the Gumstix must be connected to the same same network. Once you did this, you can start setting up the connection. Fistly, you need to know the IP address of the Gumstix. Start by opening CuteCom and connect to the device. When the system loaded, type into CuteCom command prompt:

 ifconfig -a (if you can't use this command from any reason you can get a list with all the ips on the network using 'arp -a')

Among the data returned, you will see something like this:

   eth0      
    Link encap:Ethernet  HWaddr 00:15:c9:28:c9:ff  
    inet addr:169.16.29.3

Now enter into the command prompt:

   sudo dhclient eth1 169.16.29.3

When this is done, install on the Gumstix openssh write into the command prompt:

   sudo apt-get install openssh-server

Set a password:

   sudo passwd username
   password  (replace password with any string you want as password)
   password  (retype the password you chose)

To add the user to the sudoers group do:

sudo adduser username sudo

Now you should be able to connect using:

   ssh root@169.16.29.3

Remove the login prompt

You may want to set your OS to auto-login. Why? Because you may not have at any time a keyboard for the Gumstix around. It is explained here very well how to do it. You have to write in your command prompt:

   sudo vi /etc/lightdm/lightdm.conf

and then modify the lines as indicated on the webpage above.

There is a chance to get an error like this "Gtk-WARNING **: Locale not supported by C library.". To solve this write into your command prompt:

sudo update-locale en_US.UTF-8
sudo export LC_ALL=en_US.UTF-8

or the right locale for your keyboard. If this didn't solve your problem, you may want to read here more about it.

Remove the Lightdm GUI for freeing memory

   sudo apt-get remove lightdm

After this step you must reboot.

Add swap memory

If you run out of RAM memory, add a swap file as sudo:

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
mkswap /swapfile1
chown root:root /swapfile1
chmod 0600 /swapfile1
swapon /swapfile1

For more explanations you can go to this website

Install paparazzi on the gumstix

  1. Install all libraries needed=
sudo apt-get install ocaml-findlib libxml-light-ocaml-dev liblablgtk2-ocaml-dev liblablgtk2-gnome-ocaml-dev libocamlnet-ocaml-dev libsdl-ocaml-dev libpcre-ocaml-dev gtk2-engines-pixbuf make gcc g++ libgsl0-dev gnuplot libgnomecanvas2-dev bzip2 git libusb-dev speech-dispatcher glade imagemagick libpcre3-dev git-core  python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4 python-yaml
  1. Install Ocaml 4.0
wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
tar -xvzf ocaml-4.00.0.tar.gz 
cd ocaml-4.00.0
./configure
make world
make opt
umask 022
sudo make install
cd ..
  1. Install Opam
git clone https://github.com/OCamlPro/opam.git
cd opam
./configure 
make (because of overheating you may get some errors, but keep doing 'make')
sudo make install
cd ~
mkdir develop
cd develop/
wget https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz
tar -xvzf pcre-ocaml-6.2.5.tar.gz 
cd pcre-ocaml-6.2.5
./configure
make
sudo make install
cd ..
ocaml -version (make sure you have the right version)
sudo opam install -v lablgtk
sudo opam install  xml-light 
sudo opam install pcre-ocaml
sudo opam install -v ocamlnet
cd ~
git clone https://github.com/paparazzi/paparazzi-portability-support.git
cd paparazzi-portability-support/
cd linux/
 sudo ./develenv.sh
sudo apt-get install libxt-dev tcl8.4-dev
cd ivy/ivy-vy-c
cd ivy/ivy-c/
 176  ll
dpkg-checkbuilddeps

from history

 178  sudo apt-get install tcl-dev
 179  dpkg-checkbuilddeps
 183  cd ~
 186  cd paparazzi-portability-support/linux/ivy/ivy-c/
 189  fakeroot debian/rules get-orig-source
 191  tar -xvzf ivy-c_3.12.1.orig.tar.gz
 193  cd ivy-c-3.12.1/
 197  rm -rf debian/
 198  cp -r ../debian .
 227  make
 229  cd src
 233  make
 234  sudo make install
 235  cd ..
 238  cd develop/
 240  git clone https://github.com/OCamlPro/opam.git
If you get an error when trying to install pcre-ocaml 7.0.2 please follow these steps:
opam remove pcre-ocaml
wget https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz
tar -xvzf pcre-ocaml-6.2.5.tar.gz 
cd pcre-ocaml-6.2.5
make
sudo make install
 260  cd ~/paparazzi-portability-support/linux/ivy/ivy-c
 261  ll
 262  dpkg-checkbuilddeps
 265  pkbuild
 267  sudo apt-get install dpkg-dev debhelper devscripts fakeroot linda
 268  sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder
 271  cd ivy-c-3.12.1/
 273  debuild -i -us -uc -b
 279  cd develop/
 281  sudo apt-get install dh-ocaml
 282  svn co http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk
 283  mv trunk ivy-ocaml
 284  cd ivy-ocaml/
 290  make
 291  ocamlmklib -o ivy-ocaml ivy.cmo ivyLoop.cmo civy.o civyloop.o  -livy
 293  vim Makefile 
 303  make
 304  sudo make install
 305  ls ~/paparazzi-portability-support/linux/ivy/ivy-python
 306  cd ..
 307  ls
 308  svn co http://svn.tls.cena.fr/svn/ivy/ivy-python/trunk
 309  mv trunk ivy-python
 310  cd ivy-python/
 312  sudo python setup.py
 313  sudo python setup.py install
 314  svn info
 315  cd ../..
 317  git clone git://github.com/paparazzi/paparazzi.git
 324  sudo fdisk /dev/mmcblk0
 325  sudo reboot
 326  sudo apt-get install subversion
 327  cd /usr/include/
 329  ll tc*
 331  git clone git://github.com/paparazzi/paparazzi.git
 333  cd paparazzi
 334  git checkout -b master_sergiu origin/master
 337  make ground_segment
 338  apt-cache search glibivy
 339  locate ivy-ocaml
 340  cd ../develop/
 343  vim ivy-ocaml/META.glibivy
 344  vim ivy-ocaml/glibivy-ocaml.mli
 345  vim ivy-ocaml/glibivy-ocaml.a
 346  cd ivy-ocaml/
 347  svn info
 349  vim Makefile 
 350  vim META.glibivy 
 352  make clean
 353  make
 354  sudo make install
 355  vim Makefile 
 356  sudo make uninstall
 357  sudo make install
 358  make
 359  make clean 
 360  make
 361  sudo make install
 363  cd ..
 364  mv ivy-ocaml ivy-ocaml-old
 365  git clone git://github.com/flixr/ivy-ocaml.git
 366  cd ivy-ocaml
 368  sudo make uninstall
 369  make clean
 370  make
 371  vim Makefile 
 372  make
 373  make clean
 374  make
 375  sudo make install
 376  ocamlc -where
 378  sudo make install
 379  vim META.glibivy 
 380  git log
 381  sudo make install
 384  vim Makefile 
 385  sudo make install
 387  cp META META.ivy
 388  make clean
 389  make
 392  sudo make install
 393  cp META META.ivy
 394  vim Makefile 
 395  sudo make uninstall
 398  sudo rm /usr/local/lib/ocaml/glibIvy.cmi 
 399  sudo rm /usr/local/lib/ocaml/glibivy-ocaml.*
 401  sudo make install
 403  ocamlfind
 404  ocamlfind query glibivy
 405  ocamlfind query glibIvy
 406  vim Makefile 
 407  ocamlfind query glibIvy-ocaml
 408  ocamlfind query glibivy-ocaml
 409  vim Makefile 
 416  rm META
 417  sudo make install
 420  ocamlfind query glibivy
 421  ocamlfind query glibIvy
 422  ocamlfind query glibivy-ocaml
 423  ocamlfind query libglibivy-ocaml
 424  sudo make install
 425  vim /usr/local/lib/ocaml/3.12.0/ivy/META
 426  vim /usr/local/lib/ocaml/3.12.0/glibivy/META 
 427  ocamlfind 
 428  ocamlfind  list
 429  vim Makefile 
 430  sudo make uninstall
 431  sudo make install
 433  cp META META.ivy
 434  sudo make install
 437  cp META.glibivy META
 438  ocamlfind install  glibivy META glibIvy.mli glibIvy.cmi glibIvy.cmx glibivy-ocaml.cma glibivy-ocaml.cmxa libglibivy-ocaml.a glibivy-ocaml.a dllglibivy-ocaml.so
 439  ocamlfind query glibivy
 440  ocamlfind query glibIvy
 441  ocamlfind list
 443  ocamlfind list|grep pcre
 445  sudo cp /usr/local/lib/ocaml/3.12.0/* /usr/local/lib/ocaml/ -r
 450  vim /home/sergiu/.opam/system/lib/findlib.conf
 457  vim /etc/ocamlfind.conf 
 464  OCAMLFIND_CONF=/etc/ocamlfind.conf ocamlfind query
 465  export OCAMLFIND_CONF=/etc/ocamlfind.conf 
 467  cp /home/sergiu/.opam/system/lib/findlib.conf /home/sergiu/.opam/system/lib/findlib.conf.old
 468  cp /etc/ocamlfind.conf /home/sergiu/.opam/system/lib/findlib.conf
 470  ocamlfind query
 471  ocamlfind list
 472  ocamlfind printconf
 474  sudo rm  /usr/local/lib/ocaml/pcre
 475  sudo rm  /usr/local/lib/ocaml/pcre -rf
 476  sudo rm  /usr/lib/ocaml/pcre -rf
 477  cd ..
 478  sudo apt-get install cvs
 479  cvs -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot co ocaml/xml-light
 480  wget http://tech.motion-twin.com/zip/xml-light-2.2.zip
 481  unzip xml-light-2.2.zip 
 482  cd xml-light
 485  make
 486  make install
 487  sudo make install
 489  cd ..
 491  wget https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz --no-check-certificate
 492  tar -xzvf ocaml-http-0.1.5.tar.gz 
 493  cd ocaml-http_0.1.5/
 495  make
 496  apt-cache search netstring
 497  ocamlobjinfo /usr/lib/ocaml/netstring/neturl.cmi
 501  vim INSTALL 
 502  cd ..
 505  wget "http://downloads.sourceforge.net/project/ocamlnet/ocamlnet/2.2.9/ocamlnet-2.2.9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F&ts=1365529051&use_mirror=ignum"
 508  sudo killall -9 NetworkManager  (for faster system)
 515  mv ocamlnet-2.2.9.tar.gz\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Focamlnet%2F\&ts\=1365529051\&use_mirror\=ignum.1 ocamlnet-2.2.9.tar.gz 
 516  tar -xzvf ocamlnet-2.2.9.tar.gz
 517  cd ocaml/ocamlnet-2.2.9
 522  ./configure -enable-gtk2 -with-nethttpd
 523  make all
 526  cd ../../ocaml-4.00.0
 530  ./configure 
 531  vim README
 532  vim INSTALL 
 533  grep -R toploop .
 534  exit
 535  cd ocaml-4.00.0
 536  vim Makefile
 539  make compilerlibs
 540  sudo make installopt
 543  cd paparazzi
 545  vim sw/lib/ocaml/Makefile 
 547  sudo apt-get install python-xml
 549  apt-cache xml-light
 550  apt-cache search xml-light
 551  sudo apt-get install libxml-light-ocaml-dev libxmlm-ocaml-dev
 553  apt-cache search ocamlnet
 555  apt-cache search ocaml |grep http
 556  sudo apt-get install libhttp-ocaml-dev 
 557  make ground_segment
 563  vim /usr/lib/ocaml/netclient/http_client.mli
 564  apt-cache search ocamlnet
 565  sudo apt-get remove   libocamlnet-ocaml-bin
 573  opam remove ocamlnet (check where it was installed)
 578  sudo opam install ocamlnet
 579  sudo apt-get install htop
 581  sudo swapon /swapfile1
 582  sudo opam install ocamlnet
 583  apt-cache search liblgtk
 584  apt-cache search lablgtk
 586  sudo apt-get remove liblablgtk2-ocaml
 587  sudo opam install ocamlnet
 588  sudo opam install lablgtk2
 593  sudo opam install lablgtk
 594  sudo opam install ocamlnet
 595  sudo opam install topfind
 600  cd ../develop/ocamlnet-2.2.9
 601  make
 605  cd paparazzi
 607  make 
 608  git status
 610  grep -R root ~sergiu/.opam/
 611  opam
 612  mv ~sergiu/.opam ~sergiu/.opam-old
 614  opam init
 615  ocamlfind list


   7  apt-get install openssh-server


  33  sudo apt-get install bzip2 git-core make gcc g++ gnuplot glade imagemagick libpcre3-dev libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4
  34  login
  35  ocaml info pcre-ocaml
  36  opam info pcre-ocaml
  37  opam init
  1. Add more space
  39  mkfs.ext3 /dev/mmcblk0p3 
  40  vol_id --uuid /dev/mmcblk0p3
  41  blkid /dev/mmcblk0p3 
  42  vim /etc/fstab
  43  mv /home /oldHome
  45  mkdir /home
  46  mount /home
  47  mount
  48  mv /oldHome/* /home/
  49  rmdir /oldHome/
  60  opam install ocamlnet
  61  exit
  62  echo $DISPLAY
  63  xterm
  64  cd ~sergiu/paparazzi
  65  ./paparazzi
  67  vim pprz_src_test.sh 
  69  vim Makefile
  70  vim sw/simulator/Makefile
  76  ./paparazzi
  79  ps aux|grep make
  81  opam install ocamlnet
  82  cd /root/.opam/system/build/ocamlnet.3.6.0/src/netstring
  84  make 
  85  make installopt
  86  make install
  87  cd ..
  89  cd ..
  91  make
  92  make optinstall
  95  make install
  96  vim Makefile
  98  cd ..
 100  cd ocamlnet.3.6.0/src/netclient/
 101  make install
 103  ocamlfind 
 105  vim     def build(self):
 106  vim /root/.opam/system/lib/findlib.conf
 108  vim /root/.opam/system/lib/findlib.conf
 112  cd /opt/
 114  cp ~sergiu/.opam/system/
 115  cp -r ~/.opam ~sergiu/
 116  chown -R sergiu ~sergiu/.opam
 117  mkdir opam_sw
  1. Which is correct?
 119  opam config env
 120  opam config env --root
 121  opam config env --root /opt/opam_sw/
 122  opam init --root /opt/opam_sw/
 124  opam printenv
 126  opam config
 127  opam list
 130  cd opam_sw/
 132  diff . ~/.opam/
 133  diff -r . ~/.opam/
 134  diff -r ./system/ ~/.opam/system/
 135  cp -r ~/.opam/system/lib system/lib/
 136  cat ~/.bashrc 
 137  . /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
 143  cd ~sergiu/paparazzi
 145  make
 146  opam install xml-light
 147  make
 165  vim     /root/.opam/system/lib/findlib.conf
 166  cp -r /opt/opam_sw/system/lib/xml-light ~/.opam/system/lib/
 167  make
 168  opam install glibivy
 169  opam install glibivy2
 174  cd /home/sergiu/develop/ivy-ocaml/ 
 178  make install
 181  cd ~sergiu/paparazzi
 182  make
 183  ocamlfind list|grep labl
 184  opam list|grep labl
 185  opam install lablgtk
 186  make
 190  cp  -r  /opt/opam_sw/system/lib/lablgtk* ~/.opam/system/lib/
 191  make
 192  apt-cache search gnomecanvas
 193  apt-get install libgnomecanvas2-dev libgnomecanvas2-0
 194  make
 199  vim sw/lib/ocaml/Makefile
 200  make
 201  ocamlfind list | grep gnome
 202  opam install lablgtk2.gnomeui
 210  vim sw/lib/ocaml/Makefile
 211  vim sw/lib/ocaml/META.pprz
 212  make
 213  apt-cache search gmktemp
 214  mktemp
 215  vim sw/supervision/Makefile
 216  make
 219  sudo apt-get install  liblablgtk2-ocaml
 221  export LD_LIBRARY_PATH=/usr/lib/ocaml/stublibs/:$LD_LIBRARY_PATH
 222  make
 223  apt-get install  liblablgtk2-gnome-ocaml
 224  make
 228  CCFLAGS = -I/root/.opam/system/lib/lablgtk2/ make ground_segment
 229  CCFLAGS=-I/root/.opam/system/lib/lablgtk2/ make ground_segment
 230  CCFLAGS=-I/root/.opam/system/lib/ make ground_segment
 235  export CAML_LD_LIBRARY_PATH=/root/.opam/system/lib/lablgtk2/:/root/.opam/system/lib/:$CAML_LD_LIBRARY_PATH
 245  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.opam/system/lib/lablgtk2/:/root/.opam/system/lib/:/root/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
 255  vim sw/ground_segment/multimon/Makefile
 256  vim Makefile
 257  make pprzcenter
 258  make supervision
 260  cd sw/supervision/
 261  make
 262  export PPRZ_HOME=/home/sergiu/paparazzi/
 263  export PAPARAZZI_HOME=/home/sergiu/paparazzi/
 264  export PAPARAZZI_SRC=/home/sergiu/paparazzi/
 265  make supervision
 266  make
 267  vim Makefile 
 268  vim sw/ground_segment/multimon/Makefile
 269  vim ../ground_segment/multimon/Makefile
 270  vim Makefile 
 271  make
 272  vim Makefile 
 273  ls
 274  ./paparazzicenter 
 275  cd ../..
 276  ls
 279  cd sw/logalizer/
 280  vim Makefile 
 281  make
 282  vim ../supervision/Makefile 
 283  vim Makefile 
 284  make
 285  vim Makefile 
 286  make
 287  cd ../..
 292  vim sw/ground_segment/cockpit/Makefile 
 297  vim sw/ground_segment/multimon/Makefile 
 299  cd sw/ground_segment/multimon/
 300  make clean
 301  make
 302  cd ../..
 303  cd ..
 306  vim sw/supervision/Makefile 
 307  vim sw/ground_segment/tmtc/Makefile 
 308  make
 309  cd sw/ground_segment/tmtc/
 310  make clean
 311  make
 312  cd ../../..
 315  vim sw/simulator/Makefile 
 316  cd sw/simulator/mak
 317  cd sw/simulator/
 318  make clean
 319  make
 320  cd ../..
 321  make ground_segment
 324  cd sw/ground_segment/joystick/
 332  cd ../tmtc/
 333  cd ../../tools/
 335  vim Makefile 
 336  make clean
 337  cd ../
 338  find . -name input2ivy.ml
 339  cd ground_segment/joystick/
 340  make clean
 341  make
 346  cd ../../
 347  cd ..
 349  vim Makefile
 350  make
 351  make ground_segment
 353  X&
 354  export DISPLAY=:0
 355  xterm
 356  ./papara
 358  git status
 359  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010
 360  sw/ground_segment/cockpit/gcs 
 361  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010
 362  mkdir /home/dirk
 363  mkdir /home/dirk/nonSynced
 365  ln -s /home/dirk/nonSynced/paparazzi /home/sergiu/paparazzi
 366  ln -s  /home/sergiu/paparazzi /home/dirk/nonSynced/paparazzi
 367  sw/ground_segment/cockpit/gcs  -b 192.168.209:2010


opam init
. /home/sergiu/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
eval 'opam config env'
cd ..
opam install ocamlfind xml-light pcre-ocaml
sudo opam install ocamlfind xml-light pcre-ocaml

If you will get an error when trying to install pcre-ocaml 7.0.2 please follow these steps:

wget https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-6.2.5.tar.gz
tar -xvzf pcre-ocaml-6.2.5.tar.gz 
cd pcre-ocaml-6.2.5
make
sudo make install

Then continue the process:

sudo opam install -v lablgtk
sudo opam install -v ocamlnet

You need to install subversion to use svn commands:

sudo apt-get install subversion

History

 130  history
 131  sudo shutdown -h now
 132  ll
 133  top
 134  ll
 135  tar -xvzf ll
 136  ll
 137  ocaml -version
 138  ocaml-4 -version
 139  ocaml4 -version
 140  which ocaml
 141  ulimit -s 65536
 142  ll
 143  cp -av ocaml-4.00.0 /tmp
 144  ll
 145  ll /tmp
 146  ll
 147  cd ocaml-4.00.0
 148  ll
 149  ./configure
 150  make world
 151  make opt
 152  make install
 153  cd /
 154  ll
 155  cd ~
 156  cd ocaml-4.00.0
 157  ll
 158  umask 022
 159  sudo make install
 160  ocaml -version
 161  which ocaml
 162  camlp4 -version
 163  sudo  ./build/install.sh
 164  ocaml -version
 165  which ocaml
 166  cd usr/local/bin
 167  cd /usr/local/bin
 168  ll oc*
 169  ./ocaml
 170  ocaml -version
 171  ll
 172  ./ocaml
 173  ocaml -version
 174  which ocaml
 175  su root
 176  exit
 177  ls
 178  cd develop
 179  ll
 180  cd paparazzi-portability-support/
 181  ll
 182  rm *.*
 183  ll
 184  rm darwin
 185  rm -r *
 186  ll
 187  rm *
 188  ll
 189  rm /*
 190  rm ~/develop/paparazzi-portability-support/*
 191  rm -r  ~/develop/paparazzi-portability-support/*
 192  ll
 193  rm -r  ~/develop/paparazzi-portability-support/linux/*
 194  yes
 195  ll
 196  rm -rf  ~/develop/paparazzi-portability-support/linux/*
 197  sudo rm -rf  ~/develop/paparazzi-portability-support/linux/*
 198  ll
 199  cd linux
 200  ll
 201  cd ..
 202  sudo rm -rf  ~/develop/paparazzi-portability-support/*
 203  ll
 204  sudo rm -rf  ~/develop/paparazzi-portability-support/*.*
 205  ll
 206  sudo rm -rf  ~/develop/paparazzi-portability-support/.*
 207  cd .git
 208  ocaml -version
 209  wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
 210  $ cd ocaml-4.00.0
 211  cd ~
 212  $ cd ocaml-4.00.0
 213  cd ocaml-4.00.0
 214  wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
 215  cd ocaml-4.00.0
 216  find -iname ocaml-4.*
 217  ll
 218  cd ocaml-4.00.0.tar.gz 
 219  tar -xvwzf ocaml-4.00.0.tar.gz 
 220  tar -xvwf ocaml-4.00.0.tar.gz 
 221  tar -xvwz ocaml-4.00.0.tar.gz 
 222  tar -xvzf ocaml-4.00.0.tar.gz 
 223  cd ocaml-4.00.0
 224  ll
 225  ./configure --with-pthreads
 226  make world.opt
 227  ocaml -version
 228  cd ..
 229  sudo apt-get install ocaml
 230  cd ocaml-4.00.0
 231  ll
 232  make world.opt
 233  sudo apt-get update
 234  sudo apt-get upgrade
 235  ocaml -version
 236  sudo apt-get remove ocaml
 237  ocaml -version
 238  cd ..
 239  ll
 240  cd develop/
 241  cd opam/
 242  ./configure
 243  ll
 244  ./configure
 245  make clean
 246  make
 247  sudo make install
 248  opam init
 249  . /home/sergiu/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
 250  eval `opam config env`
 251  eval 'opam config env'
 252  sudo apt-get install libglade2-dev libgnomeui-dev libgnomecanvas2-dev librsvg2-dev libgtkspell-dev libcanberra-gtk-dev
 253  opam install ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
 254  opam  ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
 255  opam --help
 256  opam install ocamlfind xml-light pcre-ocamlopam install ocamlfind xml-light pcre-ocaml
 257  opam
 258  opam install
 259  opam install ocamlfind
 260  top
 261  history

Due to overheating i got errors like

==== ERROR [while installing ocamlfind.1.3.3] ====
Internal error:
  # opam-version    1.0.1 (1.0.0-84-g9b3ff34)
# os              linux
opam: "fork" failed: Cannot allocate memory
'opam install ocamlfind' failed.


and I had to shutdown and wait for the system to cool down a little. Because the problem persisted, I had to add a swap file doing as sudo:

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 (will create 512 MB swap file)
mkswap /swapfile1
chown root:root /swapfile1
chmod 0600 /swapfile1
swapon /swapfile1

For more explanations you can go to this website

Attempt 10

   sudo add-apt-repository ppa:paparazzi-uav/ppa
   (press enter as you will be asked)
   sudo apt-get install ocaml-findlib libxml-light-ocaml-dev liblablgtk2-ocaml-dev liblablgtk2-gnome-ocaml-dev libocamlnet-ocaml-dev libsdl-ocaml-dev libpcre-ocaml-dev gtk2-engines-pixbuf make gcc g++ libgsl0-dev gnuplot libgnomecanvas2-dev bzip2 git libusb-dev speech-dispatcher glade imagemagick libpcre3-dev
   sudo apt-get install bzip2 git-core make gcc g++ gnuplot glade imagemagick libpcre3-dev libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4
   sudo apt-get install python-lxml, python-wxgtk2.8, python-usb, python-yaml
   sudo apt-get update
sudo apt-get install libocamlnet-ocaml
 sudo apt-get install libocamlnet-ocaml-dev
 could not install   sudo apt-get install liblablgtk-extras-ocaml-dev

Note: because of an error that occured, I installed the packages one by one and the process was succesfully.

git clone https://github.com/paparazzi/paparazzi-portability-support.git
cd paparazzi-portability-support/linux
sudo ./develenv.sh
sudo apt-get install libxt-dev tcl8.4-dev


  75  sudo apt-get install libocamlnet-ocaml-dev
  83  git clone https://github.com/paparazzi/paparazzi-portability-support.git
  84  cd paparazzi-portability-support/linux
  85  sudo ./develenv.sh
  86  sudo apt-get install libxt-dev tcl8.4-dev
  87  cd ~/paparazzi-portability-support/linux/ivy/ivy-c
  88  cd ../../
  89  mv paparazzi-portability-support/ ../
  90  cd ../paparazzi-portability-support/
  91  pwd
  92  cd linux
  93  cd ivy/ivy-c/
  94  fakeroot debian/rules get-orig-source
  97  sudo apt-get install subversion
  98  fakeroot debian/rules get-orig-source
  99  tar -xvzf ivy-c_3.12.1.orig.tar.gz
 100  cd ivy-c-3.12.1/
 101  rm -rf debian/
 102  cp -r ../debian .
 103  dpkg-buildpackage -rfakeroot -us -uc
 104  cd ..
 105  sudo dpkg -i ivy-c_3.12.1-1_armel.deb ivy-c-dev_3.12.1-1_armel.deb
 128  cd ~/paparazzi-portability-support/linux/ivy/ivy-c
 130  ivy-c-3.12.1/
 131  cd ivy-c-3.12.1/
 137  make install
 140  cd ~/paparazzi-portability-support/linux/ivy/ivy-ocaml
 141  fakeroot debian/rules get-orig-source
 142  cd ivy-ocaml-1.1/
 143  cp -r ../debian .
 144  make
 145  svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk/ ivy-ocaml
 156  mv ivy-ocaml/ _ivy-ocaml.old
 157  svn checkout http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk/ ivy-ocaml
 158  cd ivy-ocaml/
 166  make 
 170  make install
 171  dpkg-buildpackage -rfakeroot -us -uc
   1  dpkg-buildpackage -rfakeroot -us -uc
   2  ll
   3  cd src/
   4  ll
   5  cd ..
   6  cd ~
   7  ll
   8  mk develop
   9  mkdir develop
  10  cd develop/
  11  ll
  12  git clone https://github.com/paparazzi/paparazzi-portability-support.git
  13  cd paparazzi-portability-support/linux
  14  sudo ./develenv.sh
  15  sudo adduser test sudo
  16  sudo adduser sergiu sudo
  17  su root
  18  cd paparazzi-portability-support/linux
  19  sudo ./develenv.sh
  20  su root
  21  logout
  22  exit
  23  dpkg-buildpackage -rfakeroot -us -uc
  24  sudo dpkg-buildpackage -rfakeroot -us -uc
  25  login
  26  su login
  27  su root
  28  exit
  29  sudo dpkg -i ivy-c_3.12.1-1_arm**.deb ivy-c-dev_3.12.1-1_arm**.deb
  30  su root
  31  exit
  32  fakeroot debian/rules get-orig-source
  33  su root
  34  exit
  35  sudo cd rules
  36  ls
  37  su root
  38  exit
  39  fakeroot debian/rules get-orig-source
  40  ls
  41  cd debian
  42  ls
  43  cd rules
  44  sudo cd rules
  45  sudo passwd sergiu
  46  su root
  47  exit
  48  cd develop/
  49  ll
  50  cd paparazzi-portability-support/
  51  ll
  52  cd linux
  53  ll
  54  sudo develenv.sh 
  55  ./develenv.sh 
  56  sudo ./develenv.sh 
  57  sudo apt-get install libxt-dev tcl8.4-dev
  58  cd ..
  59  cd linux/ivy/ivy-c
  60  ll
  61  fakeroot debian/rules get-orig-source
  62  tar -xvzf ivy-c_3.12.1.orig.tar.gz
  63  cd ivy-c-3.12.1/
  64  rm -rf debian/
  65  cp -r ../debian .
  66  dpkg-buildpackage -rfakeroot -us -uc
  67  find replace-mkdirhier.patch
  68  find -iname  replace-mkdirhier.patch
  69  ll
  70  cd debian/
  71  ll
  72  rm patches/
  73  rmdir patches/
  74  rm -rf patches/
  75  rmdir patches/
  76  ll
  77  dpkg-buildpackage -rfakeroot -us -uc
  78  touch changelog 
  79  dpkg-buildpackage -rfakeroot -us -uc
  80  ll
  81  cd ..
  82  dpkg-buildpackage -rfakeroot -us -uc
  83  sudo dpkg-buildpackage -rfakeroot -us -uc
  84  history
  85  dpkg-buildpackage -rfakeroot -us -uc
  86  top
  87  dpkg-buildpackage -rfakeroot -us -uc
  88  sudo make clean
  89  cat Makefile
  90  ll
  91  cd ..
  92  ll
  93  cd ivy-c-3.12.1/
  94  ll
  95  cd src/
  96  ll
  97  ivy-c-3.12.1/make clean
  98  make
  99  sudo make install
 100  cd ..
 101  cd ../../
 102  cd ivy-ocaml/
 103  ll
 104  fakeroot debian/rules get-orig-source
 105  cd ivy-ocaml-1.1/
 106  ll
 107  make
 108  cd ../../ivy-c/
 109  ll
 110  cd ivy-c-3.12.1/
 111  ll
 112  cd src/
 113  ll
 114  cat Makefile
 115  grep -Ri fPIC Makefile
 116  cd ../../
 117  cd ../
 118  cd ivy-ocaml/
 119  ll
 120  cd ivy-ocaml-1.1/
 121  ll
 122  grep -Ri fPIC Makefile


Experimental steps

  1. Remove LightDM GUI to preserver Gumstix memory

{TODO: Describe STEPS}

{install python} {install ivy python} {install kivy}

Compile example

Source of Example

X11 server to display on LCD

Installing

Testing

Next

The next step will be to make onboard video work in the GCS.

Links