Improving the Yocto Project Developer Experience How New Tools Will Enable a Better Workflow October 2016 Henry Bruce (henry.bruce@intel.com)
Introduction We ll be talking about developer workflow improvements coming in Yocto Project 2.2 and future releases CROss PlatformS (CROPS) will provide a consistent developer experience across Windows, Mac OS X and Linux distros through use of containers Extensible SDK (esdk) enables you to add packages and generate an updated image. And much much more. Simplified install for Toaster so it s ready to go out of the box 2
Why Containers? Avoid host contamination Easy route to multiple OS support Including Linux! Repeatable builds Fewer Linux distros to test A path to tools in the cloud 3
Proposed Feature Roll-out Plans for forthcoming Yocto Project releases (subject to change) Feature 2.1 2.2 2.3 Toaster Improved stability Customization No git dependency Layer configuration Iterative development Build Analytics TBD esdk / devtool Initial release Improved installer Finish command NPM recipe generation Interactive mode Kernel support NPM workflow Publish recipe CROPS N/A Resurrect Eclipse plugin Workdir container Containerized Toaster Containerized poky Containerized esdk Plug-in uses container Extend plug-in U/I 4
Planned Workflow Enhancements Containerization through CROPS See https://github.com/crops/docker-win-mac-docs/wiki Use Extensible SDK to add application to image Can add missing components after initial install Can generate best guess at recipe and allow developer to correct it Can generate OS image including application for testing Use Eclipse with plug-in to develop application Build and debug app within familiar IDE Plug-in provides U/I for devtool Use Toaster web UI to configure and debug builds Can search for packages (not always the same as recipe name) Track down build issues with interactive variable inspection Feature Key In development Ready 5
Workflow Diagram Work just started Needs more work Good to go Toaster Config U/I Eclipse esdk Plugin CLI devtool Poky/CLI or Toaster Build Analytics with Toaster OS image Ext SDK Ext SDK Work dir Ext SDK Work dir Recipe Shared State Application repo Layer Index Tools/image creation Application development 6
Working with Extensible SDK Extensible SDK: Does so much more than the traditional SDK Devtool gives you the power of bitbake tailored for app development Available as a small (~35MB) bootstrap installer Fast builds with shared state mirror provided by esdk publisher Can add/remove components with web install Can generate new image Yocto 2.2 documentation will promote extensible over traditional SDK Improving Node.js workflow with be a focus of next release 7
More on devtool devtool provides access to app building capability of extensible SDK It is a command line tool Generates basis of a recipe by analyzing app source code Missing dependent packages are automatically downloaded and installed Developer edits recipe until it builds and behaves as expected Target deployment is supported Updated recipe is generated with required patches Can also modify existing packages Devtool is part of full build system i.e. also useful for system developers 8
Application Development with CROPS On OS of your choice install Docker, Eclipse and esdk Eclipse plug-in Eclipse plug-in starts esdk and work-dir containers Work is required to reduce start-up time Toolchain runs in esdk container Operations invoked by Eclipse plug-in over Docker API Develop application code in Eclipse, deploying and debugging on target Eclipse plug-in will evolve to provide U/I for devtool commands 9
Working with Toaster Tool Evaluation Container with pre-built tools make Toaster very easy to start Easy to add packages to an existing image and build OS Customize OS image As tool evaluation, but more Add layers from layer index Search for recipes Build analytics Toaster can monitor an existing non-toaster bitbake build Use variable inspection etc. to analyse builds for failures 10
Call to Action We ve heard you! We re working on making your life easier If you have started started your own Yocto Project usability projects please get in touch We re happy to work together and avoid fragmentation In the meantime we ll keep you up to date with our progress Track current plans at https://wiki.yoctoproject.org/wiki/developer_workflow_improvements 11
Back-up 12
Current Workflow : Create OS image and SDK Requires a supported Linux distro Requires some Linux knowledge Everything is done on the command line Install a set of packages Pull down some source code using git Use bitbake command to start a simple OS build OS features are added manually Update configuration to add layers Update configuration to add packages to image Create SDK installer with a special bitbake command option Manually publish OS image, package feed and SDK 13
Existing Workflow: Application Development Requires a Linux Distro Development on Windows is possible but requires Cygwin or Msys2 knowledge Developer installs SDK (can be 1GB in size) on build host Developer builds application If SDK is missing dependent libraries Developer must request a new SDK with required packages added Remove old SDK; install new one Re-build application Test on OS image Once application is completed, we need a recipe Either developer asks someone else to develop recipe Or developer learns to use Yocto 14