Difference between revisions of "GettingTheGCSRunningonAGumstixBoard"
Line 137: | Line 137: | ||
root@linaro-ubuntu-desktop:~# sudo dpkg --configure -a | root@linaro-ubuntu-desktop:~# sudo dpkg --configure -a | ||
=Attempt 10= | =Attempt 10= | ||
Line 144: | Line 142: | ||
(press enter as you will be asked) | (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 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 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 install python-lxml, python-wxgtk2.8, python-usb, python-yaml | ||
Line 151: | Line 148: | ||
sudo apt-get install libocamlnet-ocaml-dev | sudo apt-get install libocamlnet-ocaml-dev | ||
could not install sudo apt-get install liblablgtk-extras-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. | 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 | git clone https://github.com/paparazzi/paparazzi-portability-support.git | ||
cd paparazzi-portability-support/linux | cd paparazzi-portability-support/linux | ||
sudo ./develenv.sh | sudo ./develenv.sh | ||
sudo apt-get install libxt-dev tcl8.4-dev | sudo apt-get install libxt-dev tcl8.4-dev | ||
65 git clone https://github.com/OCamlPro/opam.git | |||
66 sudo apt-get install lablgtk | |||
67 sudo apt-get install liblablgtk | |||
68 sudo apt-get install liblablgtk-dev | |||
69 cd opam | |||
70 ./configure | |||
71 sudo apt-get install ocaml | |||
72 sudo apt-get update | |||
73 sudo apt-get install ocaml | |||
74 sudo apt-get install libocamlnet-ocaml | |||
75 sudo apt-get install libocamlnet-ocaml-dev | |||
76 sudo apt-get install liblablgtk-ocaml-dev | |||
77 sudo apt-get install liblablgtk-ocaml | |||
78 sudo apt-get install liblablgtk-dev | |||
79 apt-cache search libgtk | |||
80 sudo apt-get install liblablgtk-extras-ocaml-dev | |||
81 sudo apt-get install liblablgtk-extras-ocaml | |||
82 sudo apt-get install liblablgtk-extras-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 | |||
95 sudo apt-get install svn | |||
96 sudo apt-get install svn-client | |||
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 | |||
129 ll | |||
130 ivy-c-3.12.1/ | |||
131 cd ivy-c-3.12.1/ | |||
132 ll | |||
133 cd src/ | |||
134 ll | |||
135 make | |||
136 ll | |||
137 make install | |||
138 cd / | |||
139 find -iname ivy*deb | |||
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 | |||
146 cd ../ | |||
154 cd ../../ | |||
155 cd ../ | |||
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/ | |||
159 ll | |||
160 make | |||
161 make -fPIC | |||
162 nano makefile | |||
163 sudo apt-get install nano | |||
164 ll | |||
165 nano Makefile | |||
166 make | |||
167 make clean | |||
168 make | |||
169 ll | |||
170 make install | |||
171 dpkg-buildpackage -rfakeroot -us -uc | |||
172 make clean | |||
173 dpkg-buildpackage -rfakeroot -us -uc | |||
174 dpkg-buildpackage -rfakeroot -d -us -uc | |||
Revision as of 09:22, 3 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:
- A gumstix board
- Camera
- 3.5" screen (such as the LCD panel with the Chestnut) or 4.3"
Software
Needed softwares to run this application:
- Paparazzi software
- Kivy library
- Ubuntu kernel on your Gumstix
- 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 trought 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)
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 locale-gen 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.
Install paparazzi on the gumstix
Errors: W: Failed to fetch http://www.cl.cam.ac.uk/~lpw25/ocaml-rpi/dists/wheezy/main/binary-armel/Packages 404 Not Found
W: Failed to fetch http://paparazzi.enac.fr/debian/dists/wheezy/main/binary-armel/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead. E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. root@linaro-ubuntu-desktop:~# sudo dpkg --configure -a
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
65 git clone https://github.com/OCamlPro/opam.git 66 sudo apt-get install lablgtk 67 sudo apt-get install liblablgtk 68 sudo apt-get install liblablgtk-dev 69 cd opam 70 ./configure 71 sudo apt-get install ocaml 72 sudo apt-get update 73 sudo apt-get install ocaml 74 sudo apt-get install libocamlnet-ocaml 75 sudo apt-get install libocamlnet-ocaml-dev 76 sudo apt-get install liblablgtk-ocaml-dev 77 sudo apt-get install liblablgtk-ocaml 78 sudo apt-get install liblablgtk-dev 79 apt-cache search libgtk 80 sudo apt-get install liblablgtk-extras-ocaml-dev 81 sudo apt-get install liblablgtk-extras-ocaml 82 sudo apt-get install liblablgtk-extras-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 95 sudo apt-get install svn 96 sudo apt-get install svn-client 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 129 ll 130 ivy-c-3.12.1/ 131 cd ivy-c-3.12.1/ 132 ll 133 cd src/ 134 ll 135 make 136 ll 137 make install 138 cd / 139 find -iname ivy*deb 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 146 cd ../ 154 cd ../../ 155 cd ../ 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/ 159 ll 160 make 161 make -fPIC 162 nano makefile 163 sudo apt-get install nano 164 ll 165 nano Makefile 166 make 167 make clean 168 make 169 ll 170 make install 171 dpkg-buildpackage -rfakeroot -us -uc 172 make clean 173 dpkg-buildpackage -rfakeroot -us -uc 174 dpkg-buildpackage -rfakeroot -d -us -uc
Experimental steps
- 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.