-
Notifications
You must be signed in to change notification settings - Fork 257
OpenEmbedded Build Instructions
Revision: 4 Published: 2019-06-01
These instructions are for building ROS 2 crystal using OpenEmbedded morty on Ubuntu bionic.
Although recipes for dashing appear in meta-ros
, ros-core
doesn't yet build. When it does, conf/ros2-dashing.mcf
and
conf/webos-dashing.mcf
will be added.
The migration to OpenEmbedded thud is expected to be completed by the end of 2019-06.
-
Setup bitbake and OE-Core using a separate disk for the Yocto build artifacts (~100GB required).
# Prerequisites sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python python3-pip python3-pexpect \ xz-utils debianutils iputils-ping \ g++-multilib locales lsb-release python3-distutils time sudo locale-gen en_US.utf8 # Set up the build tree dir=/absolute/path/to/directory/on/separate/disk mkdir -p $dir/BUILD ln -snf $dir/BUILD build mkdir conf ln -snf $PWD/conf build/. # The branch for OpenEmbedded "thud" is not yet available. In the meantime, use a draft of the branch for "morty". git clone -b morty-draft [email protected]:ros/meta-ros cp meta-ros/files/*.mcf conf/. # Select one based on the DISTRO you wish to build: # cfg=conf/ros2-crystal.mcf # cfg=conf/webos-crystal.mcf meta-ros/scripts/mcf -f $cfg source openembedded-core/oe-init-build-env # The current directory is now $dir/BUILD, return to the original. cd -
-
Add this to the bottom of
conf/local.conf
:# # Local additions # # Uncomment this if you configured with ros2-crystal.mcf: # DISTRO = "ros2" # Uncomment this if you configured with webos-crystal.mcf: # DISTRO = "webos" # Uncomment one: # MACHINE = "qemux86" # MACHINE = "raspberrypi3" ROS_YOCTO_ARTIFACTS = "/absolute/path/to/directory/on/separate/disk" DL_DIR = "${ROS_YOCTO_ARTIFACTS}/downloads" SSTATE_DIR = "${ROS_YOCTO_ARTIFACTS}/sstate-cache" TMPDIR = "${ROS_YOCTO_ARTIFACTS}/BUILD/tmp" # As recommended by https://www.yoctoproject.org/docs/2.6.2/mega-manual/mega-manual.html#var-BB_NUMBER_THREADS # and https://www.yoctoproject.org/docs/2.6.2/mega-manual/mega-manual.html#var-PARALLEL_MAKE BB_NUMBER_THREADS = "${@min(int(bb.utils.cpu_count()), 20)}" PARALLEL_MAKE = "-j ${BB_NUMBER_THREADS}" # Special setting for "pcl" -- see meta-ros/recipes-extended/pcl/pcl_1.8.1.bb PARALLEL_MAKE_pn-pcl = "-j <ROUND(<RAM-in-GB>/5)>"
This image contains just the ROS "core".
source openembedded-core/oe-init-build-env
cd -
bitbake core-image-ros-roscore
By default, this image contains all of the "non-optional" ROS packages. In the future, you will be able to include
"optional" ones by setting DISTRO_FEATURES
in conf/local.conf
.
source openembedded-core/oe-init-build-env
cd -
bitbake core-image-ros-word
This webOS OSE image contains just the ROS "core".
source openembedded-core/oe-init-build-env
cd -
bitbake webos-image-ros-roscore
By default, this webOS OSE image contains all of the "non-optional" ROS packages. In the future, you will be able to include
"optional" ones by setting DISTRO_FEATURES
in conf/local.conf
.
source openembedded-core/oe-init-build-env
cd -
bitbake webos-image-ros-roscore
-
These images default to being non-production: the
root
account has no password. -
In order to run ROS components, you must set up a ROS workspace by issuing:
source ros_setup
- Revise for the inclusion of
mcf
inmeta-ros
. - Add support for using webOS OSE as the OpenEmbedded
DISTRO
.
- Add a step to install the prerequisites.
- Add instructions to build for Raspberry Pi.
- Fix typo.
- Drop setting
SSTATE_MIRRORS
becausemeta-ros
adds global environment variables that invalidates even the shared state for native packages. - Specify a
PARALLEL_MAKE_pn-pcl
setting so that buildingpcl
doesn't take nearly 3 hours. - Fix typos.
- Initial publication.