Yocto Project Extensible SDK - Linux Foundation Events

Transcription

Yocto Project* Extensible SDKsimplifying the workflow for application developersHenry BruceIntel Open Source Technology Center

What We’ll be CoveringWhy do we need the Extensible SDK?How do distro maintainers create one?How does the Extensible SDK improve workflow?Not a devtool deep dive

What is the Extensible sdk3

THE standard SDKDevelop code to run on target machineDelivered as a shell script installer Cross-Development toolchain Target libraries, headers, and symbols Environment setup script4

what Could BE k

Meet the Extensible SDKMajor design changeShrink-wrapped distro maintainer environmentAllows compact installer (as small as 35MB)Updateable and extensible – lazy installSimplifies team-workFirst appeared in Jethro, usable in Krogoth

Using the Extensible sdk7

INSTALLInstaller created by distro maintainerShell script installerCompletely self containedCan be installed to an arbitrary location8

Install examplepoky-glibc-x86 64-core-image-minimal-i586-toolchain-ext-2.2.1.sh chmod x poky-glibc-x86 64-core-image-minimal-i586-toolchain-ext-2.2.1.sh ./poky-glibc-x86 64-core-image-minimal-i586-toolchain-ext-2.2.1.sh –d mysdkPoky (Yocto Project Reference Distro) Extensible SDK installer version 2.2.1You are about to install the SDK to "/home/hbruce/mysdk". Proceed[Y/n]? YExtracting SDK.doneExtracting buildtools.Preparing build system.Parsing recipes: 100% #################################### Time: 0:00:17SDK has been successfully set up and is ready to be used.Each time you wish to use the SDK in a new shell session, you need to sourcethe environment setup script e.g. ux9

Simple exampleAssumes SDK contains toolchain . ux (CC) hello.c –o helloAlso enables Eclipse* integrationKeep updatability but act like standard SDK*Other names and brands may be claimed as the property of others.10

Access to new toolsMost of the distro maintainer tools devtool recipetool wic 11

Example devtool workflow . uxdevtool add https://github.com/whbruce/bbexample.gitdevtool edit-recipe bbexampledevtool build bbexampledevtool deploy-target bbexample root@192.168.0.2Run, fix, repeat. devtool finish bbexample /path/to/bitbake/layerIssue pull requestMaintainer builds and publishes updated eSDK with your work in it

Updating and Extending the SDKUpdate devtool sdk-update [url]Extend devtool search package-name devtool sdk-install [-s] recipe-nameExample devtool sdk-install meta-extsdk-toolchain

Run in a containerA Docker* container is tainerEnables operation on macOS* and Windows**Other names and brands may be claimed as the property of others.14

Creating and maintaining an extensible sdkTasks for the distro maintainer15

Generating SDK: BuildingBuild bitbake image-recipe -c populate sdk extDefault contains everything for image recipeSDK installer in tmp/deploy/sdkMake installer available to your developers

Configure Esdk: Installer aND CONTENTMake a minimal installer (full by default)SDK EXT TYPE "minimal"Add toolchain to minimal installerSDK INCLUDE TOOLCHAIN “1”Add all package infoSDK INCLUDE PKGDATA “1”Add specific tools or librariesSDK EXTRA TOOLS “nativesdk-package-name”TOOLCHAIN HOST TASK “package-name”

CONFIGURE ESDK: UpdaterDefine a URL for the updater, say http://mysite.com/sdk-updaterSet default update URL in your configurationSDK UPDATE URL "http://mysite.com/sdk-updater”When you make change, re-build SDK and generate updater files oe-publish-sdk tmp/deploy/sdk/installer.sh /path/to/sdk-updaterLet your developers know when updates are available

Faster builds through Shared StatePre-built objects on a servereSDK checks if you can re-use objectsQemux86 core-image-minimal build times Without: 35mins With: 1 min

CONFIGURE SDK: Shared State mirrorDefine URL of the shared state mirror server.http://mysite.com/sstate-cacheSet in conf/sdk-extra.confSSTATE MIRRORS "file://.* http://mysite.com/sstate-cache/PATH"Ensure sstate-cache is served up at this location

Extensible sdk WorkflowPulling it all together21

1Bubba makes eSDKeSDKServereSDK1BubbaDistroEngJoeC Lib DevLauriePythonApp EngBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDKeSDKServereSDKUpdate eSDK1BubbaDistroEng2JoeC Lib DevLauriePythonApp EngBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipeeSDKServereSDKUpdate eSDK1BubbaDistroEng2LauriePythonApp EngJoeC Lib Dev3RecipeBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor LibeSDKServereSDKUpdate eSDK1BubbaDistroEng2LauriePythonApp EngJoeC Lib Dev3Recipe4Build/debugSensor LibBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to BubbaeSDKServereSDKUpdate eSDK1BubbaDistroEng2LauriePythonApp EngJoeC Lib Dev3Recipe4Build/debugSensor Lib5“Finalize”RecipeBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration processeSDKServereSDKUpdate eSDK6CITest1BubbaDistroEng2LauriePythonApp EngJoeC Lib Dev3Recipe4Build/debugSensor Lib5“Finalize”RecipeBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor LibeSDKServer“Revised”eSDK7eSDKUpdate eSDK6CITest1BubbaDistroEng2LauriePythonApp EngJoeC Lib Dev3Recipe4Build/debugSensor Lib5“Finalize”RecipeBetsyJS App Dev(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor Lib8Laurie and Betsy update their eSDKseSDKServer“Revised”eSDK7eSDKUpdate eSDKUpdate eSDK88LauriePythonApp EngBetsyJS App DevUpdate eSDK6CITest1BubbaDistroEng2JoeC Lib Dev3Recipe4Build/debugSensor Lib5“Finalize”Recipe(3rd party)

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor Lib8Laurie and Betsy update their eSDKs9They use “devtool add” to generaterecipes; Laurie for a Python app,Betsy for a Node.js appeSDKServer“Revised”eSDK7eSDKUpdate eSDKUpdate eSDK88LauriePythonApp EngBetsyJS App Dev99Update eSDK6CITest1BubbaDistroEng2JoeC Lib Dev3RecipeRecipe4Build/debugSensor Lib5“Finalize”Recipe(3rd party)Recipe

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor Lib8Laurie and Betsy update their eSDKs9They use “devtool add” to generaterecipes; Laurie for a Python app,Betsy for a Node.js app10They build and debug their ngCITestUpdate eSDKUpdate eSDK88LauriePythonApp EngBetsyJS App Dev99Update eSDK2JoeC Lib Dev312RecipeRecipe4Build/debugSensor Lib5“Finalize”Recipe(3rd party)Recipe1010Build/debugAppBuild/debugApp

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor Lib8Laurie and Betsy update their eSDKs9They use “devtool add” to generaterecipes; Laurie for a Python app,Betsy for a Node.js app10They build and debug their apps11When apps are working, they use “devtoolfinish” and send recipes to BubbaeSDKServer“Revised”eSDK7eSDKUpdate eSDKUpdate eSDK88LauriePythonApp EngBetsyJS App Dev99Update eSDK6CITest1BubbaDistroEng2JoeC Lib Dev3RecipeRecipe4Build/debugSensor Lib5“Finalize”Recipe(3rd inalize”Recipe11“Finalize”Recipe

1Bubba makes eSDK2Joe updates eSDK3Uses “devtool add” to generate recipe4Build and debug sensor Lib5When Lib is ready “devtool finish”finalizes recipe (and patches), andsends recipe to Bubba6Bubba “turns the crank” forcontinuous integration process7Bubba publishes “revised”eSDK with Joe’s sensor Lib8Laurie and Betsy update their eSDKs9They use “devtool add” to generaterecipes; Laurie for a Python app,Betsy for a Node.js app10They build and debug their apps11When apps are working, they use “devtoolfinish” and send recipes to Bubba12Bubba “turns the crank” andships the product imageeSDKServer“Revised”eSDK7eSDKUpdate eSDKUpdate eSDK88LauriePythonApp EngBetsyJS App Dev99Update eSDK61BubbaDistroEngCITest2JoeC Lib Dev312RecipeRecipe4Build/debugSensor Lib5“Finalize”Recipe(3rd inalize”Recipe11“Finalize”Recipe

Wrap up34

Extensible sdk benefitsShared development environmentPower of devtoolImproved team workflowLeverages shared state for faster buildsRuns on a range of host operating systems

ThanksPaul EggletonRandy WittBrian AveryDoug Martin36

Call to ActionUse the Extensible SDKUse it on Windows and Machttps://wiki.yoctoproject.org/wiki/Extensible SDK

questions38

DisclaimerIntel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.*Other names and brands may be claimed as the property of others. Intel Corporation39

n-ext-2.2.1.sh . JS App Dev (3rd party) eSDK Server 1 Bubba makes eSDK 1 eSDK. Bubba Distro Eng Joe C Lib Dev Laurie Python App Eng Betsy JS App Dev . 6 Bubba "turns the crank" for continuous integration process Update eSDK Recipe 5 6 1 2