Cross Compile Player with Openembedded and BitBake

From The Player Project

(Difference between revisions)
Jump to: navigation, search
(Compiling custom programs)
 
(11 intermediate revisions not shown)
Line 2: Line 2:
The author of this guide is new to Openembedded, bitBake and cross compiling in general so please feel free to edit, update or correct. The guide was tested on the Overo Gumstix with an iRobot Create and a Hokuyo Urg Laser.
The author of this guide is new to Openembedded, bitBake and cross compiling in general so please feel free to edit, update or correct. The guide was tested on the Overo Gumstix with an iRobot Create and a Hokuyo Urg Laser.
-
 
Special thanks to Ash Charles, Geoffrey Biggs and Rich Mattes who helped me getting this working.
Special thanks to Ash Charles, Geoffrey Biggs and Rich Mattes who helped me getting this working.
 +
== Purpose ==
 +
This guide is intended for Player users who want to have the latest version of Player on their OpenEmbedded systems.  This guide has been tested on the [http://www.beagleboard.org BeagleBoard] using the Angstrom distribution (which is based on OpenEmbedded), and on the [http://www.gumstix.net Gumstix Overo] using the OpenEmbedded distribution.  The guide should apply to most any OpenEmbedded environment.
-
'''First you must set up your build environment.'''
+
== Setting up the build environment==
-
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html For the overo gumstix]
+
If you're using a Gumstix Overo, follow the directions at gumstix.net for setting up the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html Overo environment]
-
[http://docs.openembedded.org/usermanual/html/chapter_getting_oe.html Openembedded manual]
+
Beagleboard users should first refer to the [http://code.google.com/p/beagleboard/wiki/HowToGetAngstromRunning Getting Angstrom Running] guide to get the feel for how to get Angstrom running. To set up the build environment, refer to the [http://elinux.org/BeagleBoardAndOpenEmbeddedGit OpenEmbedded and Git] guide.
-
[http://bitbake.berlios.de/manual/ bitBake manual]
+
More information on OpenEmbedded can be found in the [http://docs.openembedded.org/usermanual/html/chapter_getting_oe.html Openembedded Manual]
 +
For more information on the BitBake tool, view the [http://bitbake.berlios.de/manual/ BitBake manual] at Berlios.de.
-
'''Now do some examples '''
+
 
 +
== Compiling custom programs ==
[http://www.gumstix.net/User-How-To-s/view/Build-system-overview/Hello-world-tutorial/110.html Gumstix tutorial] (note slightly outdated and designed for the verdex, take note of the following changes:
[http://www.gumstix.net/User-How-To-s/view/Build-system-overview/Hello-world-tutorial/110.html Gumstix tutorial] (note slightly outdated and designed for the verdex, take note of the following changes:
-
Ipkg is now opkg
+
*Ipkg is now opkg
 +
*Directory structure is differerent
 +
*packages is now recipes
 +
*gumstix-oe is now overo-oe
 +
*com.gumstix.collection and org.openembedded.snapshot have been combined into org.openembedded.dev
 +
*arm5 is now arm7
-
• Directory structure is differerent
 
-
        packages is now recipes
+
[http://docs.openembedded.org/usermanual/usermanual.html#recipes_introduction OpenEmbedded Manual] (very useful resource)
-
        gumstix-oe is now overo-oe
 
-
        com.gumstix.collection and org.openembedded.snapshot have been combined into org.openembedded.dev
+
The following Makefile shows the principles of cross compiling player drivers (as plugins) outside OpenEmbedded / bitbake, but still make use of the generated toolchain for cross compiling to the Gumstix board. You will most likely have to modify the variables/paths to fit your particular system, but that is the easy part :)
 +
<pre>
 +
# ${OVEROTOP} is pointing to where you installed overo-oe / OpenEmbedded (probably ~/overo-oe/)
 +
PLAYER_VERSION=player-3.1.0-r0
 +
CROSS_COMPILE_SYSROOT := ${OVEROTOP}/tmp/sysroots/armv7a-angstrom-linux-gnueabi
 +
PLAYER_INCLUDE_DIR := ${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/${PLAYER_VERSION}/package/usr/include/player-3.1
 +
CXX := ${OVEROTOP}/tmp/sysroots/x86_64-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++
-
        arm5 is now arm7
+
all: libnxt_sense_touch_driver.so
 +
%.o: %.cpp
 +
$(CXX) -Wall -fpic -g3 --sysroot=${CROSS_COMPILE_SYSROOT} -I${PLAYER_INCLUDE_DIR} -c $<
 +
 +
libnxt_sense_touch_driver.so: nxt_sense_touch.o
 +
$(CXX) -shared -fpic --sysroot=${CROSS_COMPILE_SYSROOT} -o $@ $^
 +
 +
clean:
 +
rm -f *.o *.so
 +
</pre>
 +
It is recommended to manually inspect the pkg-config flags for playercore (where the information going into PLAYER_INCLUDE_DIR came from). They can be found in playercore.pc, e.g. ${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/player-3.1.0-r0/package/usr/lib64/pkgconfig/playercore.pc for my build. Using "find ${OVEROTOP} -name 'playercore.pc'" should show you where it is located. An alternative could be to set the environment variable PKG_CONFIG_PATH to point to the pkgconfig directory e.g. export PKG_CONFIG_PATH=${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/player-3.1.0-r0/package/usr/lib64/pkgconfig  and use `pkg-config --cflags playercore` to obtain the same information.
-
[http://docs.openembedded.org/usermanual/usermanual.html#recipes_introduction OpenEmbedded Manual] (very useful resource)
 
Line 39: Line 60:
'''
'''
-
 
+
==Player Recipe==
-
'''Player Recipe'''
+
The following recipe will cross-compile player and package it. You will need to save it as a .bb file in your recipes directory, which you should have created from the setting up a build environment.
The following recipe will cross-compile player and package it. You will need to save it as a .bb file in your recipes directory, which you should have created from the setting up a build environment.
 +
For the BeagleBoard, create a folder in openembedded/recipes directory of the buildroot, named "player". Then, save the following recipe into a file named "player.bb"
-
See below for explanation
+
For the Gumstix, create a folder in the gumstix-oe/recipes/ directory, named "player".  Then, save the following recipe into a file named "player.bb"
-
 
+
-
 
+
-
----
+
-
DESCRIPTION = "Player Robot Device Interface and Server"
+
-
 
+
-
LICENSE = "GPL"
+
 +
<pre>
 +
DESCRIPTION = "Cross-platform robot device interface and server"
 +
LICENSE = "GPLv2+ and LGPLv2+"
HOMEPAGE = "http://playerstage.sourceforge.net"
HOMEPAGE = "http://playerstage.sourceforge.net"
-
 
+
DEPENDS = "libtool jpeg guile"
-
DEPENDS = ""
+
PN = "player"
-
 
+
PV = 3.1.0
PR = "r0"
PR = "r0"
-
 
SRC_URI = "svn://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/;module=trunk;rev=HEAD;proto=https"
SRC_URI = "svn://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/;module=trunk;rev=HEAD;proto=https"
-
 
S="${WORKDIR}/trunk"
S="${WORKDIR}/trunk"
-
inherit pkgconfig
+
inherit pkgconfig cmake
do_configure () {
do_configure () {
-
cmake -DBUILD_EXAMPLES=OFF -DBUILD_DOCUMENTATION=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PLAYERCC=OFF -DBUILD_PLAYERCC_BOOST=OFF -DBUILD_PYTHONC_BINDINGS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_UTILS=OFF -DBUILD_UTILS_LOGSPLITTER=OFF -DBUILD_UTILS_PLAYERCAM=OFF -DBUILD_UTILS_PLAYERJOY=OFF -DBUILD_UTILS_PLAYERNAV=OFF -DBUILD_UTILS_PLAYERPRINT=OFF -DBUILD_UTILS_PLAYERPROP=OFF -DBUILD_UTILS_PLAYERV=OFF -DBUILD_UTILS_PLAYERVCR=OFF -DBUILD_UTILS_PLAYERWRITEMAP=OFF -DBUILD_UTILS_PMAP=OFF -DBUILD_UTILS_XMMS=OFF -DENABLE_DRIVER_ACCEL_CALIB=OFF -DENABLE_DRIVER_ACR120U=OFF -DENABLE_DRIVER_ACTS=OFF -DENABLE_DRIVER_AIOTOSONAR=OFF -DENABLE_DRIVER_ALSA=OFF -DENABLE_DRIVER_AMCL=OFF -DENABLE_DRIVER_AMTECM5=OFF -DENABLE_DRIVER_AMTECPOWERCUBE=OFF -DENABLE_DRIVER_AODV=OFF -DENABLE_DRIVER_ARTOOLKITPLUS=OFF -DENABLE_DRIVER_BLOBTODIO=OFF -DENABLE_DRIVER_BLOBTRACKER=OFF -DENABLE_DRIVER_BUMPER2LASER=OFF -DENABLE_DRIVER_BUMPERSAFE=OFF -DENABLE_DRIVER_BUMPERTODIO=OFF -DENABLE_DRIVER_CAMERA1394=OFF -DENABLE_DRIVER_CAMERACOMPRESS=OFF -DENABLE_DRIVER_CAMERAUNCOMPRESS=OFF -DENABLE_DRIVER_CAMERAUVC=OFF -DENABLE_DRIVER_CAMERAV4L=OFF -DENABLE_DRIVER_CAMERAV4L2=OFF -DENABLE_DRIVER_CAMFILTER=OFF -DENABLE_DRIVER_CANONVCC4=OFF -DENABLE_DRIVER_CLODBUSTER=OFF -DENABLE_DRIVER_CMDSPLITTER=OFF -DENABLE_DRIVER_CMUCAM2=OFF -DENABLE_DRIVER_CMVISION=OFF -DENABLE_DRIVER_CREATE=ON -DENABLE_DRIVER_CVCAM=OFF -DENABLE_DRIVER_DEADSTOP=OFF -DENABLE_DRIVER_DIOCMD=OFF -DENABLE_DRIVER_DIODELAY=OFF -DENABLE_DRIVER_DIOLATCH=OFF -DENABLE_DRIVER_DUMMY=OFF -DENABLE_DRIVER_EEDHCONTROLLER=OFF -DENABLE_DRIVER_EPUCK=OFF -DENABLE_DRIVER_ER1=OFF -DENABLE_DRIVER_ERRATIC=OFF -DENABLE_DRIVER_FAKELOCALIZE=OFF -DENABLE_DRIVER_FESTIVAL=OFF -DENABLE_DRIVER_FLEXIPORT=ON -DENABLE_DRIVER_FLOCKOFBIRDS=OFF -DENABLE_DRIVER_GARCIA=OFF -DENABLE_DRIVER_GARMINNMEA=OFF -DENABLE_DRIVER_GBXGARMINACFR=OFF -DENABLE_DRIVER_GBXSICKACFR=OFF -DENABLE_DRIVER_GLOBALIZE=OFF -DENABLE_DRIVER_GOTO=OFF -DENABLE_DRIVER_GRIDMAP=OFF -DENABLE_DRIVER_GRIPCMD=OFF -DENABLE_DRIVER_HOKUYO_AIST=OFF -DENABLE_DRIVER_IMAGESEQ=OFF -DENABLE_DRIVER_INHIBITOR=OFF -DENABLE_DRIVER_INSIDEM300=OFF -DENABLE_DRIVER_ISENSE=OFF -DENABLE_DRIVER_IWSPY=OFF -DENABLE_DRIVER_KARTOWRITER=OFF -DENABLE_DRIVER_KHEPERA=OFF -DENABLE_DRIVER_LASERBAR=OFF -DENABLE_DRIVER_LASERBARCODE=OFF -DENABLE_DRIVER_LASERCSPACE=OFF -DENABLE_DRIVER_LASERCUTTER=OFF -DENABLE_DRIVER_LASERPOSEINTERPO=OFF -DENABLE_DRIVER_LASERPTZCLOUD=OFF -DENABLE_DRIVER_LASERRESCAN=OFF -DENABLE_DRIVER_LASERSAFE=OFF -DENABLE_DRIVER_LASERTORANGER=OFF -DENABLE_DRIVER_LASERVISUALBARCO=OFF -DENABLE_DRIVER_LASERVISUALBW=OFF -DENABLE_DRIVER_LINUXJOYSTICK=OFF -DENABLE_DRIVER_LINUXWIFI=OFF -DENABLE_DRIVER_LOCALBB=OFF -DENABLE_DRIVER_MAPCSPACE=OFF -DENABLE_DRIVER_MAPFILE=OFF -DENABLE_DRIVER_MAPSCALE=OFF -DENABLE_DRIVER_MBICP=OFF -DENABLE_DRIVER_MICA2=OFF -DENABLE_DRIVER_MICROSTRAIN=OFF -DENABLE_DRIVER_MOTIONMIND=OFF -DENABLE_DRIVER_MRICP=OFF -DENABLE_DRIVER_ND=OFF -DENABLE_DRIVER_NIMU=OFF -DENABLE_DRIVER_NOMAD=OFF -DENABLE_DRIVER_OBOT=OFF -DENABLE_DRIVER_OCEANSERVER=OFF -DENABLE_DRIVER_P2OS=OFF -DENABLE_DRIVER_PASSTHROUGH=OFF -DENABLE_DRIVER_PBSLASER=OFF -DENABLE_DRIVER_PHIDGETACC=OFF -DENABLE_DRIVER_PHIDGETIFK=OFF -DENABLE_DRIVER_PHIDGETRFID=OFF -DENABLE_DRIVER_PORTIO=OFF -DENABLE_DRIVER_POSTGIS=OFF -DENABLE_DRIVER_PTU46=OFF -DENABLE_DRIVER_RANGERPOSEINTERP=OFF -DENABLE_DRIVER_RANGERTODIO=OFF -DENABLE_DRIVER_RANGERTOLASER=OFF -DENABLE_DRIVER_RCORE_XBRIDGE=OFF -DENABLE_DRIVER_READLOG=OFF -DENABLE_DRIVER_REB=OFF -DENABLE_DRIVER_RELAY=OFF -DENABLE_DRIVER_RFLEX=OFF -DENABLE_DRIVER_ROBOTEQ=OFF -DENABLE_DRIVER_ROBOTINO=OFF -DENABLE_DRIVER_ROBOTRACKER=OFF -DENABLE_DRIVER_ROOMBA=OFF -DENABLE_DRIVER_RS4LEUZE=OFF -DENABLE_DRIVER_RT3XXX=OFF -DENABLE_DRIVER_SEGWAYRMP=OFF -DENABLE_DRIVER_SEGWAYRMP400=OFF -DENABLE_DRIVER_SERIALSTREAM=OFF -DENABLE_DRIVER_SERIO=OFF -DENABLE_DRIVER_SERVICE_ADV_MDNS=OFF -DENABLE_DRIVER_SHAPETRACKER=OFF -DENABLE_DRIVER_SICKLDMRS=OFF -DENABLE_DRIVER_SICKLMS200=OFF -DENABLE_DRIVER_SICKLMS400=OFF -DENABLE_DRIVER_SICKNAV200=OFF -DENABLE_DRIVER_SICKRFI341=OFF -DENABLE_DRIVER_SICKS3000=OFF -DENABLE_DRIVER_SIMPLESHAPE=OFF -DENABLE_DRIVER_SKYETEKM1=OFF -DENABLE_DRIVER_SND=OFF -DENABLE_DRIVER_SONARTORANGER=OFF -DENABLE_DRIVER_SONYEVID30=OFF -DENABLE_DRIVER_SPHERE=OFF -DENABLE_DRIVER_SPHEREPTZ=OFF -DENABLE_DRIVER_SPHINX2=OFF -DENABLE_DRIVER_SR3000=OFF -DENABLE_DRIVER_STALLTODIO=OFF -DENABLE_DRIVER_STATGRAB=OFF -DENABLE_DRIVER_STOC=OFF -DENABLE_DRIVER_SUPPRESSOR=OFF -DENABLE_DRIVER_SWISSRANGER=OFF -DENABLE_DRIVER_TCPSTREAM=OFF -DENABLE_DRIVER_UNICAPIMAGE=OFF -DENABLE_DRIVER_UPCBARCODE=OFF -DENABLE_DRIVER_VEC2MAP=OFF -DENABLE_DRIVER_VELCMD=OFF -DENABLE_DRIVER_VFH=OFF -DENABLE_DRIVER_VIDEOCANNY=OFF -DENABLE_DRIVER_VMAPFILE=OFF -DENABLE_DRIVER_WAVEFRONT=OFF -DENABLE_DRIVER_WBR914=OFF -DENABLE_DRIVER_WRITELOG=OFF -DENABLE_DRIVER_XSENSMT=OFF -DENABLE_DRIVER_YARPIMAGE=OFF
+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCUMENTATION=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PLAYERCC=OFF -DBUILD_PLAYERCC_BOOST=OFF\
 +
-DBUILD_PYTHONC_BINDINGS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_UTILS=OFF -DBUILD_UTILS_LOGSPLITTER=OFF -DBUILD_UTILS_PLAYERCAM=OFF \
 +
-DBUILD_UTILS_PLAYERJOY=OFF -DBUILD_UTILS_PLAYERNAV=OFF -DBUILD_UTILS_PLAYERPRINT=OFF -DBUILD_UTILS_PLAYERPROP=OFF -DBUILD_UTILS_PLAYERV=OFF \
 +
-DBUILD_UTILS_PLAYERVCR=OFF -DBUILD_UTILS_PLAYERWRITEMAP=OFF -DBUILD_UTILS_PMAP=OFF -DBUILD_UTILS_XMMS=OFF -DENABLE_DRIVER_ACCEL_CALIB=OFF \
 +
-DENABLE_DRIVER_ACR120U=OFF -DENABLE_DRIVER_ACTS=OFF -DENABLE_DRIVER_AIOTOSONAR=OFF -DENABLE_DRIVER_ALSA=OFF -DENABLE_DRIVER_AMCL=OFF \
 +
-DENABLE_DRIVER_AMTECM5=OFF -DENABLE_DRIVER_AMTECPOWERCUBE=OFF -DENABLE_DRIVER_AODV=OFF -DENABLE_DRIVER_ARTOOLKITPLUS=OFF -DENABLE_DRIVER_BLOBTODIO=OFF \
 +
-DENABLE_DRIVER_BLOBTRACKER=OFF -DENABLE_DRIVER_BUMPER2LASER=OFF -DENABLE_DRIVER_BUMPERSAFE=OFF -DENABLE_DRIVER_BUMPERTODIO=OFF -DENABLE_DRIVER_CAMERA1394=OFF \
 +
-DENABLE_DRIVER_CAMERACOMPRESS=OFF -DENABLE_DRIVER_CAMERAUNCOMPRESS=OFF -DENABLE_DRIVER_CAMERAUVC=OFF -DENABLE_DRIVER_CAMERAV4L=OFF -DENABLE_DRIVER_CAMERAV4L2=OFF \
 +
-DENABLE_DRIVER_CAMFILTER=OFF -DENABLE_DRIVER_CANONVCC4=OFF -DENABLE_DRIVER_CLODBUSTER=OFF -DENABLE_DRIVER_CMDSPLITTER=OFF -DENABLE_DRIVER_CMUCAM2=OFF \
 +
-DENABLE_DRIVER_CMVISION=OFF -DENABLE_DRIVER_CREATE=ON -DENABLE_DRIVER_CVCAM=OFF -DENABLE_DRIVER_DEADSTOP=OFF -DENABLE_DRIVER_DIOCMD=OFF -DENABLE_DRIVER_DIODELAY=OFF \
 +
-DENABLE_DRIVER_DIOLATCH=OFF -DENABLE_DRIVER_DUMMY=OFF -DENABLE_DRIVER_EEDHCONTROLLER=OFF -DENABLE_DRIVER_EPUCK=OFF -DENABLE_DRIVER_ER1=OFF -DENABLE_DRIVER_ERRATIC=OFF \
 +
-DENABLE_DRIVER_FAKELOCALIZE=OFF -DENABLE_DRIVER_FESTIVAL=OFF -DENABLE_DRIVER_FLEXIPORT=OFF -DENABLE_DRIVER_FLOCKOFBIRDS=OFF -DENABLE_DRIVER_GARCIA=OFF \
 +
-DENABLE_DRIVER_GARMINNMEA=OFF -DENABLE_DRIVER_GBXGARMINACFR=OFF -DENABLE_DRIVER_GBXSICKACFR=OFF -DENABLE_DRIVER_GLOBALIZE=OFF -DENABLE_DRIVER_GOTO=OFF \
 +
-DENABLE_DRIVER_GRIDMAP=OFF -DENABLE_DRIVER_GRIPCMD=OFF -DENABLE_DRIVER_HOKUYO_AIST=OFF -DENABLE_DRIVER_IMAGESEQ=OFF -DENABLE_DRIVER_INHIBITOR=OFF \
 +
-DENABLE_DRIVER_INSIDEM300=OFF -DENABLE_DRIVER_ISENSE=OFF -DENABLE_DRIVER_IWSPY=OFF -DENABLE_DRIVER_KARTOWRITER=OFF -DENABLE_DRIVER_KHEPERA=OFF \
 +
-DENABLE_DRIVER_LASERBAR=OFF -DENABLE_DRIVER_LASERBARCODE=OFF -DENABLE_DRIVER_LASERCSPACE=OFF -DENABLE_DRIVER_LASERCUTTER=OFF -DENABLE_DRIVER_LASERPOSEINTERPOLATOR=OFF \
 +
-DENABLE_DRIVER_LASERPTZCLOUD=OFF -DENABLE_DRIVER_LASERRESCAN=OFF -DENABLE_DRIVER_LASERSAFE=OFF -DENABLE_DRIVER_LASERTORANGER=OFF -DENABLE_DRIVER_LASERVISUALBARCODE=OFF \
 +
-DENABLE_DRIVER_LASERVISUALBW=OFF -DENABLE_DRIVER_LINUXJOYSTICK=OFF -DENABLE_DRIVER_LINUXWIFI=OFF -DENABLE_DRIVER_LOCALBB=OFF -DENABLE_DRIVER_MAPCSPACE=OFF \
 +
-DENABLE_DRIVER_MAPFILE=OFF -DENABLE_DRIVER_MAPSCALE=OFF -DENABLE_DRIVER_MBICP=OFF -DENABLE_DRIVER_MICA2=OFF -DENABLE_DRIVER_MICROSTRAIN=OFF -DENABLE_DRIVER_MOTIONMIND=OFF \
 +
-DENABLE_DRIVER_MRICP=OFF -DENABLE_DRIVER_ND=OFF -DENABLE_DRIVER_NIMU=OFF -DENABLE_DRIVER_NOMAD=OFF -DENABLE_DRIVER_OBOT=OFF -DENABLE_DRIVER_OCEANSERVER=OFF \
 +
-DENABLE_DRIVER_P2OS=OFF -DENABLE_DRIVER_PASSTHROUGH=OFF -DENABLE_DRIVER_PBSLASER=OFF -DENABLE_DRIVER_PHIDGETACC=OFF -DENABLE_DRIVER_PHIDGETIFK=OFF \
 +
-DENABLE_DRIVER_PHIDGETRFID=OFF -DENABLE_DRIVER_PORTIO=OFF -DENABLE_DRIVER_POSTGIS=OFF -DENABLE_DRIVER_PTU46=OFF -DENABLE_DRIVER_RANGERPOSEINTERPOLATOR=OFF \
 +
-DENABLE_DRIVER_RANGERTODIO=OFF -DENABLE_DRIVER_RANGERTOLASER=OFF -DENABLE_DRIVER_RCORE_XBRIDGE=OFF -DENABLE_DRIVER_READLOG=OFF -DENABLE_DRIVER_REB=OFF \
 +
-DENABLE_DRIVER_RELAY=OFF -DENABLE_DRIVER_RFLEX=OFF -DENABLE_DRIVER_ROBOTEQ=OFF -DENABLE_DRIVER_ROBOTINO=OFF -DENABLE_DRIVER_ROBOTRACKER=OFF \
 +
-DENABLE_DRIVER_ROOMBA=OFF -DENABLE_DRIVER_RS4LEUZE=OFF -DENABLE_DRIVER_RT3XXX=OFF -DENABLE_DRIVER_SEGWAYRMP=OFF -DENABLE_DRIVER_SEGWAYRMP400=OFF \
 +
-DENABLE_DRIVER_SERIALSTREAM=OFF -DENABLE_DRIVER_SERIO=OFF -DENABLE_DRIVER_SERVICE_ADV_MDNS=OFF -DENABLE_DRIVER_SHAPETRACKER=OFF -DENABLE_DRIVER_SICKLDMRS=OFF \
 +
-DENABLE_DRIVER_SICKLMS200=OFF -DENABLE_DRIVER_SICKLMS400=OFF -DENABLE_DRIVER_SICKNAV200=OFF -DENABLE_DRIVER_SICKRFI341=OFF -DENABLE_DRIVER_SICKS3000=OFF \
 +
-DENABLE_DRIVER_SIMPLESHAPE=OFF -DENABLE_DRIVER_SKYETEKM1=OFF -DENABLE_DRIVER_SND=OFF -DENABLE_DRIVER_SONARTORANGER=OFF -DENABLE_DRIVER_SONYEVID30=OFF \
 +
-DENABLE_DRIVER_SPHERE=OFF -DENABLE_DRIVER_SPHEREPTZ=OFF -DENABLE_DRIVER_SPHINX2=OFF -DENABLE_DRIVER_SR3000=OFF -DENABLE_DRIVER_STALLTODIO=OFF -DENABLE_DRIVER_STATGRAB=OFF \
 +
-DENABLE_DRIVER_STOC=OFF -DENABLE_DRIVER_SUPPRESSOR=OFF -DENABLE_DRIVER_SWISSRANGER=OFF -DENABLE_DRIVER_TCPSTREAM=OFF -DENABLE_DRIVER_UNICAPIMAGE=OFF \
 +
-DENABLE_DRIVER_UPCBARCODE=OFF -DENABLE_DRIVER_VEC2MAP=OFF -DENABLE_DRIVER_VELCMD=OFF -DENABLE_DRIVER_VFH=OFF -DENABLE_DRIVER_VIDEOCANNY=OFF \
 +
-DENABLE_DRIVER_VMAPFILE=OFF -DENABLE_DRIVER_WAVEFRONT=OFF -DENABLE_DRIVER_WBR914=OFF -DENABLE_DRIVER_WRITELOG=OFF -DENABLE_DRIVER_XSENSMT=OFF \
 +
-DENABLE_DRIVER_YARPIMAGE=OFF -DENABLE_DRIVER_CREATE=OFF \
 +
-DENABLE_DRIVER_CAMERA=OFF -DENABLE_DRIVER_DIO=OFF -DENABLE_DRIVER_FIDUCAL=OFF -DENABLE_DRIVER_BLOBFINDER=OFF -DENABLE_DRIVER_NXT=OFF -DENABLE_DRIVER_MBASEDRIVER=OFF .
}
}
Line 81: Line 130:
}
}
-
FILES_${PN} = "/usr/local/bin/player \  
+
FILES_${PN} = "/usr/bin/player \  
-
/usr/local/bin/playerinterfacegen \
+
/usr/bin/playerinterfacegen \
-
/usr/local/bin/playerxdrgen \  
+
/usr/bin/playerxdrgen \  
-
/usr/local/include/* \  
+
/usr/include/* \  
-
/usr/local/lib/* \  
+
/usr/lib/* \  
-
/usr/local/share/*"
+
/usr/share/*"
-
 
+
-
----
+
-
 
+
-
 
+
-
''DEPENDS = ""'' This recipe uses a very simple config of player that does not require any dependencies, if you wanted for example to add playerv, you would first turn the cMake variable for playerv to on( -DBUILD_UTILS_PLAYERV=ON) then you would add the relevant dependency (''DEPENDS = "gtk+"'') [http://docs.openembedded.org/usermanual/html/recipes_depenencies.html More]
+
-
 
+
-
 
+
-
''PR="r0"'' Just a revision bumper
+
-
 
+
-
 
+
-
''inherit pkgconfig'' Very important [http://docs.openembedded.org/usermanual/html/pkgconfig_class.html Explanation]
+
-
 
+
-
 
+
-
''do_configure()'' Task configures cMake. I could not find a disable all drivers command so instead had to manually disable every driver that I didn't want, which is why the do_configure task is so packed and big. If you want to add a driver or change some cMake configuration find the relevant command variable and change it ie ''-DBUILD_SHARED_LIBS=ON'' or ''-DENABLE_DRIVER_BLOBTRACKER=ON''
+
-
 
+
-
 
+
-
''do_compile()'' Task runs make
+
-
 
+
-
 
+
-
''do_install()'' Installs the targets to the ${D} (destination directory, which is a directory within your build environment)
+
 +
</pre>
-
The ''FILES_${PN}'' line tells bitBake what files you want to be packaged
+
The recipe above has several important sections. 
 +
*''DEPENDS = "libtool jpeg guile"'' This recipe uses the given dependencies for building player. If you want to add playerv, you would first turn the cMake variable for playerv to on( -DBUILD_UTILS_PLAYERV=ON) then you would add the relevant dependency (''DEPENDS = "gtk+"'').  Read more in the [http://docs.openembedded.org/usermanual/html/recipes_depenencies.html OpenEmbedded Manual]
 +
*''PN'' Package Name.  This name should reflect the name of the project being packaged.
 +
*''PV'' Package Version.  This is the version number of the project being built.
 +
*''PR'' Package Revision number.  Each time the package is rebuilt with the same PV (for example, a bugfix or security update), this revision is incremented.
 +
*''inherit pkgconfig cmake'' Very important [http://docs.openembedded.org/usermanual/html/pkgconfig_class.html Explanation]
 +
*''do_configure()'' Run configuration.  In Player's case, CMake is the configuration system.  Many other projects use autotools, etc. The above cmake options disable all of the optional components of Player, and install the server with no client library or drivers included. To add a driver, utility, or other option, just find the relevant CMake variable and change it (i.e. ''-DBUILD_SHARED_LIBS=ON'' or ''-DENABLE_DRIVER_BLOBTRACKER=ON'')
 +
*''do_compile()'' Runs "make."  This is where BitBake compiles the project
 +
*''do_install()'' Installs the targets to the ${D} (destination directory, which is a directory within your build environment)
 +
*''FILES_${PN}'' Tells bitBake what files to package.  If adding other utilities or clients, be sure to add the filenames to this section.
 +
== Building Player ==
 +
Once the recipe is in the proper place, run the command "bitbake player" after setting up your build environment.  BitBake should fire up and attempt to compile Player and its dependancies.  If everything goes well, BitBake will let you know with a message saying it completed successfully.
-
'''If you want to be able to check your cMake/Make/ logs, you must check your working directory, for me this was /home/<user>/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/<recipe name>/tmp'''
+
== Checking the logs ==
 +
If you want to confirm that CMake is working correctly, and that there are no build errors, you can check the build logs.  Each step (do_compile, do_configure) creates its own logfile that you can review.  On the gumstix, assuming you followed the directions to set up the buildroot in ~/overo-oe, you can find the log files in '''~/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/<recipe name>/tmp/'''  For the BeagleBoard, if you checked out the buildroot in ~/OE, you can find the logs in ~/OE/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/<recipe name>/tmp/'''
 +
== Installing the Packages ==
 +
To install the packages, copy the .ipk files generated by the build process to your embedded machine (either via SSH or directly to the memory card).  Then, use the opkg command on the embedded machine to install the .ipk file.
-
now install the package on you embedded machine
+
Alternately, you can add Player to a system image.  For example, the BeagleBoard environment has several images like "x11-image" and "basic-image".  These are essentially bitbake files, and can be found in openembedded/recipes/images/.  You can add player to the IMAGE_INSTALL section, and run "bitbake <imagename>" to create a system image with Player included.
 +
To add Gearbox support to Player (i.e. for the hokuyo_aist driver), follow the [[Cross Compile Player with Gearbox]] guide.
-
If you want to get gearbox with player hit [http://playerstage.sourceforge.net/wiki/Cross_Compile_Player_with_Gearbox continue]
+
[[Category:Documentation]]
 +
[[Category:Tutorials]]

Latest revision as of 12:31, 26 December 2011

The following is a simple guide on how to cross compile player using bitBake and Openembedded(OE) tools.

The author of this guide is new to Openembedded, bitBake and cross compiling in general so please feel free to edit, update or correct. The guide was tested on the Overo Gumstix with an iRobot Create and a Hokuyo Urg Laser.

Special thanks to Ash Charles, Geoffrey Biggs and Rich Mattes who helped me getting this working.

Contents

Purpose

This guide is intended for Player users who want to have the latest version of Player on their OpenEmbedded systems. This guide has been tested on the BeagleBoard using the Angstrom distribution (which is based on OpenEmbedded), and on the Gumstix Overo using the OpenEmbedded distribution. The guide should apply to most any OpenEmbedded environment.

Setting up the build environment

If you're using a Gumstix Overo, follow the directions at gumstix.net for setting up the Overo environment

Beagleboard users should first refer to the Getting Angstrom Running guide to get the feel for how to get Angstrom running. To set up the build environment, refer to the OpenEmbedded and Git guide.

More information on OpenEmbedded can be found in the Openembedded Manual

For more information on the BitBake tool, view the BitBake manual at Berlios.de.


Compiling custom programs

Gumstix tutorial (note slightly outdated and designed for the verdex, take note of the following changes:

  • Ipkg is now opkg
  • Directory structure is differerent
  • packages is now recipes
  • gumstix-oe is now overo-oe
  • com.gumstix.collection and org.openembedded.snapshot have been combined into org.openembedded.dev
  • arm5 is now arm7


OpenEmbedded Manual (very useful resource)


The following Makefile shows the principles of cross compiling player drivers (as plugins) outside OpenEmbedded / bitbake, but still make use of the generated toolchain for cross compiling to the Gumstix board. You will most likely have to modify the variables/paths to fit your particular system, but that is the easy part :)

# ${OVEROTOP} is pointing to where you installed overo-oe / OpenEmbedded (probably ~/overo-oe/)
PLAYER_VERSION=player-3.1.0-r0
CROSS_COMPILE_SYSROOT := ${OVEROTOP}/tmp/sysroots/armv7a-angstrom-linux-gnueabi
PLAYER_INCLUDE_DIR := ${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/${PLAYER_VERSION}/package/usr/include/player-3.1
CXX := ${OVEROTOP}/tmp/sysroots/x86_64-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++

all: libnxt_sense_touch_driver.so

%.o: %.cpp
	$(CXX) -Wall -fpic -g3 --sysroot=${CROSS_COMPILE_SYSROOT} -I${PLAYER_INCLUDE_DIR} -c $<

libnxt_sense_touch_driver.so: nxt_sense_touch.o
	$(CXX) -shared -fpic --sysroot=${CROSS_COMPILE_SYSROOT} -o $@ $^

clean:
	rm -f *.o *.so

It is recommended to manually inspect the pkg-config flags for playercore (where the information going into PLAYER_INCLUDE_DIR came from). They can be found in playercore.pc, e.g. ${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/player-3.1.0-r0/package/usr/lib64/pkgconfig/playercore.pc for my build. Using "find ${OVEROTOP} -name 'playercore.pc'" should show you where it is located. An alternative could be to set the environment variable PKG_CONFIG_PATH to point to the pkgconfig directory e.g. export PKG_CONFIG_PATH=${OVEROTOP}/tmp/work/armv7a-angstrom-linux-gnueabi/player-3.1.0-r0/package/usr/lib64/pkgconfig and use `pkg-config --cflags playercore` to obtain the same information.


If you want Gearbox with your player, you must install Gearbox first here

Player Recipe

The following recipe will cross-compile player and package it. You will need to save it as a .bb file in your recipes directory, which you should have created from the setting up a build environment.

For the BeagleBoard, create a folder in openembedded/recipes directory of the buildroot, named "player". Then, save the following recipe into a file named "player.bb"

For the Gumstix, create a folder in the gumstix-oe/recipes/ directory, named "player". Then, save the following recipe into a file named "player.bb"

DESCRIPTION = "Cross-platform robot device interface and server"
LICENSE = "GPLv2+ and LGPLv2+"
HOMEPAGE = "http://playerstage.sourceforge.net"
DEPENDS = "libtool jpeg guile"
PN = "player"
PV = 3.1.0
PR = "r0"
SRC_URI = "svn://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/;module=trunk;rev=HEAD;proto=https"
S="${WORKDIR}/trunk"

inherit pkgconfig cmake

do_configure () {
	cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCUMENTATION=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PLAYERCC=OFF -DBUILD_PLAYERCC_BOOST=OFF\
-DBUILD_PYTHONC_BINDINGS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_UTILS=OFF -DBUILD_UTILS_LOGSPLITTER=OFF -DBUILD_UTILS_PLAYERCAM=OFF \
-DBUILD_UTILS_PLAYERJOY=OFF -DBUILD_UTILS_PLAYERNAV=OFF -DBUILD_UTILS_PLAYERPRINT=OFF -DBUILD_UTILS_PLAYERPROP=OFF -DBUILD_UTILS_PLAYERV=OFF \
-DBUILD_UTILS_PLAYERVCR=OFF -DBUILD_UTILS_PLAYERWRITEMAP=OFF -DBUILD_UTILS_PMAP=OFF -DBUILD_UTILS_XMMS=OFF -DENABLE_DRIVER_ACCEL_CALIB=OFF \
-DENABLE_DRIVER_ACR120U=OFF -DENABLE_DRIVER_ACTS=OFF -DENABLE_DRIVER_AIOTOSONAR=OFF -DENABLE_DRIVER_ALSA=OFF -DENABLE_DRIVER_AMCL=OFF \
-DENABLE_DRIVER_AMTECM5=OFF -DENABLE_DRIVER_AMTECPOWERCUBE=OFF -DENABLE_DRIVER_AODV=OFF -DENABLE_DRIVER_ARTOOLKITPLUS=OFF -DENABLE_DRIVER_BLOBTODIO=OFF \ 
-DENABLE_DRIVER_BLOBTRACKER=OFF -DENABLE_DRIVER_BUMPER2LASER=OFF -DENABLE_DRIVER_BUMPERSAFE=OFF -DENABLE_DRIVER_BUMPERTODIO=OFF -DENABLE_DRIVER_CAMERA1394=OFF \
-DENABLE_DRIVER_CAMERACOMPRESS=OFF -DENABLE_DRIVER_CAMERAUNCOMPRESS=OFF -DENABLE_DRIVER_CAMERAUVC=OFF -DENABLE_DRIVER_CAMERAV4L=OFF -DENABLE_DRIVER_CAMERAV4L2=OFF \
-DENABLE_DRIVER_CAMFILTER=OFF -DENABLE_DRIVER_CANONVCC4=OFF -DENABLE_DRIVER_CLODBUSTER=OFF -DENABLE_DRIVER_CMDSPLITTER=OFF -DENABLE_DRIVER_CMUCAM2=OFF \
-DENABLE_DRIVER_CMVISION=OFF -DENABLE_DRIVER_CREATE=ON -DENABLE_DRIVER_CVCAM=OFF -DENABLE_DRIVER_DEADSTOP=OFF -DENABLE_DRIVER_DIOCMD=OFF -DENABLE_DRIVER_DIODELAY=OFF \
-DENABLE_DRIVER_DIOLATCH=OFF -DENABLE_DRIVER_DUMMY=OFF -DENABLE_DRIVER_EEDHCONTROLLER=OFF -DENABLE_DRIVER_EPUCK=OFF -DENABLE_DRIVER_ER1=OFF -DENABLE_DRIVER_ERRATIC=OFF \
-DENABLE_DRIVER_FAKELOCALIZE=OFF -DENABLE_DRIVER_FESTIVAL=OFF -DENABLE_DRIVER_FLEXIPORT=OFF -DENABLE_DRIVER_FLOCKOFBIRDS=OFF -DENABLE_DRIVER_GARCIA=OFF \
-DENABLE_DRIVER_GARMINNMEA=OFF -DENABLE_DRIVER_GBXGARMINACFR=OFF -DENABLE_DRIVER_GBXSICKACFR=OFF -DENABLE_DRIVER_GLOBALIZE=OFF -DENABLE_DRIVER_GOTO=OFF \
-DENABLE_DRIVER_GRIDMAP=OFF -DENABLE_DRIVER_GRIPCMD=OFF -DENABLE_DRIVER_HOKUYO_AIST=OFF -DENABLE_DRIVER_IMAGESEQ=OFF -DENABLE_DRIVER_INHIBITOR=OFF \
-DENABLE_DRIVER_INSIDEM300=OFF -DENABLE_DRIVER_ISENSE=OFF -DENABLE_DRIVER_IWSPY=OFF -DENABLE_DRIVER_KARTOWRITER=OFF -DENABLE_DRIVER_KHEPERA=OFF \
-DENABLE_DRIVER_LASERBAR=OFF -DENABLE_DRIVER_LASERBARCODE=OFF -DENABLE_DRIVER_LASERCSPACE=OFF -DENABLE_DRIVER_LASERCUTTER=OFF -DENABLE_DRIVER_LASERPOSEINTERPOLATOR=OFF \
-DENABLE_DRIVER_LASERPTZCLOUD=OFF -DENABLE_DRIVER_LASERRESCAN=OFF -DENABLE_DRIVER_LASERSAFE=OFF -DENABLE_DRIVER_LASERTORANGER=OFF -DENABLE_DRIVER_LASERVISUALBARCODE=OFF \
-DENABLE_DRIVER_LASERVISUALBW=OFF -DENABLE_DRIVER_LINUXJOYSTICK=OFF -DENABLE_DRIVER_LINUXWIFI=OFF -DENABLE_DRIVER_LOCALBB=OFF -DENABLE_DRIVER_MAPCSPACE=OFF \
-DENABLE_DRIVER_MAPFILE=OFF -DENABLE_DRIVER_MAPSCALE=OFF -DENABLE_DRIVER_MBICP=OFF -DENABLE_DRIVER_MICA2=OFF -DENABLE_DRIVER_MICROSTRAIN=OFF -DENABLE_DRIVER_MOTIONMIND=OFF \
-DENABLE_DRIVER_MRICP=OFF -DENABLE_DRIVER_ND=OFF -DENABLE_DRIVER_NIMU=OFF -DENABLE_DRIVER_NOMAD=OFF -DENABLE_DRIVER_OBOT=OFF -DENABLE_DRIVER_OCEANSERVER=OFF \
-DENABLE_DRIVER_P2OS=OFF -DENABLE_DRIVER_PASSTHROUGH=OFF -DENABLE_DRIVER_PBSLASER=OFF -DENABLE_DRIVER_PHIDGETACC=OFF -DENABLE_DRIVER_PHIDGETIFK=OFF \
-DENABLE_DRIVER_PHIDGETRFID=OFF -DENABLE_DRIVER_PORTIO=OFF -DENABLE_DRIVER_POSTGIS=OFF -DENABLE_DRIVER_PTU46=OFF -DENABLE_DRIVER_RANGERPOSEINTERPOLATOR=OFF \
-DENABLE_DRIVER_RANGERTODIO=OFF -DENABLE_DRIVER_RANGERTOLASER=OFF -DENABLE_DRIVER_RCORE_XBRIDGE=OFF -DENABLE_DRIVER_READLOG=OFF -DENABLE_DRIVER_REB=OFF \
-DENABLE_DRIVER_RELAY=OFF -DENABLE_DRIVER_RFLEX=OFF -DENABLE_DRIVER_ROBOTEQ=OFF -DENABLE_DRIVER_ROBOTINO=OFF -DENABLE_DRIVER_ROBOTRACKER=OFF \
-DENABLE_DRIVER_ROOMBA=OFF -DENABLE_DRIVER_RS4LEUZE=OFF -DENABLE_DRIVER_RT3XXX=OFF -DENABLE_DRIVER_SEGWAYRMP=OFF -DENABLE_DRIVER_SEGWAYRMP400=OFF \
-DENABLE_DRIVER_SERIALSTREAM=OFF -DENABLE_DRIVER_SERIO=OFF -DENABLE_DRIVER_SERVICE_ADV_MDNS=OFF -DENABLE_DRIVER_SHAPETRACKER=OFF -DENABLE_DRIVER_SICKLDMRS=OFF \
-DENABLE_DRIVER_SICKLMS200=OFF -DENABLE_DRIVER_SICKLMS400=OFF -DENABLE_DRIVER_SICKNAV200=OFF -DENABLE_DRIVER_SICKRFI341=OFF -DENABLE_DRIVER_SICKS3000=OFF \
-DENABLE_DRIVER_SIMPLESHAPE=OFF -DENABLE_DRIVER_SKYETEKM1=OFF -DENABLE_DRIVER_SND=OFF -DENABLE_DRIVER_SONARTORANGER=OFF -DENABLE_DRIVER_SONYEVID30=OFF \
-DENABLE_DRIVER_SPHERE=OFF -DENABLE_DRIVER_SPHEREPTZ=OFF -DENABLE_DRIVER_SPHINX2=OFF -DENABLE_DRIVER_SR3000=OFF -DENABLE_DRIVER_STALLTODIO=OFF -DENABLE_DRIVER_STATGRAB=OFF \
-DENABLE_DRIVER_STOC=OFF -DENABLE_DRIVER_SUPPRESSOR=OFF -DENABLE_DRIVER_SWISSRANGER=OFF -DENABLE_DRIVER_TCPSTREAM=OFF -DENABLE_DRIVER_UNICAPIMAGE=OFF \
-DENABLE_DRIVER_UPCBARCODE=OFF -DENABLE_DRIVER_VEC2MAP=OFF -DENABLE_DRIVER_VELCMD=OFF -DENABLE_DRIVER_VFH=OFF -DENABLE_DRIVER_VIDEOCANNY=OFF \
-DENABLE_DRIVER_VMAPFILE=OFF -DENABLE_DRIVER_WAVEFRONT=OFF -DENABLE_DRIVER_WBR914=OFF -DENABLE_DRIVER_WRITELOG=OFF -DENABLE_DRIVER_XSENSMT=OFF \
-DENABLE_DRIVER_YARPIMAGE=OFF -DENABLE_DRIVER_CREATE=OFF \
-DENABLE_DRIVER_CAMERA=OFF -DENABLE_DRIVER_DIO=OFF -DENABLE_DRIVER_FIDUCAL=OFF -DENABLE_DRIVER_BLOBFINDER=OFF -DENABLE_DRIVER_NXT=OFF -DENABLE_DRIVER_MBASEDRIVER=OFF .
}

do_compile() {

	oe_runmake

}
	
do_install() {

	oe_runmake install DESTDIR=${D}

}

FILES_${PN} = "/usr/bin/player \ 
	/usr/bin/playerinterfacegen \
	/usr/bin/playerxdrgen \ 
	/usr/include/* \ 
	/usr/lib/* \ 
	/usr/share/*"

The recipe above has several important sections.

  • DEPENDS = "libtool jpeg guile" This recipe uses the given dependencies for building player. If you want to add playerv, you would first turn the cMake variable for playerv to on( -DBUILD_UTILS_PLAYERV=ON) then you would add the relevant dependency (DEPENDS = "gtk+"). Read more in the OpenEmbedded Manual
  • PN Package Name. This name should reflect the name of the project being packaged.
  • PV Package Version. This is the version number of the project being built.
  • PR Package Revision number. Each time the package is rebuilt with the same PV (for example, a bugfix or security update), this revision is incremented.
  • inherit pkgconfig cmake Very important Explanation
  • do_configure() Run configuration. In Player's case, CMake is the configuration system. Many other projects use autotools, etc. The above cmake options disable all of the optional components of Player, and install the server with no client library or drivers included. To add a driver, utility, or other option, just find the relevant CMake variable and change it (i.e. -DBUILD_SHARED_LIBS=ON or -DENABLE_DRIVER_BLOBTRACKER=ON)
  • do_compile() Runs "make." This is where BitBake compiles the project
  • do_install() Installs the targets to the ${D} (destination directory, which is a directory within your build environment)
  • FILES_${PN} Tells bitBake what files to package. If adding other utilities or clients, be sure to add the filenames to this section.

Building Player

Once the recipe is in the proper place, run the command "bitbake player" after setting up your build environment. BitBake should fire up and attempt to compile Player and its dependancies. If everything goes well, BitBake will let you know with a message saying it completed successfully.

Checking the logs

If you want to confirm that CMake is working correctly, and that there are no build errors, you can check the build logs. Each step (do_compile, do_configure) creates its own logfile that you can review. On the gumstix, assuming you followed the directions to set up the buildroot in ~/overo-oe, you can find the log files in ~/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/<recipe name>/tmp/ For the BeagleBoard, if you checked out the buildroot in ~/OE, you can find the logs in ~/OE/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/<recipe name>/tmp/

Installing the Packages

To install the packages, copy the .ipk files generated by the build process to your embedded machine (either via SSH or directly to the memory card). Then, use the opkg command on the embedded machine to install the .ipk file.

Alternately, you can add Player to a system image. For example, the BeagleBoard environment has several images like "x11-image" and "basic-image". These are essentially bitbake files, and can be found in openembedded/recipes/images/. You can add player to the IMAGE_INSTALL section, and run "bitbake <imagename>" to create a system image with Player included.

To add Gearbox support to Player (i.e. for the hokuyo_aist driver), follow the Cross Compile Player with Gearbox guide.

Personal tools