Outils pour utilisateurs

Outils du site


gumstixd

compiler projet qtcreator

qmake 
make

Installation camera econ

depuis dossier binary de camera econ

scp uImage root@192.168.1.80:/boot/uImage-2.6.30

sur gumstix dans /boot/

rm uImage
ln -s uImage-2.6.30 uImage

copie du module modifié v4l2 vers le home root sur gumstix

scp v4l2_driver.ko root@192.168.1.80:

regarder le readme de econ

doc sur uboot: http://www.denx.de/wiki/DULG/Manual

presser une touche pendant le boot pour avoir uboot

setenv mmcargs setenv bootargs mem=122M i2c_bus=3,100 iconsole=${console} mpurate=${mpurate} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}
saveenv

Mise a jour openembbeded

dans org.openembedded.dev pour mettre a jour les recettes

git pull

effacer tmp pour virer les fichiers temporaires mais preserver tmp/sources (je l'ai mis dans le dossier parent)

So that recipes delete contents of tmp/work (which saves lots of rooms, particularly for the build system) to build/conf/local.conf add :

INHERIT += “rm_work”

A ranger

pour pouvoir compiler des recettes bitbake dont le code source est sur le serveur git du laas

ajouter ma clef publique à trac

ssh bvandepo@trac.laas.fr
vim ~/.ssh/authorized_keys

copier le contenu de /home/bvdp/.ssh/id_rsa.pub de la machine de développement bitbake

puis pour que l'user sur git soit bvandepo au lieu de bvdp, faire sur la machine de développement bitbake:

vim ~/.ssh/config

et ajouter ce contenu:

host trac.laas.fr
"tabulation"    user bvandepo

pour compiler la recette genom, il faut avoir genom installée sur la machine de dev. l'executable de conversion du .gen en .c reste sur la machine de dev. Sur la gumstix, il y aura seulement les executables.

voir la recette demo-genom.bb pour compiler un module genom

éventuellement, pour compiler depuis des sources en local, remplacer SOURCES… par FILES et une liste de fichiers.

install robotpkg et genom

http://homepages.laas.fr/mallet/robotpkg

dans home:

git clone ssh://bvandepo@softs.laas.fr/git/robots/robotpkg
cd robotpkg
./bootstrap --prefix=${HOME}/openrobots

ajouter à ~/.bashrc

export ROBOTPKG_BASE=/home/bvdp/openrobots

puis faire

cd ~/robotpkg/architecture/genom
make update 
bitbake -b mkdep-native_2.8
bitbake -b demo-genom

Paul's gumstix ethernet config

root@overo:~# cat /etc/rc5.d/network_eth1_static 
sleep 2
ifconfig eth1 192.168.1.80 up
route add -net default gw 192.168.1.1
root@overo:~# ls -l /etc/rc5.d/
<snip>
lrwxrwxrwx 1 root root  19 Jun 19 09:36 S99network -> network_eth1_static
-rwxrwxrwx 1 root root  76 Jun 19 09:40 network_eth1_static
-rwxrwxrwx 1 root root 102 Jun 19 09:36 network_wlan3_static

Création images, package etc...

Images pré-compilée

Pour télécharger des images de linux pré-compilée pour Gumstix Overo : http://www.sakoman.com/feeds/omap3/glibc/images/overo/

Installation des logiciels necessaires à la compilation d'une image linux

sous debian
sudo aptitude install subversion cvs git-core  build-essential help2man diffstat texi2html texinfo  libncurses5-dev gawk python-dev python-psyco  python-pysqlite2   gnome-doc-utils gettext automake flex
sous fedora
sudo yum install subversion cvs git-core  build-essential help2man diffstat texi2html texinfo  libncurses5-dev gawk python-dev python-psyco  python-pysqlite2   gnome-doc-utils gettext automake flex

d'apres http://wiki.openembedded.net/index.php/OEandYourDistro#Fedora_11

sudo yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man perl-ExtUtils-MakeMaker glibc-static
récupération OpenEmbedded
 
git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev
cd org.openembedded.dev
git checkout --track -b overo origin/overo
cd ..
git clone git://git.openembedded.net/bitbake bitbake
cd bitbake
git checkout 1.8.18
cd ..
cp -r org.openembedded.dev/contrib/gumstix/build .
vim build/profile
pour fedora
 
## Environment setup for oe
setenv BB_ENV_EXTRAWHITE "MACHINE DISTRO ANGSTROM_MODE OVEROTOP OEBRANCH USERBRANCH TITOOLSDIR"
setenv OVEROTOP "/local/users/bvandepo/overo-oe"
setenv OEBRANCH "$OVEROTOP/org.openembedded.dev"
setenv USERBRANCH "${OVEROTOP}/user.collection"
setenv PATH "${OVEROTOP}/bitbake/bin:$PATH"
setenv BBPATH "${OVEROTOP}/build:${USERBRANCH}/:${OEBRANCH}"
setenv TITOOLSDIR "${OVEROTOP}/ti"
umask 0002
## end oe setup

puis concatener avec ~/.tchrc

pour debian
## Environment setup for oe
export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE OVEROTOP OEBRANCH USERBRANCH TITOOLSDIR"
export OVEROTOP="/usr/overo-oe"
export OEBRANCH="$OVEROTOP/org.openembedded.dev"  
export USERBRANCH="${OVEROTOP}/user.collection"
export PATH="${OVEROTOP}/bitbake/bin:$PATH"
export BBPATH="${OVEROTOP}/build:${USERBRANCH}/:${OEBRANCH}"
export TITOOLSDIR= "${OVEROTOP}/ti"
umask 0002
## end oe setup

puis concatener avec ~/.bashrc

sous ubuntu, il faut changer dash contre bash

sudo ln -sf /bin/bash /bin/sh

Création et compilation d'une image / Copie sur la carte SD

Pour créer et compiler une image (installer les logiciels auparavant, puis suivre les instructions de la page suivante):

http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html

Voici les commandes à effectuer :

Note 1: If you are using an Ubuntu distribution, it is likely that /bin/sh is linked to /bin/dash. If this is the case, then you will need to change /bin/sh to link to /bin/bash. Neglecting to do this will cause target system init file corruption and your build image will not boot! Run “sudo dpkg-reconfigure dash” and answer no when asked whether you want to install dash as /bin/sh. Note 2: If you are using Ubuntu 8.04 or later you will also need to edit /etc/sysctl.conf and set 'vm.vdso_enabled = 0' and 'vm.mmap_min_addr = 0'. Afterwards run 'sudo sysctl -p' Build system checkout

First you'll want to check out the source files for OE build system (roughly 250 MB). With a typical DSL connection this step should take less than 20 minutes. You should have at least 10GB of free space on your hard drive in order to do a complete build of the kernel and root file system images.

These instructions will assume that you are installing the build system in your home directory under “overo-oe”. If you decide to put it elsewhere you will need to make appropriate alterations to the steps below.

First we will create the “overo-oe” directory and cd into it:

$ mkdir -p ~/overo-oe
$ cd ~/overo-oe

Then we will install the OE metatdata, and check out the overo branch (you can safely ignore the warnings you will get from the git commands):

$ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev
$ cd org.openembedded.dev
$ git checkout --track -b overo origin/overo

The next step installs BitBake:

$ cd ~/overo-oe
$ git clone git://git.openembedded.net/bitbake bitbake
$ cd bitbake
$ git checkout 1.8.18

Creating the OE configuration files and profile

We now will create a profile script and the configuration files required to tailor OE to our needs.

To make this a somewhat easier task, there is a template for the required files in the openembedded installation we just did.

Copy these files to your overo-oe directory:

$ cd ~/overo-oe
$ cp -r org.openembedded.dev/contrib/gumstix/build .

If you have followed the example installation and placed the build system in overo-oe in your home directory, you are now ready to proceed to the next step. If you have installed the build system in a different location you will need to edit overo-oe/build/profile and change the definition of OVEROTOP as appropriate. Source code caching

As part of the build process OpenEmbedded downloads source code tarballs for the linux kernel, compiler, and other software packages. By default this source code cache will be placed in overo-oe/sources. If you would like this cache to be located elsewhere, now is the time to edit build/conf/site.conf and set DL_DIR as appropriate. Environment setup

OpenEmbedded requires some environment setup in order to function properly. There are a couple of ways to handle this requirement. Option A: bash profile

You can set this up via your bash profile:

$ cp ~/.bashrc ~/bashrc.bak
$ cat ~/overo-oe/build/profile >> ~/.bashrc

With most distributions, adding this environment setup to ~/.bashrc will work for both GUI shells and login shells. If your distribution does not source .bashrc for login shells, you may need to use ~/.bash_profile instead of ~/.bashrc (or modify ~/.bash_profile so that it does source ~/.bashrc).

if you chose Option A for environment setup (bash profile method), log out/log back in or close your terminal window and open a new one so that the environment changes you enabled above will take effect. Option B: Command line sourcing

If you don't want to modify your standard terminal profile for some reason, you can do this environment setup on a per session basis by sourcing overo-oe/build/profile prior to issuing any build commands:

$ . ~/overo-oe/build/profile

or alternatively:

$ source ~/overo-oe/build/profile

If you chose Option B (command line sourcing), issue the command to source the environment setup. Your first build

You can build a basic kernel and non-gui root file system image in one step with:

$ bitbake omap3-console-image

If your build machine is missing any essential packages, bitbake will notify you about them at this point. Install the recommended packages and try the bitbake command again.

You will also get a message from bitbake suggesting that you install the psyco JIT compiler for better performance. It isn't necessary to install psyco right now, though it is a good idea to install it at some point.

You may also notice another message complaining about not finding user.collection/packages/*/*.bb. Don't concern yourself with this – you will create this directory later when you create your first package for your own code.

This initial build will take a bit of time since it will need to download all the source code and build the cross compilation tools. Subsequent builds will be much faster. When the build completes, you will find the root file system image and the kernel image in $HOME/overo-oe/tmp/deploy/glibc/images/overo 













==== Pour créer les partitions sur la carte microSD et copier l'image de linux : ==== 

http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html


The Overo COM will boot directly from a properly prepared microSD card. This section will outline how to partition and format a bootable microSD card.

In order to create a bootable microSD compatible with the OMAP3 boot ROM, you must set a special geometry using the fdisk "Expert mode".

This example will show the steps for setting up a brand new 2GB microSD card.

First insert your card into your development machine's flash card slot. You may need to use a microSD to SD card adaptor to fit your slot.

On my Ubuntu 8.04 machine, the newly inserted card shows up as /dev/sde and that is the device name that will be used through this example. You should substitute the proper device name for your machine. You can use 'mount' or 'df' to see where the card mounts on your machine.

Let's unmount the device's existing file system before we get started with fdisk:

  $ sudo umount /dev/sde1

Partitioning the card

Now launch fdisk and create an empty partition table. Note that the argument for fdisk is the entire device (/dev/sde) not just a single partition (i.e. /dev/sde1):

# sudo fdisk /dev/sde
Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Let's first look at the current card information:

Command (m for help): p
Disk /dev/sde: 2032 MB, 2032664576 bytes
64 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes
Disk identifier: 0x00aa8e5c
Device Boot      Start         End      Blocks   Id  System

Note the card size in bytes. We will needed it later in the process.

Now go into “Expert” mode:

Command (m for help): x

Next we will set the geometry to 255 heads, 63 sectors and a calculated value for the number of cylinders required for the particular microSD card.

To calculate the number of cylinders, we take the 2032664576 bytes reported above by fdisk divided by 255 heads, 63 sectors and 512 bytes per sector:

2032664576 / 255 / 63 / 512 = 247.12 which we round down to 247 cylinders.

Expert command (m for help): h
Number of heads (1-256, default 4): 255
Expert command (m for help): s
Number of sectors (1-63, default 62): 63
Warning: setting sector offset for DOS compatiblity
Expert command (m for help): c
Number of cylinders (1-1048576, default 984): 247

Return to fdisk's main mode and create a new partition 32 MB FAT partition:

Expert command (m for help): r
Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-247, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-247, default 15): +32M

Change the partition type to FAT32:

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

And mark it bootable:

Command (m for help): a
Partition number (1-4): 1

Next we create an ext3 partition for the rootfs:

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (6-247, default 6): 6
Last cylinder or +size or +sizeM or +sizeK (6-247, default 247): 247

To verify our work, lets print the partition info:

Command (m for help): p
Disk /dev/sde: 2032 MB, 2032664576 bytes
255 heads, 63 sectors/track, 247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00aa8e5c
Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *           1           5       40131    c  W95 FAT32 (LBA)
/dev/sde2               6         247     1943865   83  Linux

Up to this point no changes have been made to the card itself, so our final step is to write the new partition table to the card and then exit:

Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

Formatting the new partitions

We format the first partition as a FAT file system (the -n parameter gives it a label of FAT, you can change or omit this if you like):

#  sudo mkfs.vfat -F 32 /dev/sde1 -n FAT
mkfs.vfat 2.11 (12 Mar 2005)

We format the second partition as an ext3 file system:

$ sudo mkfs.ext3 /dev/sde2
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
121920 inodes, 485966 blocks
24298 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=499122176
15 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: ^[done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Installing the boot files

There are three files required on the first (FAT) partition to boot your Overo:

1. MLO: the boot-loader loader - this small program is loaded into the OMAP3 processor's static RAM. It does some minimal configuration of system memory and io pins and then loads the second file. 2. u-boot.bin: the boot loader 3. uImage: the linux kernel

You can build these yourself or download pre-built images. It is important that these three files have precisely these names.

Once you have completed building or downloading these files, mount the FAT partition of your microSD card. This example will assume that you have mounted it at /media/card:

sudo mount /dev/sde1 /media/card

Due to constraints of the mask boot ROM in the OMAP processor, MLO should be written first:

$ sudo cp MLO-overo /media/card/MLO

Then copy u-boot and the linux kernel to the card:

$ sudo cp u-boot-overo.bin /media/card/u-boot.bin
$ sudo cp uImage-overo.bin /media/card/uImage

You can now unmount the FAT partition:

$ sudo umount /dev/sde1

At this point you have a bootable FAT partition.

The final step is to untar your desired rootfs onto the ext3 partition that you created above.

Note that this step can be dangerous. You do not want to untar your Overo rootfs onto your development machine - be careful!

This example will assume that you have mounted it at /media/card:

$ sudo mount /dev/sde2 /media/card

Now untar your desired rootfs:

$ cd /media/card
$ sudo tar xvjf /path/to/omap3-console-image-overo.tar.bz2 

You can now unmount the ext3 partition:

$ sudo umount /dev/sde2  

Configuration de la communication entre la Gumstix et un PC

installer le logiciel minicom : apt-get install minicom

exécution du logiciel : minicom /dev/ttyUSB0 kernel-module-v4l2-common Configuration du logiciel :

o ⇒ configure minicom serial port setup ⇒ régler le port A⇒ serial device sur le port usb ou est connecté la gumstix /dev/ttyUSB0

		         régler le mode de transfert E => sur 115200 (vitesse) 8N1 (8bit, aucune parité, 1bit de stop)
		         régler F (Hardware Flow Control) et G (Software Flow Control) => « NO »
			
Faire « Y » en quittant puis « Save setup as dev_ttyUSB0 », puis « Exit »

Si rien est branché brancher d'abord l'usb, ensuite l'alimentation! Sinon débrancher et rebrancher l'alimentation de la carte.

Sites interessants

Problèmes / Erreurs

=> Erreur au début de la compilation

Please install following missing utilities: C++ Compiler (${BUILD_PREFIX}g++)

Il faut installer G++ avec la commande : sudo aptitude install g++



 == => Erreur de proxy lors de la compilation : == 

Impossible de télécharger les fichiers à la compilation, il suffit d'éditer un fichier «~/.wgetrc» avec dedans :

// http_proxy = http://'proxy-name':'port-number'

ftp_proxy = http://'proxy-name':'port-number'

use_proxy = on
 //


==== pour installer des modules, softs etc... ====
`
http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Installing-additional-sw-packages/111.html


===== webcam =====
on va utiliser v4l,
exemple pour grabber une image en c++:
http://staff.science.uva.nl/~bterwijn/Projects/V4L2/html/


doc perso sur drivers etc: https://bvdp.inetdoc.net/wiki/doku.php?id=camerauvc


liste les periphs usb branchés:
  lsusb


  dmesg | grep v4

liste des modules chargés:
  lsmod


verifier si un package est installé:
  opkg list-installed | grep 7311
  opkg list-installed | grep v4l
  opkg list-installed | grep uvc

décharger un module: 
  rmmod v4l2-common

chargement de module:
  modprobe gspca-pac7311
  modprobe v4l2-common

on peut automatiser le chargement de ces modules au démarrage en editant /etc/modules

lister les modules chargés:
  lsmod

affichage du flux de données depuis la webcam:
  cat /dev/video0 

on doit obtenir ces modules chargés :
  v4l2_common            16258  0 
  gspca_pac7311          12405  0 
  gspca_main             21653  1 gspca_pac7311
  videodev               33496  2 v4l2_common,gspca_main
  v4l1_compat            14083  1 videodev
  ipv6                  225222  10 

===== clef usb wifi =====
pour la clef blanche
  opkf list-installed  pipe grep rt73
  modprobe  rt73usb
  iwconfig wlan0


voir: https://help.ubuntu.com/community/WifiDocs/Driver/RalinkRT73

 
===== Communication via liaison serie avec le mac =====
installer driver (v2.2.14):
http://www.ftdichip.com/Drivers/VCP.htm

installer minicom 
  sudo port install minicom

le device est accessible en tty.usbserial-A7005rIY 


===== configuration wifi sur mac =====
  /opt/local/bin/airport

  /opt/local/bin/airport -s
  
  Chan Nois Sign  Address            Beac Flgs  SLen  SSID
   9 65444 65470  00:25:84:93:cf:50   100 0431    11: laas-secure
  11 65444 65481  00:12:01:b0:0e:c0   100 0c31    11: laas-secure
  13 65442 65468  00:25:84:90:6d:f0   100 0431    11: laas-secure
  11 65444 65481  00:12:01:b0:0e:c1   100 0c21    12: laas-welcome
   9 65444 65468  00:25:84:93:cf:51   100 0421    12: laas-welcome
  13 65442 65479  00:25:84:90:6d:f1   100 0421    12: laas-welcome
  44 65442 65466  00:14:a5:30:9e:5e   100 0411     8: LAASHRP2



rejoindre un reseau wifi
  /opt/local/bin/airport -J linksys

créer un reseau ad hoc wifi
 /opt/local/bin/airport -A netgumstix 0x0000000000 11

===== acces au routeur wifi linksys =====
http://192.168.1.1
log: rien
psw: admin 
===== carte wifi =====

configuration fonctionnelle au 23 septembre 2010

carte sd 2 

carte wifi intégrée de l'overo 1 sur tobi 1

script sl2 copié en /etc/init.d/setupnetwork puis link 
  ln -s /etc/init.d/setupnetwork /etc/rc2.d/S99setupnetwork
  

          
  #/bin/sh
  export ADAPT="wlan3"
  route flush
  ifconfig $ADAPT down

iwconfig $ADAPT  mode managed
ifconfig $ADAPT inet  192.168.1.101 netmask 255.255.255.0
route add default gw  192.168.1.6
iwconfig $ADAPT rate 6M
iwconfig $ADAPT channel 1
ifconfig $ADAPT up
sleep 3
iwconfig $ADAPT essid linksys
sleep 5
iwconfig $ADAPT essid linksys

routeur wifi linksys configuré pour ne pas diffuser son ssid, il faut demander a se connecter en tapant le nom sous mac

plante a cause du module rt73usb lors de ifconfig, a retester

carte wifi noire 500mW

opkg list-installed | grep 8187                                   
kernel-module-rtl8187 - 2.6.32-r51.5       
modprobe rtl8187 

du coup il accepte

iwconfig wlan0 txpower 500mW  
ifconfig wlan0 192.168.1.107 

automatisation par script:

creer un script /home/root/setupnetwork:

iwconfig wlan0 rate 54M
iwconfig wlan0 channel 6
iwconfig wlan0 mode managed
iwconfig wlan0 essid "linksys"
iwconfig wlan0 txpower 100mW
iwlist 
ifconfig -a
ifconfig wlan0 192.168.1.107 
ifconfig wlan0 up    

copier le script vers /etc/init.d/

cp  /home/root/setupnetwork  /etc/init.d/

update-rc.d  /etc/init.d/setupnetwork defaults

et faire un lien symbolique:

ln -s /etc/init.d/setupnetwork /etc/rc2.d/S99setupnetwork

ca ne marche pas, sans doute les modules de /etc/modules sont charges trop tard (carte wifi?)

http://www.labri.fr/perso/billaud/presentations/linux2002/POLY/admin-unix-2.html

http://www.commentcamarche.net/forum/affich-2062649-lancer-un-script-au-demarrage

automatisation par fichier de config (ne marche pas encore):

mkdir /etc/sysconfig/network-scripts cd /etc/sysconfig/network-scripts vim ifcfg-wifi

DEVICE=wlan0 ONBOOT=yes # Monter l'interface au démarrage TYPE=Wireless USERCTL=no # Contrôle par un simple utilisateur BOOTPROTO=none # Remplacer par dhcp, mais peut poser des problèmes au démarrage HWADDR=00:e0:4c:03:23:f4 # L'adresse MAC de votre carte NETMASK=255.255.248.0 #DHCP_HOSTNAME=pioupiou1-wifi # Nom de votre ordinateur lorsque le dhcp est utilisé IPADDR=192.168.1.107 # Adresse fixe de votre interface wifi #DOMAIN= #NETWORK=192.193.1.0 # Adresse réseau GATEWAY=192.168.1.1 # Adresse de votre passerelle IPV6INIT=no PEERDNS=yes ESSID=linksys # Le nom de votre réseau wifi (ESSID) CHANNEL=6 # Le canal utilisé par votre point d'accès wifi MODE=Managed # Mode wifi utilisé (Master, Adhoc - Managed par défault) IWCONFIG=“AP 00:16:B6:40:F7:4E” # Adresse MAC de votre point d'accès wifi RATE=54M # Cette valeur permet d'augmenter la stabilité (laisser vide).

touch /etc/sysconfig/network-scripts/ifcfg-wifi

ne marche pas….

connexion en ssh sur la gumstix

ssh root@192.168.1.107

copie de fichiers vers la gumstix

 scp overo_snapshot_19.pdf root@192.168.1.107:/home/root/

copie de fichiers depuis la gumstix en étant loggé sur la gumstix par ssh

scp overo_snapshot_19.pdf guillaume@192.168.1.102:/home/guillaume   

Screen

en cas de connexion par ssh, si on perd la connexion, au bout d'un certain temps, les programmes plantent à cause de debordement de buffer. pour lancer proprement des softs depuis un autre pc, on utilise ssh puis on lance screen

yum install screen

une fois connectée à la machine, lancer

screeen

avant de déconnecter le cable reseau, pour rendre la main, taper

CTRL-A  D

puis exit de ssh

a la prochaine connexion ssh, pour reprendre la main, taper

screen -r

infos sur un module

modinfo rtl8187

modules à charger pour la gumstix

-driver webcam serverin: gspca-pac7311

-driver video for linux: v4l2-common

-driver clef usb dlink wifi: rt73usb

-driver clef usb noire wifi: rtl8187

hokuyo

Pour charger le fichier cdc_acm

Pour charger dans un premier temps on peut modifier le fichier 'modules' qui se trouve dans :

/etc/

de la facon suivante :

### This file is automatically generated by update-modules"
#
# Please do not edit this file directly. If you want to change or add
# anything please take a look at the files in /etc/modutils and read
# the manpage for update-modules.
#
### update-modules: start processing /etc/modutils/cdc_acm
cdc_acm

### update-modules: end processing /etc/modutils/cdc_acm

### update-modules: start processing /etc/modutils/ipv6
ipv6

### update-modules: end processing /etc/modutils/ipv6

La deuxième solution pour ne pas toucher au fichier 'modules' de /etc/ qui est généré automatiquement Il est possible de créer un fichier (script) qui sera automatiquement executé au démarrage de la gumstix

Ce fichier doit se trouver dans : /etc/rc'num du runlevel'.d (par exemple:/etc/rc5.d/) pour avoir le numéro du runlevel 2 possibilités :

soit taper la commande runlevel (ici on trouve le numéro 5) :
		root@overo:/etc# runlevel
		N 5

Soit au démarrage de la gumstix le numéro est précisé :
		INIT: Entering runlevel: 5

Le fichier doit porter un nom de la forme “S'numéro''nom'” (par exemple numéro=90 et nom=local : S90local) Le fichier doit contenir, pour lancer le module cdc_acm au démarrage, la ligne de commande :

modprobe cdc_acm

Une fois le fichier sauvegardé il suffit de redémarrer la carte gumstix (reboot) et vérifier que le module a bien été chargé au démarrage avec la commande 'lsmod' :

root@overo:/etc/rc5.d# lsmod
Module                  Size  Used by
cdc_acm                14477  0     // => le module est bien chargé
ipv6                  219420  14 
tentative d'installation de player

http://playerstage.sourceforge.net/wiki/Cross_Compile_Player_with_Openembedded_and_bitBake

http://playerstage.sourceforge.net/wiki/Cross_Compile_Player_with_Gearbox

opkg install player-dbg_3.1.0-r0.5_armv7a.ipk 
opkg install player-dev_3.1.0-r0.5_armv7a.ipk  
opkg install   player_3.1.0-r0.5_armv7a.ipk

résultat:

 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'

root@overo:~/hokuyo# opkg install player-dbg_3.1.0-r0.5_armv7a.ipk

Installing player-dbg (3.1.0-r0.5) to root… player-dbg: unsatisfied recommendation for player player-dbg: unsatisfied recommendation for glibc-dbg player-dbg: unsatisfied recommendation for libltdl-dbg player-dbg: unsatisfied recommendation for libjpeg-dbg player-dbg: unsatisfied recommendation for libz-dbg player-dbg: unsatisfied recommendation for libstdc++-dbg player-dbg: unsatisfied recommendation for libgcc-dbg Configuring hicolor-icon-theme. usr/lib/opkg/info/hicolor-icon-theme.postinst: line 7: gdk-pixbuf-query-loaders: not found usr/lib/opkg/info/hicolor-icon-theme.postinst: line 13: gtk-update-icon-cache: not found Configuring player-dbg. Collected errors: * pkg_run_script: postinst script returned status 127. * opkg_configure: hicolor-icon-theme.postinst returned 127.

root@overo:~/hokuyo# root@overo:~/hokuyo# opkg install player-dev_3.1.0-r0.5_armv7a.ipk Installing player-dev (3.1.0-r0.5) to root… player-dev: unsatisfied recommendation for libtool-dev player-dev: unsatisfied recommendation for libjpeg-dev player-dev: unsatisfied recommendation for libc6-dev player-dev: unsatisfied recommendation for libltdl-dev player-dev: unsatisfied recommendation for libz-dev player-dev: unsatisfied recommendation for libstdc++-dev player-dev: unsatisfied recommendation for libgcc-dev Configuring hicolor-icon-theme. usr/lib/opkg/info/hicolor-icon-theme.postinst: line 7: gdk-pixbuf-query-loaders: not found usr/lib/opkg/info/hicolor-icon-theme.postinst: line 13: gtk-update-icon-cache: not found Collected errors: * satisfy_dependencies_for: Cannot satisfy the following dependencies for player-dev: * player * * opkg_install_cmd: Cannot install package player-dev. * pkg_run_script: postinst script returned status 127. * opkg_configure: hicolor-icon-theme.postinst returned 127. root@overo:~/hokuyo# root@overo:~/hokuyo# opkg install player_3.1.0-r0.5_armv7a.ipk Installing player (3.1.0-r0.5) to root…

Configuring hicolor-icon-theme. usr/lib/opkg/info/hicolor-icon-theme.postinst: line 7: gdk-pixbuf-query-loaders: not found usr/lib/opkg/info/hicolor-icon-theme.postinst: line 13: gtk-update-icon-cache: not found Collected errors: * satisfy_dependencies_for: Cannot satisfy the following dependencies for player: * libjpeg62 * libstdc++6 * * opkg_install_cmd: Cannot install package player. * pkg_run_script: postinst script returned status 127. * opkg_configure: hicolor-icon-theme.postinst returned 127. root@overo:~/hokuyo# root@overo:~/hokuyo# Broadcast message from root (ttyS2) (Thu Apr 15 22:11:53 2010):

hokuyo matthieu

http://artisan.karma-lab.net/node/60

apres avoir installe un paquet hokuyo:

ls /usr/lib/ipkg/info/ | grep hokuyo                                                                                             
  gbx-hokuyo-aist.control                                                                                                                                   
  gbx-hokuyo-aist.list   
vim /usr/lib/ipkg/info/gbx-hokuyo-aist.list   
  /usr/lib/gearbox/libhokuyo_aist.so.1.0.0
  /usr/bin/hokuyo_aist_example
ln -s /dev/usbdev1.10 /dev/ttyACM0 

en remplacant le 10 par le numero de device affiche a la connexion sur l'usb → probleme /dev/usbdev1.10 n'est pas utilisable par /usr/bin/hokuyo_aist_example

Le device a besoin du module cdc_acm

modprobe cdc_acm

fichiers .bb installé sur borderouge dans:

cd /local/users/bvandepo/overo-oe/hokuyo/gearbox-oe

Ils sont sous git, a mettre dans user.collection/recipes/

  git clone ssh://trac.laas.fr/git/robots/gearbox-oe

connexion en ssh sur borderouge pour compiler

ne pas oublier de faire

source ~/.tcshrc

verifier avec env si j'ai bien le meme environnement que: https://bvdp.inetdoc.net/data/envpourbitbake

driver adaptateur USB-serie bleu turquoise

Centrale MTI Xsens

Installation sur borderouge

par defaut les devices /dev/ttyUSB0 et 1 ne sont pas accessibles à tous les utilisateurs

pour changer temporairement le propriétaire du device:

sudo chown -vR bvandepo /dev/ttyUSB0

pour le configurer de manière permanente:

créer un fichier /etc/udev/rules.d/99-mti.rules
SYSFS{idVendor}="04033", SYSFS{idProduct}=="6010", MODE="0666", OWNER="root", GROUP="root"

configuration de minicom pour dialoguer avec la MTI:

115200 baus 8N2 Stops, Pas de controle logiciel et materiel

driver Xsens MTI

matthieu a fait la recette et explique comment intégrer les paquet openrobots dans bitbake:

https://intranet.laas.fr/intranet/robots/wiki/Gumstix/OpenEmbedded#preview

modules

modprobe usbserial
modprobe ftdi_sio vendor=0x0403 product=0x6010    

programme de test

MTIHardTest -v /dev/ttyUSB0 -o 1 -d 2

http://www.lefinnois.net/wp/index.php/2009/04/15/ttyusb0-ttyusb2-non-ttyusb1-graaaahh-udev/

  • je branche un adaptateur, il est accessible via /dev/ttyUSB0
  • j'en branche un autre qui devient /dev/ttyUSB1
  • je débranche le premier et en branche deux autres et ça devient la fête aux ttyUSB*

Où est ma Fonera 1, où est mon Attiny2313, où est ma Fonera 2… etc… ?

On trouve dans /sys/bus/usb-serial/devices plein de choses intéressantes avec udevinfo -a -p. Parmi lesquelles :

ATTRS{manufacturer}=="FTDI"
ATTRS{product}=="FT232R USB UART"
ATTRS{serial}=="A90066ai"

Du coup, il ne reste plus qu'à se construire des petites règles sympathiques dans un fichier placé dans /etc/udev/rules.d :

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="FT232R USB UART", \
SYSFS{serial}=="A90066j7", SYMLINK+="TTYUSB0"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="FT232R USB UART", \
SYSFS{serial}=="A90066ac", SYMLINK+="TTYUSB1"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="FT232R USB UART", \
SYSFS{serial}=="A900669W", SYMLINK+="TTYUSB2"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="FT232R USB UART", \
SYSFS{serial}=="A90066ai", SYMLINK+="TTYUSB3"

On redémarre udev avec un petit /etc/init.d/udev restart et on marque des petits chiffres au feutre indélébile sur les adaptateurs. A la connexion du périphérique identifié par son numéro de série, un lien symbolique est créé dans /dev. Peu importe le /dev/ttyUSB*, le lien symbolique donne toujours accès au bon périphérique.

Done.

PS : ça marche pour plein de périphériques. Ceci inclus les clef USB par exemple :

BUS=="usb", SYSFS{serial}=="123456789ABCDEF", NAME="%k", SYMLINK="usbkey1"

Article posté on Mercredi, 15 avril 2009 à 21:19 dans Configuration. Vous pouvez suivre les commentaires sur cet article via un feed RSS 2.0. Commentaires et pings fermés.

compilation d'une image linux perso

structure des dossiers de OpenEmbedded

recettes pour les images: $OVEROTOP/org.openembedded.dev/recipes/images

  j'utilise omap3-console-image.bb
j'y ai ajouté notamment:

  TOOLS_INSTALL = " \
    pocolibs \
    gbx-hokuyo-aist \  
    mti-libs \
    jpeg-dev\
    tiff\
    busybox\
    gcc\
    glibc\
    libstdc++-dev\
    libtool-dev\
    pstree\
    unzip\
    bash \
    bzip2 \

fichiers image résultat:    $OVEROTOP/tmp/deploy/glibc/images/overo/

attention les differentes versions sont stockees… elles prennent de la place (a peu pres 300mo par image). le lien symbolique omap3-console-image-overo.tar.bz2 pointe normallement vers la derniere version

Angstrom-omap3-console-image-glibc-ipk-2010.4-test-20100520-overo.rootfs.tar.bz2
Angstrom-omap3-console-image-glibc-ipk-2010.4-test-20100520-overo-testlab
modules-2.6.32-r51-overo.tgz
omap3-console-image-overo.tar.bz2
u-boot-overo-2009.11.1+r0+git327f51adacfe8c7b633f90306d646ae03e098554-r0.bin
u-boot-overo.bin
uImage-2.6.32-r51-overo.bin
uImage-overo.bin

fichiers recettes du laas: $OVEROTOP/org.openrobots.dev/recipes


   demo-genom
   gearbox  --> drivers du hokuyo
    gbx-common.inc
    gbx-flexiport.bb
    gbx-hokuyo-aist.bb
    gbx-share.bb
   genom
   mkdep
   mti-libs  --> drivers de la centrale xsense
    mti-libs.bb  
    mti-libs_git.bb
   pocolibs  --> fonctions de communications ( peut être utile pour mti, demander a Matthieu)
    pocolibs_git.bb
===== installation des paquets pour hokuyo=====
lors de l'installation d'un paquet, pour avoir plus d'infos:
  opkg install -V2  hokuyogood_1.0-r0.5_armv7a.ipk 

soit les intégrer directement à l'image système, soit installer les ipk a posteriori

  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-flexiport_9.11-r1.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-flexiport-dbg_9.11-r1.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-flexiport-dev_9.11-r1.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-hokuyo-aist_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-hokuyo-aist-dbg_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-hokuyo-aist-dev_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-share_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-share-dbg_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/gbx-share-dev_9.11-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/hokuyogood_1.0-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/hokuyogood-dbg_1.0-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/hokuyogood-dev_1.0-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/hokuyogood-doc_1.0-r0.5_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/mti-libs_0.4+git63d1948-r0.6_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/mti-libs-dbg_0.4+git63d1948-r0.6_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/mti-libs-dev_0.4+git63d1948-r0.6_armv7a.ipk ./
  scp bvandepo@borderouge.laas.fr:/local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a/mti-libs-static_0.4+git63d1948-r0.6_armv7a.ipk ./




  opkg install gbx-flexiport_9.11-r1.5_armv7a.ipk 
  opkg install gbx-share_9.11-r0.5_armv7a.ipk 
  opkg install gbx-hokuyo-aist_9.11-r0.5_armv7a.ipk 	
  opkg install hokuyogood_1.0-r0.5_armv7a.ipk 
  opkg install mti-libs_0.4+git63d1948-r0.6_armv7a.ipk
   
  
  

  chmod +x hokuyogoodgumstix 

scprit shell pour configurer le reseau et executer hokuyogumstix 
  #/bin/sh
  ifconfig eth0 10.31.4.9
  export LD_LIBRARY_PATH=/usr/lib/gearbox/
  modprobe cdc_acm
  cd /home/root/hokuyogood/gumstix
  ./hokuyogoodgumstix /dev/ttyACM0

===== variables d'environnement =====
dans .tcshrc 
  ## Environment setup for oe
  #
  #
  setenv BB_ENV_EXTRAWHITE "MACHINE DISTRO ANGSTROM_MODE OVEROTOP OEBRANCH ROBOTSBRANCH USERBRANCH TITOOLSDIR"
  setenv OVEROTOP "/local/users/bvandepo/overo-oe"
  setenv ROBOTSBRANCH "$OVEROTOP/org.openrobots.dev“

setenv OEBRANCH "$OVEROTOP/org.openembedded.dev"
setenv USERBRANCH "${OVEROTOP}/user.collection"
setenv PATH "${OVEROTOP}/bitbake/bin:$PATH"
setenv BBPATH "${OVEROTOP}/build:${USERBRANCH}/:${OEBRANCH}"
setenv TITOOLSDIR "${OVEROTOP}/ti"
umask 0002
#
## end oe setup
#
#~               

mtiG

branche GPS du depot git

modifier dans la recette mti-libs_git.bb pour choisir la version que l'on veut

SRCREV = "b4638df"

ce sont les premiers numeros d'un commit (on peut les voir en faisant gitk)

cette version est celle qui fonctionne sous mac, pour laquelle il y a le flag -lrt dans le fichier Makefile.in, pour modifier les sources en local, editer : /local/users/bvandepo/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/mti-libs-0.4+gitbcccc5e-r0/git/test/test.cpp

pour cleaner (obligatoire!)

bitbake -b org.openrobots.dev/recipes/mti-libs/mti-libs_git.bb -c clean

pour aller chercher les sources sur le depot git

bitbake -b org.openrobots.dev/recipes/mti-libs/mti-libs_git.bb -c fetch

pour builder

bitbake -b org.openrobots.dev/recipes/mti-libs/mti-libs_git.bb

on obtient les 4 ipk dans: /local/users/bvandepo/overo-oe/tmp/deploy/glibc/ipk/armv7a

IMPORTANT: Si il y a un probleme avec le fetch, il faut effacer dans $OVEROTOP/sources/git


mes sources sont sur garossos dans ~/robotpkg/hardware/MTI/work.garossos.laas.fr/MTI-0.4/test



=====formation gumstix laas=====

  dhclient eth0
  

=====compilation avec paquet paparazzi-omap=====

fichier Makefile:
  OVERO_CC = /opt/paparazzi/omap/overo-oe/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-  gnueabi-gcc
  CFLAGS += -Wall -std=gnu99
  IPOVERO=192.168.31.17
  all: 	hello upload exec
  hello: hello.c
  	$(OVERO_CC) $(CFLAGS) $^ -o $@
  clean:
  #	rm *.o 
  	rm hello
  upload:
  	scp ./hello root@$(IPOVERO):/home/root/hello

exec:	
	ssh root@192.168.31.17 /home/root/hello

Compilation depuis mac en lançant la compil avec VirtualBox Linux

script sur mac:

# pour lancer la compil bitbake depuis mac
#/bin/sh
export OVEROTOP=/usr/overo
export DOSSIER="hokuyo_makearm"
#synchronise les sources sur linux
rsync -av -e 'ssh -p 2222' -r   ~/Desktop/hokuyo/$DOSSIER/ bvdp@127.0.0.1:/$OVEROTOP/perso/$DOSSIER/
#compile les sources sur linux, en utilisant le script compilbb
ssh -l bvdp -p 2222 127.0.0.1 "/home/bvdp/compilbb $DOSSIER"
#synchronise sur le mac
rsync -av -e 'ssh -p 2222' -r    bvdp@127.0.0.1:/$OVEROTOP/perso/$DOSSIER/ ~/Desktop/hokuyo/$DOSSIER/

script compilbb sur linux:

#/bin/sh
export OVEROTOP=/usr/overo 
cd $OVEROTOP/perso/$1
make clean
make
rm *.gch
gumstixd.txt · Dernière modification : 2021/02/19 21:20 de 127.0.0.1