Hi Amos, Building on target is currently not supported - see https://github.com/bmwcarit/meta-ros/issues/103.
A workflow I have used successfully in the past is described here: https://github.com/KristofRobot/meta-frobo#feed-server This allows you to bitbake any recipe on your build machine, and then install the resulting package on your target running a simple opkg command. Resulting workflow looks as follows: (1) On your build machine: build package and rebuild index bitbake [package] bitbake package-index (2) On your target: update repo and install package: opkg update opkg install [package] or opkg update opkg upgrade In my experience this works very well. Note: if you go for this approach, it is recommended to use the PR service to ensure that new packages automatically get new version numbers; see https://wiki.yoctoproject.org/wiki/PR_Service - just add 'PRSERV_HOST = "localhost:0"' in your local.conf file. Kristof On Thu, Sep 8, 2016 at 8:17 PM, Amos Buchanan <[email protected]> wrote: > Hello, > > I'm relatively new to OpenEmbedded and Yocto, so I'm still wrapping my head > around building recipes and using SDK's based on bitbake-created images. > > I'm working with a combination of ROS and Yocto for the Raspberry Pi. I'm > trying to put together a workflow for application development. I'm able to > create ROS recipes that install and run on the RasPi directly using bitbake > and writing an SD image, but it's a time-consuming process if I'm working on > testing application code that is hardware dependent (ie -- requires sensor > connections to run properly). > > What I'd prefer is something more like what's described in this thread: > https://github.com/bmwcarit/meta-ros/issues/380 > > These are the steps I followed > > I created some .bbappend files in my own layer to add nativesdk support as > per referenced thread for > > python-catkin-pkg, > python-empy, > catkin, > catkin-runtime. > > I created an SDK using the 'raspberrypi2' machine from 'meta-raspberrypi' > > MACHINE="raspberrypi2" bitbake ngt-alpha3-sdk -c populate_sdk > > I installed the SDK and ran the environment script. > I fixed the ROS environment variables to point to the SDK path versions of > the software. (No ROS setup file is generated in the SDK, and I haven't > looked into fixing that so this is manual > Create a catkin workspace and run 'catkin_init_workspace': >> >> $ . >> ~/opt/phytec-yogurt/2.0.2/environment-setup-cortexa7hf-vfp-vfpv4-neon-phytec-linux-gnueabi >> >> $ mkdir src >> >> $ cd src/ >> $ catkin_init_workspace >> Traceback (most recent call last): >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/site.py", >> line 553, in <module> >> main() >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/site.py", >> line 535, in main >> known_paths = addusersitepackages(known_paths) >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/site.py", >> line 266, in addusersitepackages >> user_site = getusersitepackages() >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/site.py", >> line 241, in getusersitepackages >> user_base = getuserbase() # this will also set USER_BASE >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/site.py", >> line 230, in getuserbase >> from sysconfig import get_config_var >> File >> "/home/amos/opt/phytec-yogurt/2.0.2/sysroots/x86_64-yogurtsdk-linux/usr/lib/python2.7/sysconfig.py", >> line 10, in <module> >> 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', >> AttributeError: 'module' object has no attribute 'lib' > > > I feel like there's some python configuration somewhere I'm missing, or > possibly a package. The same python script (sysconfig.py) on my base system > (Ubuntu Trusty) doesn't refer to 'sys.lib'. > > > Has anyone had success in getting this to work? Is there a step somewhere > I'm missing? > > > Thanks, > > > -Amos > > > Image Recipe: > > >> inherit core-image extrausers catkin >> >> USERNAME = "testuser" >> >> EXTRA_USERS_PARAMS = "useradd -P '${USERNAME}' ${USERNAME};" >> >> IMAGE_ROOTFS_SIZE ?= "8192" >> >> IMAGE_INSTALL = " \ >> packagegroup-machine-base \ >> packagegroup-core-boot \ >> packagegroup-hwtools \ >> packagegroup-benchmark \ >> packagegroup-userland \ >> " >> >> IMAGE_INSTALL += "opkg rosbash roslaunch rosout rostopic ngt-control >> geometry-msgs" >> IMAGE_INSTALL += "git gcc kernel-dev tcp-wrappers nfs-utils >> python-catkin-pkg python catkin" >> IMAGE_INSTALL += "ngt-control-systemd-alpha3" >> IMAGE_INSTALL_append_raspberrypi2 = " wiringpi" >> >> IMAGE_FEATURES += "dev-pkgs tools-debug eclipse-debug tools-profile >> tools-testapps debug-tweaks" >> IMAGE_FEATURES_beagleboneblack-1 += "tools-sdk" >> IMAGE_FEATURES_phycore-am335x-1 += "tools-sdk" >> >> TOOLCHAIN_HOST_TASK += " \ >> nativesdk-cmake \ >> nativesdk-catkin \ >> nativesdk-catkin-dev \ >> nativesdk-python-catkin-pkg \ >> nativesdk-python-catkin-pkg-dev \ >> nativesdk-catkin-runtime \ >> nativesdk-catkin-runtime-dev \ >> " >> >> export IMAGE_BASENAME = "ngt-alpha3-sdk" > > >
