<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Henry+Bruce</id>
	<title>Yocto Project - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Henry+Bruce"/>
	<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/Special:Contributions/Henry_Bruce"/>
	<updated>2026-04-06T06:40:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Extensible_SDK&amp;diff=33401</id>
		<title>Extensible SDK</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Extensible_SDK&amp;diff=33401"/>
		<updated>2017-11-20T23:15:10Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Releases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page is being continually updated with more content. Please bookmark and come back soon.&#039;&#039;&#039; Any questions, contact [mailto:henry.bruce@intel.com Henry Bruce]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Yocto Project Extensible SDK (eSDK) has tools that allow you to easily add new applications and libraries to an image, modify the source of an existing component and test changes on the target hardware. The main benefit over the standard SDK is improved team workflow due to tighter integration with the OpenEmbedded build system.&lt;br /&gt;
&lt;br /&gt;
Want to learn more about the Extensible SDK? You&#039;ve come to the right place.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
To learn about using the Extensible SDK read the [http://www.yoctoproject.org/docs/current/sdk-manual/sdk-manual.html SDK manual]. Information on building and customizing an eSDK can be found in [http://www.yoctoproject.org/docs/current/sdk-manual/sdk-manual.html#sdk-appendix-customizing Appendix B]. Also see this [http://events.linuxfoundation.org/sites/events/files/slides/2017%20ELC%20Henry%20Bruce.pdf eSDK talk] and companion [https://events.linuxfoundation.org/sites/events/files/slides/2017%20ELC%20--%20Using%20devtool%20to%20Streamline%20your%20Yocto%20Project%20Workflow.pdf devtool talk].&lt;br /&gt;
&lt;br /&gt;
== Pre-built Installers ==&lt;br /&gt;
The Yocto Project auto-builder creates core-image-minimal and core-image-0sato eSDK installers for machines defined in oe-core. Currently only full installers are built. See http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2.1/toolchain/x86_64. As an example [http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2.1/toolchain/x86_64/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-2.2.1.sh poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-2.2.1.sh] is the core-image-sato eSDK installer for machine genericx86-64.&lt;br /&gt;
&lt;br /&gt;
== Tips and Tricks ==&lt;br /&gt;
* [[TipsAndTricks/Cmake,Eclipse,_and_SDKS | Add cmake to your eSDK]]&lt;br /&gt;
&lt;br /&gt;
== Workflow ==&lt;br /&gt;
Details of the improved Yocto Project workflow enabled by using containers and the eSDK can be found on the [[Developer Workflow Improvements]] page.&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
=== ELC 2017 ===&lt;br /&gt;
* [http://events.linuxfoundation.org/sites/events/files/slides/2017%20ELC%20Henry%20Bruce.pdf Henry Bruce&#039;s eSDK talk]&lt;br /&gt;
* [https://events.linuxfoundation.org/sites/events/files/slides/2017%20ELC%20--%20Using%20devtool%20to%20Streamline%20your%20Yocto%20Project%20Workflow.pdf Tim Orling&#039;s devtool talk]&lt;br /&gt;
* [https://events.linuxfoundation.org/sites/events/files/slides/2017%20ELC%20-%20Yocto%20Project%20Containers.pdf Randy Witt&#039;s container talk]&lt;br /&gt;
&lt;br /&gt;
== Releases ==&lt;br /&gt;
* First appeared as part of fido (1.8).&lt;br /&gt;
* Jethro (2.0) is beta release.&lt;br /&gt;
* Krogoth (2.1) is first usable release.&lt;br /&gt;
* Morty (2.2) brings &amp;quot;devtool finish&amp;quot; that generates patches to go with recipe&lt;br /&gt;
* Pyro (2.3) focuses on bug fixes&lt;br /&gt;
* Rocko (2.4) brings devtool (and underlying recipetool) enhancements&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
The eSDK is part of [http://www.openembedded.org/wiki/OpenEmbedded-Core Openembedded Core]. &lt;br /&gt;
* Mailing list: openembedded-core@lists.openembedded.org&lt;br /&gt;
* Bugs: https://bugzilla.yoctoproject.org/buglist.cgi?quicksearch=extensible%20sdk&amp;amp;list_id=592532&lt;br /&gt;
* Yocto Project SDK QuickStart: https://mender.io/resources/yocto-sdk-quickstart&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32132</id>
		<title>TipsAndTricks/EnablingAPackageFeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32132"/>
		<updated>2017-10-05T23:57:53Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Pyro (2.3) and greater */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Morty (2.2) and earlier =&lt;br /&gt;
== Caveat == &lt;br /&gt;
This article is based on work done a few years ago with fido (1.8) and only covers using smart with rpm. Needs some testing and extended to cover using dnf.&lt;br /&gt;
&lt;br /&gt;
Instructions assume you have had at least one successful build of your target image.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Format ==&lt;br /&gt;
package format is set via variable PACKAGE_CLASSES, typically in local.conf. Look for line like&lt;br /&gt;
 PACKAGE_CLASSES ?= &amp;quot;package_rpm&amp;quot;&lt;br /&gt;
This means you&#039;re using rpm.&lt;br /&gt;
&lt;br /&gt;
== Know Your Package Architectures ==&lt;br /&gt;
Your OS image will be comprised of a number of different package architectures. &lt;br /&gt;
=== From the build system view ===&lt;br /&gt;
The package feed needs to know what they are so look in tmp/deploy/rpm&lt;br /&gt;
 $ ls tmp/deploy/rpm/&lt;br /&gt;
 all  core2_32  edison  x86_64_nativesdk&lt;br /&gt;
You can exclude anything starting with x86_64. This means the  architectures on the target are: &amp;lt;tt&amp;gt;all  core2_32  edison&amp;lt;/tt&amp;gt;&lt;br /&gt;
=== From target system view ===&lt;br /&gt;
 $ rpm -qq&lt;br /&gt;
look at the endings of the various packages.  For example , if you build for qemux86-64 the suffixes will be&lt;br /&gt;
 core2_64&lt;br /&gt;
 qemux86_64&lt;br /&gt;
 all&lt;br /&gt;
so those are the architectures supported on the target.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Feed URL ==&lt;br /&gt;
Is this example we&#039;ll use &amp;lt;tt&amp;gt;http://my-server.com/repo&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add Package Manager to Build ==&lt;br /&gt;
Smart package manager is in oe-core, so there is no need to add any extra layers. You do, however need to tell the build system to include pkg management on the target, since excluding package management saves space, it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
 EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot;&lt;br /&gt;
&lt;br /&gt;
On releases prior to jethro, you *may* need to also do&lt;br /&gt;
 IMAGE_INSTALL_append=&amp;quot; python-smartrpm &amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configure Package Feed in Build ==&lt;br /&gt;
Now you have the information to create a package feed, ideally you add details in your distro conf file. If you are not using your own distro, you can set the following in local.conf. Note, if you only want to configure your channels on the target and not have any defaults, these definitions can be excluded.&lt;br /&gt;
 PACKAGE_FEED_URIS = &amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_BASE_PATHS = &amp;quot;rpm&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_ARCHS = &amp;quot;all edison core2_32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create Package Feed ==&lt;br /&gt;
* Re-build image so it includes smart and the package feed info&lt;br /&gt;
** Also, if you find you need an additional recipe not included in the image e.g. gawk, you can do bitbake gawk and it&#039;s packages will be available too.&lt;br /&gt;
*** this can be done iteratively &lt;br /&gt;
* Update repo package indices &lt;br /&gt;
 bitbake package-index&lt;br /&gt;
* Copy packages to server. This sample script assumes files are served from /var/www/html/repo&lt;br /&gt;
** We exclude x86_64 as those are host side (aka native) rpms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* /var/www/html/repo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you don&#039;t have a web server already serving up a directory and don&#039;t feel like going through the effort to do that you can do the following.&lt;br /&gt;
** Assume your feed is /opt/feed&lt;br /&gt;
** apt-get/dnf install python-twistd&lt;br /&gt;
** run twistd on the directory&lt;br /&gt;
 $ twistd -n web --path /opt/feed -p 5678&lt;br /&gt;
* This way you can serve different feeds on different ports&lt;br /&gt;
&lt;br /&gt;
== Run Package Manager on Target ==&lt;br /&gt;
* Make sure network is up and sync with package feed.&lt;br /&gt;
 smart update&lt;br /&gt;
* Install my-package&lt;br /&gt;
 smart search my-package&lt;br /&gt;
 smart install my-package&lt;br /&gt;
&lt;br /&gt;
== Recover Package Feed Config On Target ==&lt;br /&gt;
Smart does not have a config file, so config must be done via command line. This script re-creates the config set by distro in example above&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
feed_url=&amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
platform=&amp;quot;my-platform&amp;quot;&lt;br /&gt;
repo_name=&amp;quot;my-repo&amp;quot;&lt;br /&gt;
for arch in all edison core2_32; do&lt;br /&gt;
    smart channel --add $platform-$arch type=rpm-md name=&amp;quot;$repo_name&amp;quot;  baseurl=$feed_url/$arch -y &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Rebuild the cache with the new channels added&lt;br /&gt;
 $ smart update&lt;br /&gt;
This will result in a set of feeds you can see with &lt;br /&gt;
 $ smart channel --show&lt;br /&gt;
&lt;br /&gt;
= Pyro (2.3) and greater =&lt;br /&gt;
== From a Build dir ==&lt;br /&gt;
=== Easiest Way ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* update the package indices&lt;br /&gt;
** bitbake package-index&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path tmp/deploy/rpm -p 5678&lt;br /&gt;
=== How to keep a separate feed Dir ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* copy to dir&lt;br /&gt;
** rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* feedDir/&lt;br /&gt;
* Build the tools needed to make directories into repos&lt;br /&gt;
** bitbake createrepo-c-native -caddto_recipe_sysroot &lt;br /&gt;
* Turn the directory into a repo&lt;br /&gt;
** oe-run-native createrepo-c-native createrepo_c feedDir&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path feedDir -p 5678&lt;br /&gt;
&lt;br /&gt;
== From the Target ==&lt;br /&gt;
* make the target aware of the repo you just created.&lt;br /&gt;
** make a dir for repos&lt;br /&gt;
*** &amp;lt;pre&amp;gt; mkdir -p /etc/yum.repos.d &amp;lt;/pre&amp;gt;&lt;br /&gt;
** add the repo. The file name &amp;lt;strong&amp;gt; must &amp;lt;/strong&amp;gt; end in &#039;.repo&#039; for instance  mybuild.repo&lt;br /&gt;
 &amp;lt;pre&amp;gt; &lt;br /&gt;
  [myrepo]                                                                                                                                             &lt;br /&gt;
  name=myRepo for testing                                                                                                                         &lt;br /&gt;
  baseurl=http://&amp;lt;host ip addr or hostname&amp;gt;:5678                      &lt;br /&gt;
  enabled=1                                               &lt;br /&gt;
  metadata_expire=0                            &lt;br /&gt;
  gpgcheck=0                       &lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
* install something&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 dnf -v install mdadm&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why Might I Use This? ==&lt;br /&gt;
This workflow is one where you need to iteratively try out what packages you want on your image. In my case, I was doing a native build of a complex sw repo and needed to make;fail;add dependency somehow;make again; quite a few times.  I certainly did not want to wait while bitbake made a new image with my additional dependency and then wait again while dd copied that image to my usb key.  This way, I could bitbake dependency, rerun createrepo, dnf install from target. Much much faster.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32131</id>
		<title>TipsAndTricks/EnablingAPackageFeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32131"/>
		<updated>2017-10-05T23:57:37Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Create Package Feed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Morty (2.2) and earlier =&lt;br /&gt;
== Caveat == &lt;br /&gt;
This article is based on work done a few years ago with fido (1.8) and only covers using smart with rpm. Needs some testing and extended to cover using dnf.&lt;br /&gt;
&lt;br /&gt;
Instructions assume you have had at least one successful build of your target image.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Format ==&lt;br /&gt;
package format is set via variable PACKAGE_CLASSES, typically in local.conf. Look for line like&lt;br /&gt;
 PACKAGE_CLASSES ?= &amp;quot;package_rpm&amp;quot;&lt;br /&gt;
This means you&#039;re using rpm.&lt;br /&gt;
&lt;br /&gt;
== Know Your Package Architectures ==&lt;br /&gt;
Your OS image will be comprised of a number of different package architectures. &lt;br /&gt;
=== From the build system view ===&lt;br /&gt;
The package feed needs to know what they are so look in tmp/deploy/rpm&lt;br /&gt;
 $ ls tmp/deploy/rpm/&lt;br /&gt;
 all  core2_32  edison  x86_64_nativesdk&lt;br /&gt;
You can exclude anything starting with x86_64. This means the  architectures on the target are: &amp;lt;tt&amp;gt;all  core2_32  edison&amp;lt;/tt&amp;gt;&lt;br /&gt;
=== From target system view ===&lt;br /&gt;
 $ rpm -qq&lt;br /&gt;
look at the endings of the various packages.  For example , if you build for qemux86-64 the suffixes will be&lt;br /&gt;
 core2_64&lt;br /&gt;
 qemux86_64&lt;br /&gt;
 all&lt;br /&gt;
so those are the architectures supported on the target.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Feed URL ==&lt;br /&gt;
Is this example we&#039;ll use &amp;lt;tt&amp;gt;http://my-server.com/repo&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add Package Manager to Build ==&lt;br /&gt;
Smart package manager is in oe-core, so there is no need to add any extra layers. You do, however need to tell the build system to include pkg management on the target, since excluding package management saves space, it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
 EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot;&lt;br /&gt;
&lt;br /&gt;
On releases prior to jethro, you *may* need to also do&lt;br /&gt;
 IMAGE_INSTALL_append=&amp;quot; python-smartrpm &amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configure Package Feed in Build ==&lt;br /&gt;
Now you have the information to create a package feed, ideally you add details in your distro conf file. If you are not using your own distro, you can set the following in local.conf. Note, if you only want to configure your channels on the target and not have any defaults, these definitions can be excluded.&lt;br /&gt;
 PACKAGE_FEED_URIS = &amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_BASE_PATHS = &amp;quot;rpm&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_ARCHS = &amp;quot;all edison core2_32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create Package Feed ==&lt;br /&gt;
* Re-build image so it includes smart and the package feed info&lt;br /&gt;
** Also, if you find you need an additional recipe not included in the image e.g. gawk, you can do bitbake gawk and it&#039;s packages will be available too.&lt;br /&gt;
*** this can be done iteratively &lt;br /&gt;
* Update repo package indices &lt;br /&gt;
 bitbake package-index&lt;br /&gt;
* Copy packages to server. This sample script assumes files are served from /var/www/html/repo&lt;br /&gt;
** We exclude x86_64 as those are host side (aka native) rpms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* /var/www/html/repo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you don&#039;t have a web server already serving up a directory and don&#039;t feel like going through the effort to do that you can do the following.&lt;br /&gt;
** Assume your feed is /opt/feed&lt;br /&gt;
** apt-get/dnf install python-twistd&lt;br /&gt;
** run twistd on the directory&lt;br /&gt;
 $ twistd -n web --path /opt/feed -p 5678&lt;br /&gt;
* This way you can serve different feeds on different ports&lt;br /&gt;
&lt;br /&gt;
== Run Package Manager on Target ==&lt;br /&gt;
* Make sure network is up and sync with package feed.&lt;br /&gt;
 smart update&lt;br /&gt;
* Install my-package&lt;br /&gt;
 smart search my-package&lt;br /&gt;
 smart install my-package&lt;br /&gt;
&lt;br /&gt;
== Recover Package Feed Config On Target ==&lt;br /&gt;
Smart does not have a config file, so config must be done via command line. This script re-creates the config set by distro in example above&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
feed_url=&amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
platform=&amp;quot;my-platform&amp;quot;&lt;br /&gt;
repo_name=&amp;quot;my-repo&amp;quot;&lt;br /&gt;
for arch in all edison core2_32; do&lt;br /&gt;
    smart channel --add $platform-$arch type=rpm-md name=&amp;quot;$repo_name&amp;quot;  baseurl=$feed_url/$arch -y &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Rebuild the cache with the new channels added&lt;br /&gt;
 $ smart update&lt;br /&gt;
This will result in a set of feeds you can see with &lt;br /&gt;
 $ smart channel --show&lt;br /&gt;
&lt;br /&gt;
= Pyro (2.3) and greater =&lt;br /&gt;
== Quick and Dirty Feed Serving ==&lt;br /&gt;
If you don&#039;t have a web server already serving up a directory and don&#039;t feel like going through the effort to do that you can do the following.&lt;br /&gt;
* Assume your feed is /opt/feed&lt;br /&gt;
* apt-get/dnf install python-twistd&lt;br /&gt;
* run twistd on the directory&lt;br /&gt;
 $ twistd -n web --path /opt/feed -p 5678&lt;br /&gt;
* This way you can serve diff feeds on diff ports easily&lt;br /&gt;
&lt;br /&gt;
== From a Build dir ==&lt;br /&gt;
=== Easiest Way ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* update the package indices&lt;br /&gt;
** bitbake package-index&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path tmp/deploy/rpm -p 5678&lt;br /&gt;
=== How to keep a separate feed Dir ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* copy to dir&lt;br /&gt;
** rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* feedDir/&lt;br /&gt;
* Build the tools needed to make directories into repos&lt;br /&gt;
** bitbake createrepo-c-native -caddto_recipe_sysroot &lt;br /&gt;
* Turn the directory into a repo&lt;br /&gt;
** oe-run-native createrepo-c-native createrepo_c feedDir&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path feedDir -p 5678&lt;br /&gt;
&lt;br /&gt;
== From the Target ==&lt;br /&gt;
* make the target aware of the repo you just created.&lt;br /&gt;
** make a dir for repos&lt;br /&gt;
*** &amp;lt;pre&amp;gt; mkdir -p /etc/yum.repos.d &amp;lt;/pre&amp;gt;&lt;br /&gt;
** add the repo. The file name &amp;lt;strong&amp;gt; must &amp;lt;/strong&amp;gt; end in &#039;.repo&#039; for instance  mybuild.repo&lt;br /&gt;
 &amp;lt;pre&amp;gt; &lt;br /&gt;
  [myrepo]                                                                                                                                             &lt;br /&gt;
  name=myRepo for testing                                                                                                                         &lt;br /&gt;
  baseurl=http://&amp;lt;host ip addr or hostname&amp;gt;:5678                      &lt;br /&gt;
  enabled=1                                               &lt;br /&gt;
  metadata_expire=0                            &lt;br /&gt;
  gpgcheck=0                       &lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
* install something&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 dnf -v install mdadm&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why Might I Use This? ==&lt;br /&gt;
This workflow is one where you need to iteratively try out what packages you want on your image. In my case, I was doing a native build of a complex sw repo and needed to make;fail;add dependency somehow;make again; quite a few times.  I certainly did not want to wait while bitbake made a new image with my additional dependency and then wait again while dd copied that image to my usb key.  This way, I could bitbake dependency, rerun createrepo, dnf install from target. Much much faster.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32130</id>
		<title>TipsAndTricks/EnablingAPackageFeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=32130"/>
		<updated>2017-10-05T23:51:22Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Morty (2.2) and earlier =&lt;br /&gt;
== Caveat == &lt;br /&gt;
This article is based on work done a few years ago with fido (1.8) and only covers using smart with rpm. Needs some testing and extended to cover using dnf.&lt;br /&gt;
&lt;br /&gt;
Instructions assume you have had at least one successful build of your target image.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Format ==&lt;br /&gt;
package format is set via variable PACKAGE_CLASSES, typically in local.conf. Look for line like&lt;br /&gt;
 PACKAGE_CLASSES ?= &amp;quot;package_rpm&amp;quot;&lt;br /&gt;
This means you&#039;re using rpm.&lt;br /&gt;
&lt;br /&gt;
== Know Your Package Architectures ==&lt;br /&gt;
Your OS image will be comprised of a number of different package architectures. &lt;br /&gt;
=== From the build system view ===&lt;br /&gt;
The package feed needs to know what they are so look in tmp/deploy/rpm&lt;br /&gt;
 $ ls tmp/deploy/rpm/&lt;br /&gt;
 all  core2_32  edison  x86_64_nativesdk&lt;br /&gt;
You can exclude anything starting with x86_64. This means the  architectures on the target are: &amp;lt;tt&amp;gt;all  core2_32  edison&amp;lt;/tt&amp;gt;&lt;br /&gt;
=== From target system view ===&lt;br /&gt;
 $ rpm -qq&lt;br /&gt;
look at the endings of the various packages.  For example , if you build for qemux86-64 the suffixes will be&lt;br /&gt;
 core2_64&lt;br /&gt;
 qemux86_64&lt;br /&gt;
 all&lt;br /&gt;
so those are the architectures supported on the target.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Feed URL ==&lt;br /&gt;
Is this example we&#039;ll use &amp;lt;tt&amp;gt;http://my-server.com/repo&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add Package Manager to Build ==&lt;br /&gt;
Smart package manager is in oe-core, so there is no need to add any extra layers. You do, however need to tell the build system to include pkg management on the target, since excluding package management saves space, it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
 EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot;&lt;br /&gt;
&lt;br /&gt;
On releases prior to jethro, you *may* need to also do&lt;br /&gt;
 IMAGE_INSTALL_append=&amp;quot; python-smartrpm &amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configure Package Feed in Build ==&lt;br /&gt;
Now you have the information to create a package feed, ideally you add details in your distro conf file. If you are not using your own distro, you can set the following in local.conf. Note, if you only want to configure your channels on the target and not have any defaults, these definitions can be excluded.&lt;br /&gt;
 PACKAGE_FEED_URIS = &amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_BASE_PATHS = &amp;quot;rpm&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_ARCHS = &amp;quot;all edison core2_32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create Package Feed ==&lt;br /&gt;
* Re-build image so it includes smart and the package feed info&lt;br /&gt;
** Also, if you find you need an additional recipe not included in the image e.g. gawk, you can do bitbake gawk and it&#039;s packages will be available too.&lt;br /&gt;
*** this can be done iteratively &lt;br /&gt;
* Update repo package indices &lt;br /&gt;
 bitbake package-index&lt;br /&gt;
* Copy packages to server. This sample script assumes files are served from /var/www/html/repo&lt;br /&gt;
** We exclude x86_64 as those are host side (aka native) rpms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* /var/www/html/repo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Run Package Manager on Target ==&lt;br /&gt;
* Make sure network is up and sync with package feed.&lt;br /&gt;
 smart update&lt;br /&gt;
* Install my-package&lt;br /&gt;
 smart search my-package&lt;br /&gt;
 smart install my-package&lt;br /&gt;
&lt;br /&gt;
== Recover Package Feed Config On Target ==&lt;br /&gt;
Smart does not have a config file, so config must be done via command line. This script re-creates the config set by distro in example above&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
feed_url=&amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
platform=&amp;quot;my-platform&amp;quot;&lt;br /&gt;
repo_name=&amp;quot;my-repo&amp;quot;&lt;br /&gt;
for arch in all edison core2_32; do&lt;br /&gt;
    smart channel --add $platform-$arch type=rpm-md name=&amp;quot;$repo_name&amp;quot;  baseurl=$feed_url/$arch -y &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Rebuild the cache with the new channels added&lt;br /&gt;
 $ smart update&lt;br /&gt;
This will result in a set of feeds you can see with &lt;br /&gt;
 $ smart channel --show&lt;br /&gt;
&lt;br /&gt;
= Pyro (2.3) and greater =&lt;br /&gt;
== Quick and Dirty Feed Serving ==&lt;br /&gt;
If you don&#039;t have a web server already serving up a directory and don&#039;t feel like going through the effort to do that you can do the following.&lt;br /&gt;
* Assume your feed is /opt/feed&lt;br /&gt;
* apt-get/dnf install python-twistd&lt;br /&gt;
* run twistd on the directory&lt;br /&gt;
 $ twistd -n web --path /opt/feed -p 5678&lt;br /&gt;
* This way you can serve diff feeds on diff ports easily&lt;br /&gt;
&lt;br /&gt;
== From a Build dir ==&lt;br /&gt;
=== Easiest Way ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* update the package indices&lt;br /&gt;
** bitbake package-index&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path tmp/deploy/rpm -p 5678&lt;br /&gt;
=== How to keep a separate feed Dir ===&lt;br /&gt;
* Use RPMS&lt;br /&gt;
** PACKAGE_CLASSES = &amp;quot;package_rpm&amp;quot; in local.conf&lt;br /&gt;
* have package tools&lt;br /&gt;
**  EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot; in local.conf&lt;br /&gt;
* build something you want&lt;br /&gt;
** bitbake mdadm&lt;br /&gt;
* copy to dir&lt;br /&gt;
** rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* feedDir/&lt;br /&gt;
* Build the tools needed to make directories into repos&lt;br /&gt;
** bitbake createrepo-c-native -caddto_recipe_sysroot &lt;br /&gt;
* Turn the directory into a repo&lt;br /&gt;
** oe-run-native createrepo-c-native createrepo_c feedDir&lt;br /&gt;
* Serve up feed&lt;br /&gt;
** twistd -n web --path feedDir -p 5678&lt;br /&gt;
&lt;br /&gt;
== From the Target ==&lt;br /&gt;
* make the target aware of the repo you just created.&lt;br /&gt;
** make a dir for repos&lt;br /&gt;
*** &amp;lt;pre&amp;gt; mkdir -p /etc/yum.repos.d &amp;lt;/pre&amp;gt;&lt;br /&gt;
** add the repo. The file name &amp;lt;strong&amp;gt; must &amp;lt;/strong&amp;gt; end in &#039;.repo&#039; for instance  mybuild.repo&lt;br /&gt;
 &amp;lt;pre&amp;gt; &lt;br /&gt;
  [myrepo]                                                                                                                                             &lt;br /&gt;
  name=myRepo for testing                                                                                                                         &lt;br /&gt;
  baseurl=http://&amp;lt;host ip addr or hostname&amp;gt;:5678                      &lt;br /&gt;
  enabled=1                                               &lt;br /&gt;
  metadata_expire=0                            &lt;br /&gt;
  gpgcheck=0                       &lt;br /&gt;
  &amp;lt;/pre&amp;gt;&lt;br /&gt;
* install something&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 dnf -v install mdadm&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Why Might I Use This? ==&lt;br /&gt;
This workflow is one where you need to iteratively try out what packages you want on your image. In my case, I was doing a native build of a complex sw repo and needed to make;fail;add dependency somehow;make again; quite a few times.  I certainly did not want to wait while bitbake made a new image with my additional dependency and then wait again while dd copied that image to my usb key.  This way, I could bitbake dependency, rerun createrepo, dnf install from target. Much much faster.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Documentation_Review&amp;diff=31426</id>
		<title>Documentation Review</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Documentation_Review&amp;diff=31426"/>
		<updated>2017-09-09T04:21:44Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: Created page with &amp;quot;Yocto documentation review.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Yocto documentation review.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29564</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29564"/>
		<updated>2017-08-01T17:48:59Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Checkout kernel source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives you an easy way of getting the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ git clone -b pyro git://git.yoctoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.  Be sure to create example recipe and append files when you run you run the &amp;quot;yocto-layer&amp;quot; command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 Please enter the layer priority you&#039;d like to use for the layer: [default: 6] &lt;br /&gt;
 Would you like to have an example recipe created? (y/n) [default: n] y&lt;br /&gt;
 Please enter the name you&#039;d like to use for your example recipe: [default: example] &lt;br /&gt;
 Would you like to have an example bbappend file created? (y/n) [default: n] y&lt;br /&gt;
 Please enter the name you&#039;d like to use for your bbappend file: [default: example] &lt;br /&gt;
 Please enter the version number you&#039;d like to use for your bbappend file (this should match the recipe you&#039;re appending to): [default: 0.1] &lt;br /&gt;
&lt;br /&gt;
 New layer created in ../meta-my-kernel.&lt;br /&gt;
&lt;br /&gt;
 Don&#039;t forget to add it to your BBLAYERS (for details see ../meta-my-kernel/README).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As directed, we need to add our layer to BBLAYERS as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.1sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that includes the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.1sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. If you do not want to use the default ~/poky_sdk directory for installation of the toolchain, use the -d option to specify a destination.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.1.sh&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3.1&lt;br /&gt;
============================================================================&lt;br /&gt;
Enter target directory for SDK (default: ~/poky_sdk): &lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/scottrif/poky_sdk&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK......................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |#########################################################################################################| Time: 0:00:52&lt;br /&gt;
Initialising tasks: 100% |######################################################################################################| Time: 0:00:04&lt;br /&gt;
Checking sstate mirror object availability: 100% |##############################################################################| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |#########################################################################################################| Time: 0:00:33&lt;br /&gt;
Initialising tasks: 100% |######################################################################################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, which shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a &lt;br /&gt;
 new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot the Minnowboard with this image and check to be sure that everything is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a bug that may cause error messages such as the following to be displayed. These can be ignored, the source code will be correct checked out.&lt;br /&gt;
 ERROR: Taskhash mismatch 2c793438c2d9f8c3681fd5f7bc819efa versus be3a89ce7c47178880ba7bf6293d7404 for /path/to/esdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb.do_unpack&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
=== Export patches and create a bbappend file ===&lt;br /&gt;
To export your commits as patches and a bbappend file use the following command in the ESDK terminal. We&#039;ll target the &amp;quot;my-kernel&amp;quot; layer we created in the bitbake terminal &lt;br /&gt;
 $ devtool finish linux-yocto /path/to/meta-my-kernel&lt;br /&gt;
The patches and the bbappend can be found in /path/to/meta-my-kernel/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Working with upstream kernel ==&lt;br /&gt;
Slightly different workflow where we use a kernel from kernel.org.&lt;br /&gt;
&lt;br /&gt;
Content TBD&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel ==&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
Execute the following command from your build directory in the bitbake terminal&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks&amp;diff=29478</id>
		<title>TipsAndTricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks&amp;diff=29478"/>
		<updated>2017-07-31T20:45:00Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Articles in development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
This wiki page captures ideas for &amp;quot;Tips and tricks&amp;quot; articles that are aimed Yocto Project users that have a basic understanding of the core tools and want to extend their knowledge. Articles will written and published using the following process&lt;br /&gt;
* Articles must refer to the current (or earlier) release. They must not cover features in development in the master branch.&lt;br /&gt;
* Anyone can add entries to the &#039;&#039;&#039;Ideas for Articles&#039;&#039;&#039; section based on challenges they have encountered when using the Yocto Project&lt;br /&gt;
* More experienced developers can start to flesh out articles in the &#039;&#039;Ideas&#039;&#039; section move then to &#039;&#039;&#039;Articles in Development&#039;&#039;&#039; or contribute directly to this section.&lt;br /&gt;
* Approximately once a month an article ready for publishing will be chosen for publication by [mailto:jeffrey.osier-mixon@intel.com Jefro] and moved to the &#039;&#039;&#039;Finished Articles &#039;&#039;&#039; section. &lt;br /&gt;
&lt;br /&gt;
Please contact [mailto:henry.bruce@intel.com?Subject=Yocto%20Project%20Tips%20and%20Tricks Henry Bruce] with any questions.&lt;br /&gt;
&lt;br /&gt;
== Ideas for Articles ==&lt;br /&gt;
* [[TipsAndTricks/GeneratingASDK]] (Ross, Paul help please...)&lt;br /&gt;
* [[TipsAndTricks/AddingALicense]] (Ross)&lt;br /&gt;
* [[TipsAndTricks/UsingBuildstatsDiff]] (Ross)&lt;br /&gt;
* [[TipsAndTricks/DevPyShell]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/CreatingABSP]]. And what not to put in it.&lt;br /&gt;
* [[TipsAndTricks/Patchwork]]&lt;br /&gt;
* [[TipsAndTricks/Patchtest]] (Leo)&lt;br /&gt;
* [[TipsAndTricks/CreateNewLayer]] (Brendan)&lt;br /&gt;
&lt;br /&gt;
== Articles in development ==&lt;br /&gt;
* [[TipsAndTricks/DockerOnImage]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/OnTargetWorkFlowLeveragingRPMPackagefeeds]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/BuildingAndRunningClearContainersonTarget]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/KernelDevelopmentWithEsdk]] (Todor Minchev, Henry Bruce)&lt;br /&gt;
* [[TipsAndTricks/DebugNativeRecipeWithGdb]] (Joshua Lock)&lt;br /&gt;
* [[TipsAndTricks/Netconsole]] (Ross Burton)&lt;br /&gt;
* [[TipsAndTricks/ParsingProfiling]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/DemystifyingTheLinuxYoctoKernel]] (Tom Zanussi)&lt;br /&gt;
* [[TipsAndTricks/Patching the source for a recipe]] (Paul Eggleton)&lt;br /&gt;
* [[TipsAndTricks/Incorporating closed source components]] (Paul Eggleton)&lt;br /&gt;
* [[TipsAndTricks/DebuggingAvoidingRebuilds]] (Richard Purdie)&lt;br /&gt;
* [[TipsAndTricks/GitBisectABitbake]]  (Ross)&lt;br /&gt;
* [[TipsAndTricks/RunningEclipseAgainstBuiltImage]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/PrelinkSomePointersAndWorkarounds]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/RunningQemuOnMacOSX]] (Stephano)&lt;br /&gt;
* [[TipsAndTricks/Understanding what changed (diffsigs etc)]] (Joshua)&lt;br /&gt;
* [[TipsAndTricks/CropsCLIContainers]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/QuickAndDirtyKernelConfig]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/TestingToasterWithContainers]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/InvestigatingBuildTime]] (Leo Sandoval)&lt;br /&gt;
* [[TipsAndTricks/ResolvingLocaleIssues]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/DebuggingBitbakeInPudb]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/DebuggingBitbakeInWingIDE]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/CliBuildsInToasterBuilddir]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/BuildingZephyrImages]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/Cmake,Eclipse, and SDKS]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/LinuxKernelAndSDKs]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/Running YP binaries on Ubuntu and Vice Versa]] (bavery)&lt;br /&gt;
* [[TipsAndTricks/LockSharedState]] (Stephano)&lt;br /&gt;
* [[TipsAndTricks/Building and booting for Joule or MinnowBoard]] (Cal)&lt;br /&gt;
* [[TipsAndTricks/EnablingAPackageFeed]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/Creating Recipes for ROS modules]] (Henry)&lt;br /&gt;
* [[TipsAndTricks/TeamWorkflows]] (Joshua)&lt;br /&gt;
&lt;br /&gt;
== Finished Articles ==&lt;br /&gt;
* [[TipsAndTricks/Packaging Prebuilt Libraries | Packaging Prebuilt Libraries]] (Ross and Henry)&lt;br /&gt;
* [[TipsAndTricks/NPM | Packaging Node.js Projects]]  (Brendan and Henry)&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29387</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29387"/>
		<updated>2017-07-29T00:40:34Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build image with your modified kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
=== Export patches and create a bbappend file ===&lt;br /&gt;
To export your commits as patches and a bbappend file use the following command in the ESDK terminal. We&#039;ll target the &amp;quot;my-kernel&amp;quot; layer we created in the bitbake terminal &lt;br /&gt;
 $ devtool finish linux-yocto /path/to/meta-my-kernel&lt;br /&gt;
The patches and the bbappend can be found in /path/to/meta-my-kernel/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Working with upstream kernel ==&lt;br /&gt;
Slightly different workflow where we use a kernel from kernel.org.&lt;br /&gt;
&lt;br /&gt;
Content TBD&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel ==&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
Execute the following command from your build directory in the bitbake terminal&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29386</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29386"/>
		<updated>2017-07-29T00:39:34Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Export patches and create a bbappend file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
=== Export patches and create a bbappend file ===&lt;br /&gt;
To export your commits as patches and a bbappend file use the following command in the ESDK terminal. We&#039;ll target the &amp;quot;my-kernel&amp;quot; layer we created in the bitbake terminal &lt;br /&gt;
 $ devtool finish linux-yocto /path/to/meta-my-kernel&lt;br /&gt;
The patches and the bbappend can be found in /path/to/meta-my-kernel/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel ==&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
Execute the following command from your build directory in the bitbake terminal&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29385</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29385"/>
		<updated>2017-07-29T00:39:00Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build image with your modified kernel (bitbake terminal) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file ==&lt;br /&gt;
To export your commits as patches and a bbappend file use the following command in the ESDK terminal. We&#039;ll target the &amp;quot;my-kernel&amp;quot; layer we created in the bitbake terminal &lt;br /&gt;
 $ devtool finish linux-yocto /path/to/meta-my-kernel&lt;br /&gt;
The patches and the bbappend can be found in /path/to/meta-my-kernel/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel ==&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
Execute the following command from your build directory in the bitbake terminal&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29384</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29384"/>
		<updated>2017-07-29T00:38:05Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Export patches and create a bbappend file (bitbake terminal) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file ==&lt;br /&gt;
To export your commits as patches and a bbappend file use the following command in the ESDK terminal. We&#039;ll target the &amp;quot;my-kernel&amp;quot; layer we created in the bitbake terminal &lt;br /&gt;
 $ devtool finish linux-yocto /path/to/meta-my-kernel&lt;br /&gt;
The patches and the bbappend can be found in /path/to/meta-my-kernel/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29383</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29383"/>
		<updated>2017-07-29T00:29:29Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
We also need to create a layer to take the kernel patches we&#039;ll be creating.&lt;br /&gt;
 $ yocto-layer create my-kernel -o ../meta-my-kernel&lt;br /&gt;
 $ bitbake-layers add-layer ../meta-my-kernel&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29382</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29382"/>
		<updated>2017-07-29T00:24:22Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;&#039;&#039;bitbake terminal&#039;&#039;&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29381</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29381"/>
		<updated>2017-07-29T00:18:28Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Create image with new kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First make a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
Then create loopback devices for each partition in wic file&lt;br /&gt;
 $ sudo kpartx -v -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
 add map loop3p1 (253:6): 0 47446 linear /dev/loop3 2048&lt;br /&gt;
 add map loop3p2 (253:7): 0 119356 linear /dev/loop3 51200&lt;br /&gt;
 add map loop3p3 (253:8): 0 90112 linear /dev/loop3 170556&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29380</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29380"/>
		<updated>2017-07-29T00:09:27Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First maske a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
 $ sudo kpartx -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
This will create a loopback device, see /dev/mapper to find out which device. &lt;br /&gt;
 $ ls /dev/mapper/loop*&lt;br /&gt;
 /dev/mapper/loop3p1  /dev/mapper/loop3p2  /dev/mapper/loop3p3&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29379</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29379"/>
		<updated>2017-07-29T00:08:22Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Edit and build driver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
=== Create image with new kernel ===&lt;br /&gt;
Normally you&#039;d make a new image with &amp;lt;tt&amp;gt;devtool build-image&amp;lt;/tt&amp;gt; but this can take a minute or so and messes with the kernel source folder. A faster option is to use kpartx to splice the new kernel into the image you have already built. First maske a copy of your wic file in say /tmp&lt;br /&gt;
 $ cp tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic /tmp&lt;br /&gt;
 $ sudo kpartx -a /tmp/core-image-minimal-genericx86-64.wic&lt;br /&gt;
This will create a loopback device, see /dev/mapper to find out which device. &lt;br /&gt;
 $ ls /dev/mapper/loop*&lt;br /&gt;
 /dev/mapper/loop3p1  /dev/mapper/loop3p2  /dev/mapper/loop3p3&lt;br /&gt;
Kernel is in the first device, so let&#039;s mount /dev/mapper/loop3p1 to take a look&lt;br /&gt;
 $ sudo mkdir /mnt/wic-p1&lt;br /&gt;
 $ sudo mount /dev/mapper/loop3p1 /mnt/wic-p1&lt;br /&gt;
Now copy over new kernel&lt;br /&gt;
 $ sudo cp workspace/sources/linux-yocto/arch/x86/boot/bzImage /mnt/wic-p1&lt;br /&gt;
Then unmount and unkaprtx...&lt;br /&gt;
 $ sudo umount mnt/wic-p1&lt;br /&gt;
 $ sudo kaprtx -d /dev/loop3&lt;br /&gt;
Now flash image&lt;br /&gt;
 $ dd if=/tmp/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard, log on and look in log for driver message&lt;br /&gt;
 # root@genericx86-64:~# dmesg | grep Serial:&lt;br /&gt;
 Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled&lt;br /&gt;
 Serial: 8250/16550 driver modified with eSDK&lt;br /&gt;
It worked!&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29374</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29374"/>
		<updated>2017-07-28T23:03:31Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build and test the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Edit and build driver ===&lt;br /&gt;
Kernel source will be in the location shown at end of the &amp;lt;tt&amp;gt;devtool modify virtual/kernel&amp;lt;/tt&amp;gt; output. Let&#039;s make a trivial change to the serial driver in drivers/tty/serial/8250/8250_core.c. After the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n&amp;quot;,&lt;br /&gt;
          nr_uarts, share_irqs ? &amp;quot;en&amp;quot; : &amp;quot;dis&amp;quot;);&lt;br /&gt;
Add the line&lt;br /&gt;
 pr_info(&amp;quot;Serial: 8250/16550 driver modified with eSDK&amp;quot;);&lt;br /&gt;
To build the updated kernel source, in the SDK terminal run make in your kernel source folder. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29345</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29345"/>
		<updated>2017-07-28T20:51:47Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* = Build and test the kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build and test the kernel ===&lt;br /&gt;
In the SDK terminal, run make in your kernel source folder as given at end of &amp;lt;tt&amp;gt;devtool modify&amp;lt;/tt&amp;gt; output. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29344</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29344"/>
		<updated>2017-07-28T20:51:35Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Prepare to make changes to kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Working with Yocto kernel ==&lt;br /&gt;
=== Checkout kernel source ===&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Do the following in the ESDK terminal. Note that we use the virtual kernel provider so we don&#039;t need to know the kernel recipe name. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build and test the kernel ==&lt;br /&gt;
In the SDK terminal, run make in your kernel source folder as given at end of &amp;lt;tt&amp;gt;devtool modify&amp;lt;/tt&amp;gt; output. Adjust the -j option to match number of cores on your workstation.&lt;br /&gt;
 $ make -C workspace/sources/linux-yocto -j4&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29331</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29331"/>
		<updated>2017-07-28T16:41:30Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Prepare to make changes to kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Prepare to make changes to kernel ==&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace. Note that use the virtual kernel provider so we don&#039;t need to know the kernel recipe name.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29330</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29330"/>
		<updated>2017-07-28T16:29:53Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Setup your ESDK build environment (ESDK terminal) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
== Build initial image with ESDK ==&lt;br /&gt;
In the ESDK terminal, build the image&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build-image&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.&lt;br /&gt;
WARNING: No packages to add, building image core-image-minimal unmodified&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Resolving any missing task queue dependencies&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:07&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
NOTE: Executing SetScene Tasks&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Successfully built core-image-minimal. You can find output files in /path/to/esdk/tmp/deploy/images/genericx86-64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now flash to image to USB stick, assuming USB stick is on /dev/sdd&lt;br /&gt;
 $ sudo dd if=tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic of=/dev/sdd bs=1MB&lt;br /&gt;
 $ sync&lt;br /&gt;
Boot Minnowboard with this image and check all is OK.&lt;br /&gt;
&lt;br /&gt;
== Prepare to make changes to kernel ==&lt;br /&gt;
First we must use devtool to checkout the kernel source code in its workspace.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool modify virtual/kernel&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Mapping virtual/kernel to linux-yocto&lt;br /&gt;
Loading cache: 100% |############################################| Time: 0:00:00&lt;br /&gt;
Loaded 1299 entries from dependency cache.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_fetch...&lt;br /&gt;
NOTE: Executing do_unpack...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_kernel_checkout...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Patching...&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_validate_branches...&lt;br /&gt;
NOTE: Executing do_kernel_metadata...&lt;br /&gt;
NOTE: Executing do_patch...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 6 tasks of which 3 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Generating kernel config&lt;br /&gt;
NOTE: Executing RunQueue Tasks&lt;br /&gt;
NOTE: Executing do_prepare_recipe_sysroot...&lt;br /&gt;
NOTE: Executing do_kernel_configme...&lt;br /&gt;
NOTE: Executing do_configure...&lt;br /&gt;
NOTE: Tasks Summary: Attempted 9 tasks of which 6 didn&#039;t need to be rerun and all succeeded.&lt;br /&gt;
NOTE: Copying kernel config to srctree&lt;br /&gt;
NOTE: Source tree extracted to /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
NOTE: Recipe linux-yocto now set up to build from /home/hbruce/Tools/yocto/kernel/workspace/sources/linux-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29328</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29328"/>
		<updated>2017-07-28T16:07:48Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Setup your ESDK build environment (ESDK terminal) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-core2-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29327</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29327"/>
		<updated>2017-07-28T16:07:04Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;. First we&#039;ll checkout poky and configure bitbake environment.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
Now we need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Add the following to conf/local.conf&lt;br /&gt;
 MACHINE = &amp;quot;genericx86-64&amp;quot;&lt;br /&gt;
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29301</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29301"/>
		<updated>2017-07-28T00:41:52Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
We need to do some configuration for the Minnowboard image. &lt;br /&gt;
* Set MACHINE (as default is qemux86)&lt;br /&gt;
* Enable kernel modules (disabled by default for minimal images)&lt;br /&gt;
Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ echo &#039;MACHINE = &amp;quot;genericx86-64&amp;quot;&#039; &amp;gt;&amp;gt; conf/local.conf&lt;br /&gt;
 $ echo &#039;MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += &amp;quot;kernel-modules&amp;quot;&#039; &amp;gt;&amp;gt; conf/local.conf&lt;br /&gt;
Now build an extensible SDK installer for the Minnowboard in the bitbake terminal&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29277</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29277"/>
		<updated>2017-07-27T22:03:10Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensble SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensible SDK ==&lt;br /&gt;
First build an extensible SDK installer for the Minnowboard. Open a new terminal window, we&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ git clone -b pyro git://git.yocoproject.org/poky &lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ echo &#039;MACHINE = &amp;quot;genericx86-64&amp;quot;&#039; &amp;gt;&amp;gt; conf/local.conf&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29271</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=29271"/>
		<updated>2017-07-27T21:55:24Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the generix86-64 BSP and the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28308</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28308"/>
		<updated>2017-06-27T23:50:18Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Install Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take note of the final line, this shows you the environment setup script you must run each time you want to use the eSDK.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28307</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28307"/>
		<updated>2017-06-27T23:49:07Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Install Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
[hbruce@hbruce-desk3 yocto]$ ~/yocto/pyro/kernel-esdk/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d kernel&lt;br /&gt;
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.3&lt;br /&gt;
==========================================================================&lt;br /&gt;
You are about to install the SDK to &amp;quot;/home/hbruce/Tools/yocto/kernel&amp;quot;. Proceed[Y/n]? Y&lt;br /&gt;
Extracting SDK...............................................done&lt;br /&gt;
Setting it up...&lt;br /&gt;
Extracting buildtools...&lt;br /&gt;
Preparing build system...&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:08&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:06&lt;br /&gt;
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00&lt;br /&gt;
Parsing recipes: 100% |##########################################| Time: 0:00:05&lt;br /&gt;
Initialising tasks: 100% |#######################################| Time: 0:00:00&lt;br /&gt;
done&lt;br /&gt;
SDK has been successfully set up and is ready to be used.&lt;br /&gt;
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.&lt;br /&gt;
 $ . /home/hbruce/Tools/yocto/kernel/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28306</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28306"/>
		<updated>2017-06-27T23:47:20Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Checkout the kernel source tree and construct .config */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
 $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&#039;&#039;&#039;YOU MUST OPEN A NEW TERMINAL WHEN USING THE ESDK. DO NOT RE-USE YOUR BITBAKE TERMINAL.&#039;&#039;&#039;&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;. Run the setup script given by the installer.&lt;br /&gt;
 $ source /path/to/esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
 &amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
 Run devtool --help for further details.&lt;br /&gt;
&lt;br /&gt;
If you see this&lt;br /&gt;
 WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
You didn&#039;t open a new terminal!&lt;br /&gt;
&lt;br /&gt;
=== Checkout the kernel source tree and construct .config ===&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28305</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28305"/>
		<updated>2017-06-27T23:20:52Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Install Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
 $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28304</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28304"/>
		<updated>2017-06-27T23:20:40Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensble SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 $ source poky/oe-init-build-env&lt;br /&gt;
 $ bitbake core-image-minimal -c populate_sdk_ext &lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28302</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28302"/>
		<updated>2017-06-27T22:57:18Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your kernel updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28301</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28301"/>
		<updated>2017-06-27T22:54:13Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Install Extensible SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
Run the installer as follows. Note use of -d option to specify destination. By default installer wants to use /opt/poky that requires administrator privileges.&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh -d /path/to/esdk&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28300</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28300"/>
		<updated>2017-06-27T22:51:48Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensble SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]]. If you downloaded the installer, make it executable.&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28299</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28299"/>
		<updated>2017-06-27T22:41:43Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build or download an eSDK for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]].&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28298</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28298"/>
		<updated>2017-06-27T22:41:05Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto or linux-intel)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build and extensible SDK (eSDK) for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]].&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28297</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28297"/>
		<updated>2017-06-27T22:40:28Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensble SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build and extensible SDK (eSDK) for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The eSDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt eSDK installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]].&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28296</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28296"/>
		<updated>2017-06-27T22:34:41Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Build Extensble SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build and extensible SDK (eSDK) for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The ESDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt esdk installer that included the toolchain you need. For example, the pyro core-image-minimal esdk release for core2-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]].&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28294</id>
		<title>TipsAndTricks/KernelDevelopmentWithEsdk</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/KernelDevelopmentWithEsdk&amp;diff=28294"/>
		<updated>2017-06-27T20:36:15Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
This article describes an efficient workflow for Linux kernel development using Yocto Project. The goal is to get the build, deploy and test cycle to under a minute. We will be working with the Intel Minnowboard Turbot in this article but the process is the same for any platform and CPU architecture. &lt;br /&gt;
&lt;br /&gt;
The extensible SDK (eSDK) is a key part of this workflow for a number of reasons &lt;br /&gt;
# It contains the target toolchain which is not easily accessible in the bitbake environment&lt;br /&gt;
# It contains &#039;&#039;&#039;devtool&#039;&#039;&#039; which gives use an easy way of getting the the kernel source your target is using (if using linux-yocto)&lt;br /&gt;
# devtool will also automatically create patches for your updates and add them to the the kernel recipe&lt;br /&gt;
&lt;br /&gt;
There are two separate steps to this process&lt;br /&gt;
# Build and extensible SDK (eSDK) for your platform&lt;br /&gt;
# Install and use that eSDK to build your kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build Extensble SDK ==&lt;br /&gt;
Follow instructions in the [http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware Quick Start Guide] to build a image for the Minnowboard. Open a new terminal window and navigate to your poky directory. We&#039;ll refer to this terminal as your &#039;bitbake terminal&#039;.&lt;br /&gt;
The following commands will configure the Yocto build environment and build the eSDK installer&lt;br /&gt;
 source poky/oe-init-build-env&lt;br /&gt;
 bitbake -c populate_sdk_ext core-image-minimal&lt;br /&gt;
&lt;br /&gt;
The ESDK installer can be found in /path_to_build_directory/kernel-dev/tmp/deploy/sdk/&lt;br /&gt;
 ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-toolchain-ext-2.3.sh&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you are not using a yocto-linux kernel, you can use a prebuilt esdk installer. For example, the pyro core-image-minimal esdk release for x86-64 is located [[http://downloads.yoctoproject.org/releases/yocto/yocto-2.3/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.3.sh here]].&lt;br /&gt;
&lt;br /&gt;
== Install Extensible SDK ==&lt;br /&gt;
&lt;br /&gt;
Follow the installer instructions and provide a target directory for your ESDK installation e.g /path_to_esdk/&lt;br /&gt;
&lt;br /&gt;
== Checkout the kernel source tree and construct .config ==&lt;br /&gt;
&lt;br /&gt;
Check out the Linux kernel source and construct a .config from the Yocto kernel configuration segments. The sources can be found in /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto.&lt;br /&gt;
&lt;br /&gt;
 devtool modify linux-yocto&lt;br /&gt;
&lt;br /&gt;
If you are just using a kernel from somewhere else, for example kernel.org, you can just clone it instead of using devtool modify in this step.&lt;br /&gt;
&lt;br /&gt;
== Setup your ESDK build environment (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Open a new terminal and setup your build environment. We&#039;ll refer to this terminal as your &#039;ESDK terminal&#039;&lt;br /&gt;
&lt;br /&gt;
 . /path_to_esdk/environment-setup-corei7-64-poky-linux&lt;br /&gt;
&lt;br /&gt;
NOTE: If you see the message below you will really need to open a new terminal :).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;SDK environment now set up; additionally you may now run devtool to perform development tasks.&lt;br /&gt;
Run devtool --help for further details.&lt;br /&gt;
WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Build your kernel (ESDK terminal) ==&lt;br /&gt;
&lt;br /&gt;
Navigate to your workspace directory e.g /path_to_build_directory/kernel-dev/workspace/sources/linux-yocto&lt;br /&gt;
and build the kernel&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Modify your kernel and commit your changes (ESDK terminal)==&lt;br /&gt;
&lt;br /&gt;
You can navigate to the Linux source directory (/path_to_build_directory/kernel-dev/workspace/sources/linux-yocto) and modify the kernel. Commit your kernel changes.&lt;br /&gt;
 &lt;br /&gt;
== Build an image with your kernel changes (optional) (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
 devtool build-image core-image-minimal&lt;br /&gt;
&lt;br /&gt;
For faster iteration, in 2.4 some wic commands are being included to allow you to insert the kernel in an image without going through the full recreation of the image. For older releases you can do:&lt;br /&gt;
 sudo kpartx -a &amp;lt;foo&amp;gt;.wic&lt;br /&gt;
 sudo mount /dev/mapper/loopNpM /mnt/wic-partionM&lt;br /&gt;
In this case, it will be the next available loopback device. If you are not using any , it will be loop0. so in the std case it would look like&lt;br /&gt;
 sudo mount /dev/mapper/loop0p1 /mnt/wic-partion1&lt;br /&gt;
Then you could dd the kernel into the kernel partion.  Then unmount and unkaprtx...&lt;br /&gt;
 sudo umount mnt/wic-partionM&lt;br /&gt;
 sudo kaprtx -d /dev/loopN&lt;br /&gt;
&lt;br /&gt;
Note that this requires root/sudo rights. The assumption here is most kernel devs would have this or could do it in a vm/container.&lt;br /&gt;
&lt;br /&gt;
== Export patches and create a bbappend file (bitbake terminal) ==&lt;br /&gt;
To export your commits to patches and a bbappend file use the following command. &lt;br /&gt;
&lt;br /&gt;
 devtool finish linux-yocto /path_to_poky_directory/meta-yocto-bsp/&lt;br /&gt;
&lt;br /&gt;
The patches and the bbappend can be found in /path_to_poky_directory/meta-yocto-bsp/recipes-kernel/linux.&lt;br /&gt;
&lt;br /&gt;
== Build image with your modified kernel (bitbake terminal) ==&lt;br /&gt;
&lt;br /&gt;
You can now build an image which will include your kernel patches.&lt;br /&gt;
&lt;br /&gt;
Execute the following command from your build directory ( e.g /path_to_build_directory/kernel-dev/)&lt;br /&gt;
&lt;br /&gt;
 bitbake core-image-minimal&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Glossary_of_Terms_and_Acronyms&amp;diff=28224</id>
		<title>Glossary of Terms and Acronyms</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Glossary_of_Terms_and_Acronyms&amp;diff=28224"/>
		<updated>2017-06-24T00:02:31Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Terminology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to Yocto Project [[Main Page]].&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
Here is a list of basic terms users new to the Yocto Project might find helpful. For a more complete list of terms, see the &lt;br /&gt;
&amp;quot;[http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#yocto-project-terms Yocto Project Terms]&amp;quot; section in the Yocto Project Development Manual.&lt;br /&gt;
:&#039;&#039;&#039;Yocto Project&#039;&#039;&#039;: A Linux Foundation project that acts as an umbrella for various efforts to improve Embedded Linux.&lt;br /&gt;
: &#039;&#039;&#039;OpenEmbedded&#039;&#039;&#039;: The build system architecture promoted by the Yocto Project.&lt;br /&gt;
: &#039;&#039;&#039;BitBake&#039;&#039;&#039;: A tool that reads metadata and runs tasks.&lt;br /&gt;
: &#039;&#039;&#039;OpenEmbedded-Core&#039;&#039;&#039;: The common base set of metadata that BitBake uses. This metadata is shared between OpenEmbedded and the Yocto Project.&lt;br /&gt;
: &#039;&#039;&#039;Poky&#039;&#039;&#039;: A reference distribution used for test and release purposes by the Yocto Project.&lt;br /&gt;
: &#039;&#039;&#039;Recipe&#039;&#039;&#039;: Meta data defining how bitbake is to configure, build and package a software project.&lt;br /&gt;
: &#039;&#039;&#039;Layer&#039;&#039;&#039;: A collection of recipes and/or configuration used by bitbake. Typically each layer is organised around a specific theme, e.g. adding recipes for building web browser software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Major Yocto Project versions release on a six-month cycle in spring and fall/autumn. Releases tend to known by their name rather than release number.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
!Codename&lt;br /&gt;
!Version&lt;br /&gt;
!Release Date&lt;br /&gt;
|-&lt;br /&gt;
|Pyro&lt;br /&gt;
|2.3&lt;br /&gt;
|May 2017 &lt;br /&gt;
|-&lt;br /&gt;
|Morty&lt;br /&gt;
|2.2&lt;br /&gt;
|Oct 2016 &lt;br /&gt;
|-&lt;br /&gt;
|Krogoth&lt;br /&gt;
|2.1&lt;br /&gt;
|May 2016 &lt;br /&gt;
|-&lt;br /&gt;
|Jethro&lt;br /&gt;
|2.0&lt;br /&gt;
|Nov 2015&lt;br /&gt;
|-&lt;br /&gt;
|Fido&lt;br /&gt;
|1.8&lt;br /&gt;
|Apr 2015&lt;br /&gt;
|-&lt;br /&gt;
|Dizzy&lt;br /&gt;
|1.7&lt;br /&gt;
|Oct 2014&lt;br /&gt;
|-&lt;br /&gt;
|Daisy&lt;br /&gt;
|1.6&lt;br /&gt;
|Apr 2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Acronyms ==&lt;br /&gt;
:&#039;&#039;&#039;BSP&#039;&#039;&#039;	Board Support Package&lt;br /&gt;
: &#039;&#039;&#039;CCB&#039;&#039;&#039;	Change Control Board&lt;br /&gt;
: &#039;&#039;&#039;PMP&#039;&#039;&#039;	Program  Management Plan&lt;br /&gt;
: &#039;&#039;&#039;POR&#039;&#039;&#039;	Plan of Record&lt;br /&gt;
: &#039;&#039;&#039;PRD&#039;&#039;&#039;	Product Requirements Document&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28218</id>
		<title>Development Manual Rework</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28218"/>
		<updated>2017-06-23T22:29:34Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Basic &amp;quot;How To&amp;quot; Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
This page will propose an outline for [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html Development Manual] refactoring work. See also [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11630 bug #11630]&lt;br /&gt;
&lt;br /&gt;
= Henry&#039;s Input =&lt;br /&gt;
I believe the manual lost its way as it became the dumping ground for useful (and often advanced) info that had nowhere else to land. As a result the size of the manual and top level topics became overwhelming to the new developer who had just graduated from the quick state guide. Currently this user is not served by the Yocto documentation, thus the creation of the wiki [[cookbook]].  Simple tasks such as adding an existing recipe to image and creating a recipe source should be the bread and butter of the development manual. If this approach makes the development master server too many master, we should dicuss re-structing all the docs the addition of a new one.&lt;br /&gt;
&lt;br /&gt;
== Basic &amp;quot;How To&amp;quot; Topics ==&lt;br /&gt;
I plan to structure these, but just a plain list for the time being. Many of these topics are already documented, but this feels like a better flow that we have just now. &lt;br /&gt;
=== Basic Skills for Systems Developers ===&lt;br /&gt;
* Deal with corporate proxies. &lt;br /&gt;
* Add a package to an image&lt;br /&gt;
* Understand the difference between a recipe and package&lt;br /&gt;
* Build a package by itself and why that&#039;s useful&lt;br /&gt;
* Find out what packages are created by a recipe&lt;br /&gt;
* Find out what files are in a package&lt;br /&gt;
* Find out what files are in an image&lt;br /&gt;
* Add an ssh server to an image (enable transferring of files to target)&lt;br /&gt;
* Anatomy of a recipe&lt;br /&gt;
* How to find recipes (layers.openembedded,org)&lt;br /&gt;
* Understand difference between machine and distro settings&lt;br /&gt;
* How to find and use the right BSP (machine) for your hardware&lt;br /&gt;
* Examples of distro features and where to set them.&lt;br /&gt;
* Understanding the task pipeline and executing individual tasks&lt;br /&gt;
* Understand devtool and how it simplifies your workflow&lt;br /&gt;
* Improve build speeds with shared downloads and shared state cache&lt;br /&gt;
* Generate and understand dependency graph&lt;br /&gt;
* Generate and understand bitbake environment&lt;br /&gt;
* Building an Extensible SDK&lt;br /&gt;
=== Basic Skills for Application Developers ===&lt;br /&gt;
* Understand intent and content of extensible SDK (eSDK) and why traditional SDK is no longer necessary&lt;br /&gt;
* Understand CROPS eSDK container solution&lt;br /&gt;
** Source code is edited outside of container using tools of your choice on host&lt;br /&gt;
**  &lt;br /&gt;
* Install and run CROPS/eSDK&lt;br /&gt;
* Intro to devtool&lt;br /&gt;
* Make sure you&#039;re up to date&lt;br /&gt;
* Build the image (may not be the same as on your target) and typical options for flashing it&lt;br /&gt;
* Modify an existing recipe &lt;br /&gt;
** Understand how git is managing source code&lt;br /&gt;
** Build and deploy modified recipe&lt;br /&gt;
** Using devtool finish to create updated recipe and patches.&lt;br /&gt;
** Understand how this is done without updating upstream source code&lt;br /&gt;
* Add a new recipe&lt;br /&gt;
** Create recipe from source code&lt;br /&gt;
** Review recipe to see what&#039;s missing&lt;br /&gt;
** Repeat steps as for &#039;modify&#039;&lt;br /&gt;
&lt;br /&gt;
= Tracey&#039;s Input =&lt;br /&gt;
The way Henry described this yesterday, customers use the &amp;quot;getting started&amp;quot; guide to learn how to bring up a vanilla image, but then don&#039;t know how to approach their own custom situation.  This should be a TRANSITION DOCUMENT - how to use YP once you have gotten your feet wet in a controlled situation.  Feel free to delete this, I don&#039;t know how you folks work in the WIKI and I&#039;m assuming this may not be it.&lt;br /&gt;
&lt;br /&gt;
I would suggest organizing this in a couple of ways - and this might be better in a google doc, frankly.&lt;br /&gt;
1) by what people need to do to get started&lt;br /&gt;
   a) where to start to support a platform&lt;br /&gt;
      1. find a BSP and test it&lt;br /&gt;
   b) how to add support for platform components&lt;br /&gt;
   c) how to slim down an image size&lt;br /&gt;
      1. Remove code automatically included&lt;br /&gt;
      2. design your own BSP fine tuned to exclude extra code, unneeded support code&lt;br /&gt;
   d) How to approach setting up a development environment&lt;br /&gt;
   e) How use layers to create a flexible long term design, and recipes&lt;br /&gt;
   d) How do you start a new project vs build off an existing one   &lt;br /&gt;
   e) How do you set up a team sharable development environment (sstate)&lt;br /&gt;
   f) Here are some of the most common commands &lt;br /&gt;
   g) How to deal with CVEs and code branches&lt;br /&gt;
&lt;br /&gt;
2) By helping them collect the information they need in order to make set up decisions&lt;br /&gt;
Brent had a great idea to make this a SW Wizard that would step a new user through a series of questions and give them at least one solution on how to proceed.&lt;br /&gt;
   a) what platform are you using&lt;br /&gt;
   b) will you include an application as part of the image or will it run on the image&lt;br /&gt;
   c) what is the configuration of the team (system developers, app developers, etc)&lt;br /&gt;
   c) How to help them choose the right kernel&lt;br /&gt;
   d) etc.&lt;br /&gt;
&lt;br /&gt;
= Scott&#039;s Input =&lt;br /&gt;
&lt;br /&gt;
Scott Rifenbark - This is a good idea.  I was thinking of a similar way to deal with this with sort of a decision tree at the end of the YP Quick Start (flowchart for old-schoolers) that would lead the reader down a path based on information they have about what they want to get accomplished.  Then, based on how they traverse the tree, we point them to areas they need to use in the manual.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 1 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
I re-wrote this introductory section to work more tightly with the introductory material of the ref-manual.  Also, created a better &amp;quot;Other Information&amp;quot; section to lead the reader to various places of interest.  In particular, I am leveraging off the Yocto Project Backgrounders that exist on the YP Website.  These backgrounders are probably the best place for an overall introduction to what the YP is supposed to be and do for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 3 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This chapter was mostly reference material. The entire chapter has been converted now to procedures by pulling out the reference stuff and placing it into the ref-manual.  What is left in Chapter 3 are procedures related to setting up a shared YP development environment, submitting a defect, and submitting a change.   &lt;br /&gt;
&lt;br /&gt;
=== Section 3.1 - &amp;quot;Open Source Philosophy&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual.  It now is in a chapter called &amp;quot;The Yocto Project Development Environment&amp;quot;.  That new chapter in the ref-manual is really the old &amp;quot;Closer Look&amp;quot; chapter now with some YP development environment concepts placed on top in their own subsections.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.2 - &amp;quot;Using the Yocto Project in a Team Environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have converted this section to a procedure.  I need more information on this section from the team.  Emails are out soliciting input.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.3 - &amp;quot;Source Repositories&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot; section.  No procedures here except perhaps &amp;quot;Locating the Yocto Project Source Repositories&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.4 - &amp;quot;Terms&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual into the &amp;quot;Introduction&amp;quot; chapter.  All links throughout the YP Documentation Manual set have been adjusted to work for the new location.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.5 - &amp;quot;Licensing&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot;.  There are no possibilities of procedures in this section.  It is pure reference material.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.6 - &amp;quot;Git&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The concepts and overview of how Git works is best suited for the ref-manual.  I moved the concepts of Git to the ref-manual.  In doing so, I decided to keep the two small examples in that section there just for completeness.  However, I created a new section in the dev-manual called &amp;quot;Working With Git Repositories&amp;quot; that has pointed procedures that show the reader how to clone poky, check out a branch based on a poky branch name, and check out a branch based on a poky tag.  Right now in the &amp;quot;Getting Set Up&amp;quot; section but will likely be moved as the new dev-manual gains more procedures.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.7 - &amp;quot;Workflows&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have moved this section to &amp;quot;The Yocto Project Development Environment&amp;quot; section in the ref-manual.  The section is concepts only.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.8 - &amp;quot;Submitting a Defect Against the Yocto Project&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have reworked this section and it is done.  It will live in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.9 - &amp;quot;How to Submit a Change&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have re-worked this section into a couple of procedures.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 4 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This whole section is about various workflows.  The information is a mix of concepts, high-level workflow steps, and various details associated with the flows.  I think the entire chapter can pretty much be recast in some conceptual area of the ref-manual.  Then, for each type of workflow, we can create a specific task that has some meaningful steps and real examples for use in the dev-manual.  These sections in the dev-manual can be referenced from the associated concepts in the ref-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1 - &amp;quot;System Development Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Introductory material that will live with the subsections for concepts (in the ref-manual) or introductory area for grouped tasks in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.1 - &amp;quot;Developing a Board Support Package (BSP)&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Although the steps in this section are technically procedural, the level is more conceptual.  We should move this discussion to the ref-manual and group it under some sort of new &amp;quot;concepts&amp;quot; heading where conceptual information is discussed.  That is one idea.  Another, is to create a conceptual section in the BSP Guide to hold this information.  One thing we have not discussed is the fate of the BSP Guide in regards to the restructuring of the dev-manual to a task-based document.  In any case, the current &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section in the dev-manual is out as it stands now.  If we want to replace it in the dev-manual with something more concrete, then I suggest a real example that would be in the form of what is on this dated wiki page - https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.2 - &amp;quot;Modifying the Kernel&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The information in this section is very conceptual and does not belong in the dev-manual.  Solution for this section is similar to what I suggested for the &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section above.  However, this is kernel related so perhaps moving this kernel information to the kernel-dev manual.  Again, if we want to have some concrete example in the dev-manual that is based on the conceptual information here, then we create a real example and use that and tie it to specific tasks.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.2 - &amp;quot;Application Development Workflow using and SDK&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section can go away I think.  We have the SDK manual and all it is here in the sdk-manual is a pointer to that manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3 - &amp;quot;Modifying Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section is conceptual by nature.  Again, high-level procedures to support the concepts but I don&#039;t think they should be in the dev-manual.  Both devtool and Quilt are covered in this section, and both regarding workflows designed to help the user modify source code.  The actual need for this introductory stuff in 4.3 depends on really where the devtool and Quilt sections ultimately reside.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.1 - &amp;quot;Using devtool in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual.  Right now, this material is virtually duplicated in the sdk-manual.  It should be one area and then any SDK-specific stuff can be captured in the sdk-manual.  The section to put this in in the ref-manual would be under a &amp;quot;Concepts&amp;quot; heading and then maybe under something like &amp;quot;Workflows&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.2 - &amp;quot;Using Quilt in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual in a new &amp;quot;Workflows&amp;quot; section bundled under some concepts heading.  I can see creating an actual example that works and using it as a section in the dev-manual.  The conceptual version from the ref-manual can reference into that example.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.3 - &amp;quot;Finding Temporary Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section is where it is was to support the Quilt workflow.  If &amp;quot;Finding your Source Code&amp;quot; is a separate enough task to be in the dev-manual, then we can create a set of steps to walk a user through that give creation of some piece of software and maybe a kernel build. They seem to be different based on what you are building unless I am mis-understanding it.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.4 - &amp;quot;Image Development Using Toaster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section exists is it was a development workflow and bundled in this overarching section.  It is pretty much a placeholder and could be removed.  There are ample areas where we can mention Toaster as a way of developing an image and then linking to the Toaster manual.  If we have a workflow concepts section in the ref-manual, it can be mentioned there as a type of workflow.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.5 - &amp;quot;Using a Development Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is another development workflow.  We could have a conceptual description in the appropriate area of the ref-manual that would point back to a specific example that is task-based in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.6 - &amp;quot;Using a Development Python Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is the final development workflow section.  Same stuff applies here as explained in the &amp;quot;Using a Development Shell&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28217</id>
		<title>Development Manual Rework</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28217"/>
		<updated>2017-06-23T22:27:58Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Basic Skills for Application Developers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
This page will propose an outline for [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html Development Manual] refactoring work. See also [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11630 bug #11630]&lt;br /&gt;
&lt;br /&gt;
= Henry&#039;s Input =&lt;br /&gt;
I believe the manual lost its way as it became the dumping ground for useful (and often advanced) info that had nowhere else to land. As a result the size of the manual and top level topics became overwhelming to the new developer who had just graduated from the quick state guide. Currently this user is not served by the Yocto documentation, thus the creation of the wiki [[cookbook]].  Simple tasks such as adding an existing recipe to image and creating a recipe source should be the bread and butter of the development manual. If this approach makes the development master server too many master, we should dicuss re-structing all the docs the addition of a new one.&lt;br /&gt;
&lt;br /&gt;
== Basic &amp;quot;How To&amp;quot; Topics ==&lt;br /&gt;
I plan to structure these, but just a plain list for the time being&lt;br /&gt;
=== Basic Skills for Systems Developers ===&lt;br /&gt;
* Deal with corporate proxies. &lt;br /&gt;
* Add a package to an image&lt;br /&gt;
* Understand the difference between a recipe and package&lt;br /&gt;
* Build a package by itself and why that&#039;s useful&lt;br /&gt;
* Find out what packages are created by a recipe&lt;br /&gt;
* Find out what files are in a package&lt;br /&gt;
* Find out what files are in an image&lt;br /&gt;
* Add an ssh server to an image (enable transferring of files to target)&lt;br /&gt;
* Anatomy of a recipe&lt;br /&gt;
* How to find recipes (layers.openembedded,org)&lt;br /&gt;
* Understand difference between machine and distro settings&lt;br /&gt;
* How to find and use the right BSP (machine) for your hardware&lt;br /&gt;
* Examples of distro features and where to set them.&lt;br /&gt;
* Understanding the task pipeline and executing individual tasks&lt;br /&gt;
* Understand devtool and how it simplifies your workflow&lt;br /&gt;
* Improve build speeds with shared downloads and shared state cache&lt;br /&gt;
* Generate and understand dependency graph&lt;br /&gt;
* Generate and understand bitbake environment&lt;br /&gt;
* Building an Extensible SDK&lt;br /&gt;
=== Basic Skills for Application Developers ===&lt;br /&gt;
* Understand intent and content of extensible SDK (eSDK) and why traditional SDK is no longer necessary&lt;br /&gt;
* Understand CROPS eSDK container solution&lt;br /&gt;
** Source code is edited outside of container using tools of your choice on host&lt;br /&gt;
**  &lt;br /&gt;
* Install and run CROPS/eSDK&lt;br /&gt;
* Intro to devtool&lt;br /&gt;
* Make sure you&#039;re up to date&lt;br /&gt;
* Build the image (may not be the same as on your target) and typical options for flashing it&lt;br /&gt;
* Modify an existing recipe &lt;br /&gt;
** Understand how git is managing source code&lt;br /&gt;
** Build and deploy modified recipe&lt;br /&gt;
** Using devtool finish to create updated recipe and patches.&lt;br /&gt;
** Understand how this is done without updating upstream source code&lt;br /&gt;
* Add a new recipe&lt;br /&gt;
** Create recipe from source code&lt;br /&gt;
** Review recipe to see what&#039;s missing&lt;br /&gt;
** Repeat steps as for &#039;modify&#039;&lt;br /&gt;
&lt;br /&gt;
= Tracey&#039;s Input =&lt;br /&gt;
The way Henry described this yesterday, customers use the &amp;quot;getting started&amp;quot; guide to learn how to bring up a vanilla image, but then don&#039;t know how to approach their own custom situation.  This should be a TRANSITION DOCUMENT - how to use YP once you have gotten your feet wet in a controlled situation.  Feel free to delete this, I don&#039;t know how you folks work in the WIKI and I&#039;m assuming this may not be it.&lt;br /&gt;
&lt;br /&gt;
I would suggest organizing this in a couple of ways - and this might be better in a google doc, frankly.&lt;br /&gt;
1) by what people need to do to get started&lt;br /&gt;
   a) where to start to support a platform&lt;br /&gt;
      1. find a BSP and test it&lt;br /&gt;
   b) how to add support for platform components&lt;br /&gt;
   c) how to slim down an image size&lt;br /&gt;
      1. Remove code automatically included&lt;br /&gt;
      2. design your own BSP fine tuned to exclude extra code, unneeded support code&lt;br /&gt;
   d) How to approach setting up a development environment&lt;br /&gt;
   e) How use layers to create a flexible long term design, and recipes&lt;br /&gt;
   d) How do you start a new project vs build off an existing one   &lt;br /&gt;
   e) How do you set up a team sharable development environment (sstate)&lt;br /&gt;
   f) Here are some of the most common commands &lt;br /&gt;
   g) How to deal with CVEs and code branches&lt;br /&gt;
&lt;br /&gt;
2) By helping them collect the information they need in order to make set up decisions&lt;br /&gt;
Brent had a great idea to make this a SW Wizard that would step a new user through a series of questions and give them at least one solution on how to proceed.&lt;br /&gt;
   a) what platform are you using&lt;br /&gt;
   b) will you include an application as part of the image or will it run on the image&lt;br /&gt;
   c) what is the configuration of the team (system developers, app developers, etc)&lt;br /&gt;
   c) How to help them choose the right kernel&lt;br /&gt;
   d) etc.&lt;br /&gt;
&lt;br /&gt;
= Scott&#039;s Input =&lt;br /&gt;
&lt;br /&gt;
Scott Rifenbark - This is a good idea.  I was thinking of a similar way to deal with this with sort of a decision tree at the end of the YP Quick Start (flowchart for old-schoolers) that would lead the reader down a path based on information they have about what they want to get accomplished.  Then, based on how they traverse the tree, we point them to areas they need to use in the manual.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 1 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
I re-wrote this introductory section to work more tightly with the introductory material of the ref-manual.  Also, created a better &amp;quot;Other Information&amp;quot; section to lead the reader to various places of interest.  In particular, I am leveraging off the Yocto Project Backgrounders that exist on the YP Website.  These backgrounders are probably the best place for an overall introduction to what the YP is supposed to be and do for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 3 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This chapter was mostly reference material. The entire chapter has been converted now to procedures by pulling out the reference stuff and placing it into the ref-manual.  What is left in Chapter 3 are procedures related to setting up a shared YP development environment, submitting a defect, and submitting a change.   &lt;br /&gt;
&lt;br /&gt;
=== Section 3.1 - &amp;quot;Open Source Philosophy&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual.  It now is in a chapter called &amp;quot;The Yocto Project Development Environment&amp;quot;.  That new chapter in the ref-manual is really the old &amp;quot;Closer Look&amp;quot; chapter now with some YP development environment concepts placed on top in their own subsections.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.2 - &amp;quot;Using the Yocto Project in a Team Environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have converted this section to a procedure.  I need more information on this section from the team.  Emails are out soliciting input.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.3 - &amp;quot;Source Repositories&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot; section.  No procedures here except perhaps &amp;quot;Locating the Yocto Project Source Repositories&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.4 - &amp;quot;Terms&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual into the &amp;quot;Introduction&amp;quot; chapter.  All links throughout the YP Documentation Manual set have been adjusted to work for the new location.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.5 - &amp;quot;Licensing&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot;.  There are no possibilities of procedures in this section.  It is pure reference material.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.6 - &amp;quot;Git&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The concepts and overview of how Git works is best suited for the ref-manual.  I moved the concepts of Git to the ref-manual.  In doing so, I decided to keep the two small examples in that section there just for completeness.  However, I created a new section in the dev-manual called &amp;quot;Working With Git Repositories&amp;quot; that has pointed procedures that show the reader how to clone poky, check out a branch based on a poky branch name, and check out a branch based on a poky tag.  Right now in the &amp;quot;Getting Set Up&amp;quot; section but will likely be moved as the new dev-manual gains more procedures.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.7 - &amp;quot;Workflows&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have moved this section to &amp;quot;The Yocto Project Development Environment&amp;quot; section in the ref-manual.  The section is concepts only.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.8 - &amp;quot;Submitting a Defect Against the Yocto Project&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have reworked this section and it is done.  It will live in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.9 - &amp;quot;How to Submit a Change&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have re-worked this section into a couple of procedures.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 4 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This whole section is about various workflows.  The information is a mix of concepts, high-level workflow steps, and various details associated with the flows.  I think the entire chapter can pretty much be recast in some conceptual area of the ref-manual.  Then, for each type of workflow, we can create a specific task that has some meaningful steps and real examples for use in the dev-manual.  These sections in the dev-manual can be referenced from the associated concepts in the ref-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1 - &amp;quot;System Development Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Introductory material that will live with the subsections for concepts (in the ref-manual) or introductory area for grouped tasks in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.1 - &amp;quot;Developing a Board Support Package (BSP)&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Although the steps in this section are technically procedural, the level is more conceptual.  We should move this discussion to the ref-manual and group it under some sort of new &amp;quot;concepts&amp;quot; heading where conceptual information is discussed.  That is one idea.  Another, is to create a conceptual section in the BSP Guide to hold this information.  One thing we have not discussed is the fate of the BSP Guide in regards to the restructuring of the dev-manual to a task-based document.  In any case, the current &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section in the dev-manual is out as it stands now.  If we want to replace it in the dev-manual with something more concrete, then I suggest a real example that would be in the form of what is on this dated wiki page - https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.2 - &amp;quot;Modifying the Kernel&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The information in this section is very conceptual and does not belong in the dev-manual.  Solution for this section is similar to what I suggested for the &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section above.  However, this is kernel related so perhaps moving this kernel information to the kernel-dev manual.  Again, if we want to have some concrete example in the dev-manual that is based on the conceptual information here, then we create a real example and use that and tie it to specific tasks.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.2 - &amp;quot;Application Development Workflow using and SDK&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section can go away I think.  We have the SDK manual and all it is here in the sdk-manual is a pointer to that manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3 - &amp;quot;Modifying Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section is conceptual by nature.  Again, high-level procedures to support the concepts but I don&#039;t think they should be in the dev-manual.  Both devtool and Quilt are covered in this section, and both regarding workflows designed to help the user modify source code.  The actual need for this introductory stuff in 4.3 depends on really where the devtool and Quilt sections ultimately reside.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.1 - &amp;quot;Using devtool in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual.  Right now, this material is virtually duplicated in the sdk-manual.  It should be one area and then any SDK-specific stuff can be captured in the sdk-manual.  The section to put this in in the ref-manual would be under a &amp;quot;Concepts&amp;quot; heading and then maybe under something like &amp;quot;Workflows&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.2 - &amp;quot;Using Quilt in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual in a new &amp;quot;Workflows&amp;quot; section bundled under some concepts heading.  I can see creating an actual example that works and using it as a section in the dev-manual.  The conceptual version from the ref-manual can reference into that example.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.3 - &amp;quot;Finding Temporary Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section is where it is was to support the Quilt workflow.  If &amp;quot;Finding your Source Code&amp;quot; is a separate enough task to be in the dev-manual, then we can create a set of steps to walk a user through that give creation of some piece of software and maybe a kernel build. They seem to be different based on what you are building unless I am mis-understanding it.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.4 - &amp;quot;Image Development Using Toaster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section exists is it was a development workflow and bundled in this overarching section.  It is pretty much a placeholder and could be removed.  There are ample areas where we can mention Toaster as a way of developing an image and then linking to the Toaster manual.  If we have a workflow concepts section in the ref-manual, it can be mentioned there as a type of workflow.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.5 - &amp;quot;Using a Development Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is another development workflow.  We could have a conceptual description in the appropriate area of the ref-manual that would point back to a specific example that is task-based in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.6 - &amp;quot;Using a Development Python Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is the final development workflow section.  Same stuff applies here as explained in the &amp;quot;Using a Development Shell&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28214</id>
		<title>Development Manual Rework</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28214"/>
		<updated>2017-06-23T22:01:54Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Basic &amp;quot;How To&amp;quot; Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
This page will propose an outline for [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html Development Manual] refactoring work. See also [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11630 bug #11630]&lt;br /&gt;
&lt;br /&gt;
= Henry&#039;s Input =&lt;br /&gt;
I believe the manual lost its way as it became the dumping ground for useful (and often advanced) info that had nowhere else to land. As a result the size of the manual and top level topics became overwhelming to the new developer who had just graduated from the quick state guide. Currently this user is not served by the Yocto documentation, thus the creation of the wiki [[cookbook]].  Simple tasks such as adding an existing recipe to image and creating a recipe source should be the bread and butter of the development manual. If this approach makes the development master server too many master, we should dicuss re-structing all the docs the addition of a new one.&lt;br /&gt;
&lt;br /&gt;
== Basic &amp;quot;How To&amp;quot; Topics ==&lt;br /&gt;
I plan to structure these, but just a plain list for the time being&lt;br /&gt;
=== Basic Skills for Systems Developers ===&lt;br /&gt;
* Deal with corporate proxies. &lt;br /&gt;
* Add a package to an image&lt;br /&gt;
* Understand the difference between a recipe and package&lt;br /&gt;
* Build a package by itself and why that&#039;s useful&lt;br /&gt;
* Find out what packages are created by a recipe&lt;br /&gt;
* Find out what files are in a package&lt;br /&gt;
* Find out what files are in an image&lt;br /&gt;
* Add an ssh server to an image (enable transferring of files to target)&lt;br /&gt;
* Anatomy of a recipe&lt;br /&gt;
* How to find recipes (layers.openembedded,org)&lt;br /&gt;
* Understand difference between machine and distro settings&lt;br /&gt;
* How to find and use the right BSP (machine) for your hardware&lt;br /&gt;
* Examples of distro features and where to set them.&lt;br /&gt;
* Understanding the task pipeline and executing individual tasks&lt;br /&gt;
* Understand devtool and how it simplifies your workflow&lt;br /&gt;
* Improve build speeds with shared downloads and shared state cache&lt;br /&gt;
* Generate and understand dependency graph&lt;br /&gt;
* Generate and understand bitbake environment&lt;br /&gt;
* Building an Extensible SDK&lt;br /&gt;
=== Basic Skills for Application Developers ===&lt;br /&gt;
&lt;br /&gt;
= Tracey&#039;s Input =&lt;br /&gt;
The way Henry described this yesterday, customers use the &amp;quot;getting started&amp;quot; guide to learn how to bring up a vanilla image, but then don&#039;t know how to approach their own custom situation.  This should be a TRANSITION DOCUMENT - how to use YP once you have gotten your feet wet in a controlled situation.  Feel free to delete this, I don&#039;t know how you folks work in the WIKI and I&#039;m assuming this may not be it.&lt;br /&gt;
&lt;br /&gt;
I would suggest organizing this in a couple of ways - and this might be better in a google doc, frankly.&lt;br /&gt;
1) by what people need to do to get started&lt;br /&gt;
   a) where to start to support a platform&lt;br /&gt;
      1. find a BSP and test it&lt;br /&gt;
   b) how to add support for platform components&lt;br /&gt;
   c) how to slim down an image size&lt;br /&gt;
      1. Remove code automatically included&lt;br /&gt;
      2. design your own BSP fine tuned to exclude extra code, unneeded support code&lt;br /&gt;
   d) How to approach setting up a development environment&lt;br /&gt;
   e) How use layers to create a flexible long term design, and recipes&lt;br /&gt;
   d) How do you start a new project vs build off an existing one   &lt;br /&gt;
   e) How do you set up a team sharable development environment (sstate)&lt;br /&gt;
   f) Here are some of the most common commands &lt;br /&gt;
   g) How to deal with CVEs and code branches&lt;br /&gt;
&lt;br /&gt;
2) By helping them collect the information they need in order to make set up decisions&lt;br /&gt;
Brent had a great idea to make this a SW Wizard that would step a new user through a series of questions and give them at least one solution on how to proceed.&lt;br /&gt;
   a) what platform are you using&lt;br /&gt;
   b) will you include an application as part of the image or will it run on the image&lt;br /&gt;
   c) what is the configuration of the team (system developers, app developers, etc)&lt;br /&gt;
   c) How to help them choose the right kernel&lt;br /&gt;
   d) etc.&lt;br /&gt;
&lt;br /&gt;
= Scott&#039;s Input =&lt;br /&gt;
&lt;br /&gt;
Scott Rifenbark - This is a good idea.  I was thinking of a similar way to deal with this with sort of a decision tree at the end of the YP Quick Start (flowchart for old-schoolers) that would lead the reader down a path based on information they have about what they want to get accomplished.  Then, based on how they traverse the tree, we point them to areas they need to use in the manual.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 1 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
I re-wrote this introductory section to work more tightly with the introductory material of the ref-manual.  Also, created a better &amp;quot;Other Information&amp;quot; section to lead the reader to various places of interest.  In particular, I am leveraging off the Yocto Project Backgrounders that exist on the YP Website.  These backgrounders are probably the best place for an overall introduction to what the YP is supposed to be and do for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 3 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This chapter was mostly reference material. The entire chapter has been converted now to procedures by pulling out the reference stuff and placing it into the ref-manual.  What is left in Chapter 3 are procedures related to setting up a shared YP development environment, submitting a defect, and submitting a change.   &lt;br /&gt;
&lt;br /&gt;
=== Section 3.1 - &amp;quot;Open Source Philosophy&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual.  It now is in a chapter called &amp;quot;The Yocto Project Development Environment&amp;quot;.  That new chapter in the ref-manual is really the old &amp;quot;Closer Look&amp;quot; chapter now with some YP development environment concepts placed on top in their own subsections.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.2 - &amp;quot;Using the Yocto Project in a Team Environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have converted this section to a procedure.  I need more information on this section from the team.  Emails are out soliciting input.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.3 - &amp;quot;Source Repositories&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot; section.  No procedures here except perhaps &amp;quot;Locating the Yocto Project Source Repositories&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.4 - &amp;quot;Terms&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual into the &amp;quot;Introduction&amp;quot; chapter.  All links throughout the YP Documentation Manual set have been adjusted to work for the new location.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.5 - &amp;quot;Licensing&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot;.  There are no possibilities of procedures in this section.  It is pure reference material.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.6 - &amp;quot;Git&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The concepts and overview of how Git works is best suited for the ref-manual.  I moved the concepts of Git to the ref-manual.  In doing so, I decided to keep the two small examples in that section there just for completeness.  However, I created a new section in the dev-manual called &amp;quot;Working With Git Repositories&amp;quot; that has pointed procedures that show the reader how to clone poky, check out a branch based on a poky branch name, and check out a branch based on a poky tag.  Right now in the &amp;quot;Getting Set Up&amp;quot; section but will likely be moved as the new dev-manual gains more procedures.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.7 - &amp;quot;Workflows&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have moved this section to &amp;quot;The Yocto Project Development Environment&amp;quot; section in the ref-manual.  The section is concepts only.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.8 - &amp;quot;Submitting a Defect Against the Yocto Project&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have reworked this section and it is done.  It will live in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.9 - &amp;quot;How to Submit a Change&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have re-worked this section into a couple of procedures.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 4 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This whole section is about various workflows.  The information is a mix of concepts, high-level workflow steps, and various details associated with the flows.  I think the entire chapter can pretty much be recast in some conceptual area of the ref-manual.  Then, for each type of workflow, we can create a specific task that has some meaningful steps and real examples for use in the dev-manual.  These sections in the dev-manual can be referenced from the associated concepts in the ref-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1 - &amp;quot;System Development Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Introductory material that will live with the subsections for concepts (in the ref-manual) or introductory area for grouped tasks in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.1 - &amp;quot;Developing a Board Support Package (BSP)&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Although the steps in this section are technically procedural, the level is more conceptual.  We should move this discussion to the ref-manual and group it under some sort of new &amp;quot;concepts&amp;quot; heading where conceptual information is discussed.  That is one idea.  Another, is to create a conceptual section in the BSP Guide to hold this information.  One thing we have not discussed is the fate of the BSP Guide in regards to the restructuring of the dev-manual to a task-based document.  In any case, the current &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section in the dev-manual is out as it stands now.  If we want to replace it in the dev-manual with something more concrete, then I suggest a real example that would be in the form of what is on this dated wiki page - https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.2 - &amp;quot;Modifying the Kernel&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The information in this section is very conceptual and does not belong in the dev-manual.  Solution for this section is similar to what I suggested for the &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section above.  However, this is kernel related so perhaps moving this kernel information to the kernel-dev manual.  Again, if we want to have some concrete example in the dev-manual that is based on the conceptual information here, then we create a real example and use that and tie it to specific tasks.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.2 - &amp;quot;Application Development Workflow using and SDK&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section can go away I think.  We have the SDK manual and all it is here in the sdk-manual is a pointer to that manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3 - &amp;quot;Modifying Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section is conceptual by nature.  Again, high-level procedures to support the concepts but I don&#039;t think they should be in the dev-manual.  Both devtool and Quilt are covered in this section, and both regarding workflows designed to help the user modify source code.  The actual need for this introductory stuff in 4.3 depends on really where the devtool and Quilt sections ultimately reside.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.1 - &amp;quot;Using devtool in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual.  Right now, this material is virtually duplicated in the sdk-manual.  It should be one area and then any SDK-specific stuff can be captured in the sdk-manual.  The section to put this in in the ref-manual would be under a &amp;quot;Concepts&amp;quot; heading and then maybe under something like &amp;quot;Workflows&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.2 - &amp;quot;Using Quilt in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual in a new &amp;quot;Workflows&amp;quot; section bundled under some concepts heading.  I can see creating an actual example that works and using it as a section in the dev-manual.  The conceptual version from the ref-manual can reference into that example.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.3 - &amp;quot;Finding Temporary Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section is where it is was to support the Quilt workflow.  If &amp;quot;Finding your Source Code&amp;quot; is a separate enough task to be in the dev-manual, then we can create a set of steps to walk a user through that give creation of some piece of software and maybe a kernel build. They seem to be different based on what you are building unless I am mis-understanding it.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.4 - &amp;quot;Image Development Using Toaster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section exists is it was a development workflow and bundled in this overarching section.  It is pretty much a placeholder and could be removed.  There are ample areas where we can mention Toaster as a way of developing an image and then linking to the Toaster manual.  If we have a workflow concepts section in the ref-manual, it can be mentioned there as a type of workflow.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.5 - &amp;quot;Using a Development Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is another development workflow.  We could have a conceptual description in the appropriate area of the ref-manual that would point back to a specific example that is task-based in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.6 - &amp;quot;Using a Development Python Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is the final development workflow section.  Same stuff applies here as explained in the &amp;quot;Using a Development Shell&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28071</id>
		<title>Development Manual Rework</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Development_Manual_Rework&amp;diff=28071"/>
		<updated>2017-06-20T01:00:57Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
This page will propose an outline for [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html Development Manual] refactoring work. See also [https://bugzilla.yoctoproject.org/show_bug.cgi?id=11630 bug #11630]&lt;br /&gt;
&lt;br /&gt;
= Henry&#039;s Input =&lt;br /&gt;
I believe the manual lost its way as it became the dumping ground for useful (and often advanced) info that had nowhere else to land. As a result the size of the manual and top level topics became overwhelming to the new developer who had just graduated from the quick state guide. Currently this user is not served by the Yocto documentation, thus the creation of the wiki [[cookbook]].  Simple tasks such as adding an existing recipe to image and creating a recipe source should be the bread and butter of the development manual. If this approach makes the development master server too many master, we should dicuss re-structing all the docs the addition of a new one.&lt;br /&gt;
&lt;br /&gt;
== Basic &amp;quot;How To&amp;quot; Topics ==&lt;br /&gt;
I plan to structure these, but just a plain list for the time being&lt;br /&gt;
* Understand the difference between a recipe and package&lt;br /&gt;
* Add a package to an image&lt;br /&gt;
* Build a package by itself and why that&#039;s useful&lt;br /&gt;
* Find out what packages are created by a recipe&lt;br /&gt;
* Find out what files are in a package&lt;br /&gt;
* Find out what files are in an image&lt;br /&gt;
* Add an ssh server to an image (enable transferring of files to target)&lt;br /&gt;
* Deal with corporate proxies. &lt;br /&gt;
&lt;br /&gt;
More to come&lt;br /&gt;
&lt;br /&gt;
= Tracey&#039;s Input =&lt;br /&gt;
The way Henry described this yesterday, customers use the &amp;quot;getting started&amp;quot; guide to learn how to bring up a vanilla image, but then don&#039;t know how to approach their own custom situation.  This should be a TRANSITION DOCUMENT - how to use YP once you have gotten your feet wet in a controlled situation.  Feel free to delete this, I don&#039;t know how you folks work in the WIKI and I&#039;m assuming this may not be it.&lt;br /&gt;
&lt;br /&gt;
I would suggest organizing this in a couple of ways - and this might be better in a google doc, frankly.&lt;br /&gt;
1) by what people need to do to get started&lt;br /&gt;
   a) where to start to support a platform&lt;br /&gt;
      1. find a BSP and test it&lt;br /&gt;
   b) how to add support for platform components&lt;br /&gt;
   c) how to slim down an image size&lt;br /&gt;
      1. Remove code automatically included&lt;br /&gt;
      2. design your own BSP fine tuned to exclude extra code, unneeded support code&lt;br /&gt;
   d) How to approach setting up a development environment&lt;br /&gt;
   e) How use layers to create a flexible long term design, and recipes&lt;br /&gt;
   d) How do you start a new project vs build off an existing one   &lt;br /&gt;
   e) How do you set up a team sharable development environment (sstate)&lt;br /&gt;
   f) Here are some of the most common commands &lt;br /&gt;
   g) How to deal with CVEs and code branches&lt;br /&gt;
&lt;br /&gt;
2) By helping them collect the information they need in order to make set up decisions&lt;br /&gt;
Brent had a great idea to make this a SW Wizard that would step a new user through a series of questions and give them at least one solution on how to proceed.&lt;br /&gt;
   a) what platform are you using&lt;br /&gt;
   b) will you include an application as part of the image or will it run on the image&lt;br /&gt;
   c) what is the configuration of the team (system developers, app developers, etc)&lt;br /&gt;
   c) How to help them choose the right kernel&lt;br /&gt;
   d) etc.&lt;br /&gt;
&lt;br /&gt;
= Scott&#039;s Input =&lt;br /&gt;
&lt;br /&gt;
Scott Rifenbark - This is a good idea.  I was thinking of a similar way to deal with this with sort of a decision tree at the end of the YP Quick Start (flowchart for old-schoolers) that would lead the reader down a path based on information they have about what they want to get accomplished.  Then, based on how they traverse the tree, we point them to areas they need to use in the manual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 3 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This chapter is mostly reference material.  The only stuff that I am going to convert to procedures is the various subsections on how to submit a change. Ultimately, the chapter will disappear in the dev-manual as I move stuff out of it.  What does remain will be located somewhere in the dev-manual as tasks.  I am not sure just where yet. &lt;br /&gt;
&lt;br /&gt;
=== Section 3.1 - &amp;quot;Open Source Philosophy&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual.  It now is in a chapter called &amp;quot;The Yocto Project Development Environment&amp;quot;.  That new chapter in the ref-manual is really the old &amp;quot;Closer Look&amp;quot; chapter now with some YP development environment concepts placed on top in their own subsections.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.2 - &amp;quot;Using the Yocto Project in a Team Environment&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section consists of introductory information for team use and provides a bunch of tips and best practices.  I have converted this section to a procedure.  For now, you can see the first draft at http://www.yoctoproject.org/docs/scott_temp/dev-manual/dev-manual.html#usingpoky-changes-collaborate, which is in a temporary holding area where the published HTML YP documents live.  I need more information on this section from the team.  Emails are out soliciting input.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.3 - &amp;quot;Source Repositories&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot; section.  No procedures here except perhaps &amp;quot;Locating the Yocto Project Source Repositories&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.4 - &amp;quot;Terms&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has been moved to the ref-manual into the &amp;quot;Introduction&amp;quot; chapter.  All links throughout the YP Documentation Manual set have been adjusted to work for the new location.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.5 - &amp;quot;Licensing&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I moved this section to the ref-manual under &amp;quot;The Yocto Project Development Environment&amp;quot;.  There are no possibilities of procedures in this section.  It is pure reference material.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.6 - &amp;quot;Git&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The concepts and overview of how Git works is best suited for the ref-manual.  I moved the concepts of Git to the ref-manual.  In doing so, I decided to keep the two small examples in that section there just for completeness.  However, I created a new section in the dev-manual called &amp;quot;Working With Git Repositories&amp;quot; that has pointed procedures that show the reader how to clone poky, check out a branch based on a poky branch name, and check out a branch based on a poky tag.  Right now in the &amp;quot;Getting Set Up&amp;quot; section but will likely be moved as the new dev-manual gains more procedures.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.7 - &amp;quot;Workflows&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have moved this section to &amp;quot;The Yocto Project Development Environment&amp;quot; section in the ref-manual.  The section is concepts only.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.8 - &amp;quot;Submitting a Defect Against the Yocto Project&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
I have reworked this section and it is done.  It will live in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 3.9 - &amp;quot;How to Submit a Change&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section has a lot of potential for &amp;quot;how-to&amp;quot; procedures.  I think the whole section can be re-done to be a procedure that walks the reader through the process.  I can create some conceptual information that could live in the ref-manual and then have it point back to the processes here in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
== Notes for Chapter 4 of the dev-manual: ==&lt;br /&gt;
&lt;br /&gt;
This whole section is about various workflows.  The information is a mix of concepts, high-level workflow steps, and various details associated with the flows.  I think the entire chapter can pretty much be recast in some conceptual area of the ref-manual.  Then, for each type of workflow, we can create a specific task that has some meaningful steps and real examples for use in the dev-manual.  These sections in the dev-manual can be referenced from the associated concepts in the ref-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1 - &amp;quot;System Development Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Introductory material that will live with the subsections for concepts (in the ref-manual) or introductory area for grouped tasks in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.1 - &amp;quot;Developing a Board Support Package (BSP)&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Although the steps in this section are technically procedural, the level is more conceptual.  We should move this discussion to the ref-manual and group it under some sort of new &amp;quot;concepts&amp;quot; heading where conceptual information is discussed.  That is one idea.  Another, is to create a conceptual section in the BSP Guide to hold this information.  One thing we have not discussed is the fate of the BSP Guide in regards to the restructuring of the dev-manual to a task-based document.  In any case, the current &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section in the dev-manual is out as it stands now.  If we want to replace it in the dev-manual with something more concrete, then I suggest a real example that would be in the form of what is on this dated wiki page - https://wiki.yoctoproject.org/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.1.2 - &amp;quot;Modifying the Kernel&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The information in this section is very conceptual and does not belong in the dev-manual.  Solution for this section is similar to what I suggested for the &amp;quot;Developing a Board Support Package (BSP)&amp;quot; section above.  However, this is kernel related so perhaps moving this kernel information to the kernel-dev manual.  Again, if we want to have some concrete example in the dev-manual that is based on the conceptual information here, then we create a real example and use that and tie it to specific tasks.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.2 - &amp;quot;Application Development Workflow using and SDK&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section can go away I think.  We have the SDK manual and all it is here in the sdk-manual is a pointer to that manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3 - &amp;quot;Modifying Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This section is conceptual by nature.  Again, high-level procedures to support the concepts but I don&#039;t think they should be in the dev-manual.  Both devtool and Quilt are covered in this section, and both regarding workflows designed to help the user modify source code.  The actual need for this introductory stuff in 4.3 depends on really where the devtool and Quilt sections ultimately reside.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.1 - &amp;quot;Using devtool in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual.  Right now, this material is virtually duplicated in the sdk-manual.  It should be one area and then any SDK-specific stuff can be captured in the sdk-manual.  The section to put this in in the ref-manual would be under a &amp;quot;Concepts&amp;quot; heading and then maybe under something like &amp;quot;Workflows&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.2 - &amp;quot;Using Quilt in Your Workflow&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
These concepts belong in the ref-manual in a new &amp;quot;Workflows&amp;quot; section bundled under some concepts heading.  I can see creating an actual example that works and using it as a section in the dev-manual.  The conceptual version from the ref-manual can reference into that example.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.3.3 - &amp;quot;Finding Temporary Source Code&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section is where it is was to support the Quilt workflow.  If &amp;quot;Finding your Source Code&amp;quot; is a separate enough task to be in the dev-manual, then we can create a set of steps to walk a user through that give creation of some piece of software and maybe a kernel build. They seem to be different based on what you are building unless I am mis-understanding it.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.4 - &amp;quot;Image Development Using Toaster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
The reason this section exists is it was a development workflow and bundled in this overarching section.  It is pretty much a placeholder and could be removed.  There are ample areas where we can mention Toaster as a way of developing an image and then linking to the Toaster manual.  If we have a workflow concepts section in the ref-manual, it can be mentioned there as a type of workflow.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.5 - &amp;quot;Using a Development Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is another development workflow.  We could have a conceptual description in the appropriate area of the ref-manual that would point back to a specific example that is task-based in the dev-manual.&lt;br /&gt;
&lt;br /&gt;
=== Section 4.6 - &amp;quot;Using a Development Python Shell&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This is the final development workflow section.  Same stuff applies here as explained in the &amp;quot;Using a Development Shell&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Developer_Workflow_Improvements&amp;diff=28012</id>
		<title>Developer Workflow Improvements</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Developer_Workflow_Improvements&amp;diff=28012"/>
		<updated>2017-06-17T01:05:05Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Layer Maintenance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to Yocto Project [[Main Page]]&lt;br /&gt;
= Introduction =&lt;br /&gt;
The page describes how new tools such as [https://www.gitbook.com/book/dnplas/yocto-project-crops/details Cross Platform Support] (CROPS), [http://www.yoctoproject.org/docs/current/sdk-manual/sdk-manual.html#sdk-extensible-sdk-intro Extensible SDK] (eSDK), [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-modifying-source-code devtool] and [https://www.yoctoproject.org/docs/current/toaster-manual/toaster-manual.html#toaster-manual-intro Toaster] make it easier to get the best out of Yocto. To benefit from this article the reader must be comfortable with the basics of the Yocto Project (i.e. has gone through [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html Quick Start Guide] and knows how to add packages to an image).&lt;br /&gt;
&lt;br /&gt;
We envisage two distinct workflows, layer maintenance and application development.&lt;br /&gt;
&lt;br /&gt;
== Layer Maintenance ==&lt;br /&gt;
* This workflow is mainly bug fixing recipes and upgrading to never versions. Updated recipes are then submitted to layer maintainers. It also includes building images that exercise the recipes under test. &lt;br /&gt;
* Typically this is done in the distro maintainer (i.e. bitbake) environment, but the extensible SDK can be a better option as it enables an easy to configure common development environment.&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
* Poky or Toaster is used to generate a minimal eSDK installer. &lt;br /&gt;
* A developer uses resulting eSDK to create/modify an application by using devtool (iterative process). &lt;br /&gt;
* Once application is complete its recipe is added to a layer and Toaster is used to build an image that includes it&lt;br /&gt;
&lt;br /&gt;
= Workflow Vision =&lt;br /&gt;
This section calls out the workflows in more detail, describing specific use of tools in each step.&lt;br /&gt;
&lt;br /&gt;
The [[Developer Workflow Improvements#Instructions for Workflow in Current Form | set-up instructions]] at the end of this page represent the &amp;quot;what can currently be done&amp;quot; version of the workflows.&lt;br /&gt;
&lt;br /&gt;
== Build OS Image ==&lt;br /&gt;
# On OS of your choice start containerized Poky or Toaster instance. &lt;br /&gt;
# If running Poky container on Windows or Mac you must also start the samba container so that host OS has access to files in the container.&lt;br /&gt;
# Add new layers and packages as required to create OS on which applications will run&lt;br /&gt;
# Build image and validate&lt;br /&gt;
&lt;br /&gt;
== Creating Extensible SDK ==&lt;br /&gt;
# Build image as above&lt;br /&gt;
# Then build Extensible SDK&lt;br /&gt;
# Publish components required for app development&lt;br /&gt;
## eSDK installer&lt;br /&gt;
## eSDK updater files&lt;br /&gt;
## shared state&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
=== One time set-up on OS of your choice ===&lt;br /&gt;
# Create docker volume so that files fetched and created in the container are visible to host OS.&lt;br /&gt;
# Use extensible SDK container to install eSDK to volume.&lt;br /&gt;
# Development can also be done on the command line.&lt;br /&gt;
# Optionally install Eclipse and CROPS plug-in that&lt;br /&gt;
=== App development ===&lt;br /&gt;
# Start extensible SDK container so you can run devtool from command line or invoke it from Eclipse plug-in.&lt;br /&gt;
# Start samba container so that files are visible to host OS&lt;br /&gt;
# Use &#039;&#039;&#039;devtool&#039;&#039;&#039; to &#039;add&#039; application project from its URL. This pulls down source code, tries to work out dependent packages and generates a recipe&lt;br /&gt;
# Although generated recipe will likely build, it may need some tweaks to some of the tasks (e.g. configure, compile, install)&lt;br /&gt;
# Once app is building, iteratvely develop using devtool (or Eclipse) to deploy and test on target &lt;br /&gt;
# Build new image including new layer and recipe and validate&lt;br /&gt;
&lt;br /&gt;
== Layer Maintenance ==&lt;br /&gt;
# Build image as above&lt;br /&gt;
# Use &#039;&#039;&#039;devtool modify&#039;&#039;&#039; to update recipe&lt;br /&gt;
# Iterative development as per application development.&lt;br /&gt;
# Build image and validate&lt;br /&gt;
# Publish updated recipe&lt;br /&gt;
&lt;br /&gt;
= Instructions for Workflow in Current Form =&lt;br /&gt;
If you are inside a corporate firewall, install and configure the [https://github.com/crops/chameleonsocks Chameleonsocks] container based proxy solution. &lt;br /&gt;
&lt;br /&gt;
You have choice between using the Yocto Project tools on the command line with the Poky container or by using the Toaster web interface. Toaster is easier to get going but most needs more work to get the best of out interface (see section below), so these instructions will assume use of the command line.&lt;br /&gt;
&lt;br /&gt;
== Build OS image ==&lt;br /&gt;
We recommend that you first [https://github.com/crops/docker-win-mac-docs/wiki install docker] on your OS of choice and then follow instructions to set up [https://github.com/crops/poky-container/blob/master/README.md Poky] or [https://github.com/crops/toaster-container/blob/master/README.md Toaster] containers. However, these instructions will work for Poky or Toaster on Linux directly but you&#039;re on your own for installation and configuration.&lt;br /&gt;
&lt;br /&gt;
Now add layers and configure so you can build your image.&lt;br /&gt;
&lt;br /&gt;
== Build and Publish eSDK ==&lt;br /&gt;
This section is not part of the developer workflow but documents how the SDK components are generated and published. &lt;br /&gt;
This step creates a small installer that is made available to the developer. You must have access to an http server so you can publish SDK update files. &amp;lt;br/&amp;gt;&lt;br /&gt;
Building and publishing the SDK takes a number of steps. &lt;br /&gt;
=== Configure ===&lt;br /&gt;
Set the following variables in local.conf &lt;br /&gt;
:&amp;lt;tt&amp;gt;SDK_EXT_TYPE = &amp;quot;minimal&amp;quot;&amp;lt;/tt&amp;gt; ensure a minimal SDK build. This produces a small installer and enable components to de downloaded as they are installed&lt;br /&gt;
: SDK_UPDATE_URL points eSDK to URL that contains updates&lt;br /&gt;
:Optionally set &amp;lt;tt&amp;gt;SDK_INCLUDE_PKGDATA = &amp;quot;1&amp;quot;&amp;lt;/tt&amp;gt; to help eSDK users by pre-building all packages in all layers (i.e. not just packages included in the image). The installer remains small as build data is made available via sstate mirror. Downside is that eSDK build will take much longer.&lt;br /&gt;
&lt;br /&gt;
Here are some example settings&lt;br /&gt;
 SDK_EXT_TYPE = &amp;quot;minimal&amp;quot;&lt;br /&gt;
 SDK_UPDATE_URL = &amp;quot;http://my.server.com/path/to/esdk-update&amp;quot;&lt;br /&gt;
 SDK_INCLUDE_PKGDATA = &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The URL for the eSDK sstate mirror is not included in the above settings as it would conflict with the mirror used by the main build system. To handle this conflict, the value in put into a separate conf file &amp;lt;tt&amp;gt;conf/sdk-extra.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
 SSTATE_MIRRORS = &amp;quot;file://.* http://my.server.com/path/to/sstate-cache/PATH&amp;quot; &lt;br /&gt;
Note that if you are using Toasrter, you don&#039;t have access to &amp;lt;tt&amp;gt;conf/sdk-extra.conf&amp;lt;/tt&amp;gt;, so you have to set variables via the U/I. This means that Toaster cannot have an sstate mirror for the OS build and set the eSDK&#039;s as follows:&lt;br /&gt;
 SDK_LOCAL_CONF_WHITELIST = &amp;quot;SSTATE_MIRRORS&amp;quot;&lt;br /&gt;
 SSTATE_MIRRORS = &amp;quot;file://.* http://my.server.com/path/to/sstate-cache/PATH&amp;quot; &lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
Assuming image name is my-image, build as follows from command line&lt;br /&gt;
 bitbake my-image -c populate_sdk_ext&lt;br /&gt;
If using Toaster, build &amp;lt;tt&amp;gt;my-image:populate_sdk_ext&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Publish SDK Updater ===&lt;br /&gt;
The eSDK allows web updates, so you have to ensure they appeat at the URK specified by SDK_UPDATE_URL. Assuming /var/www/html/path/to is served up as http://my.server.com/path/to, publish as follows&lt;br /&gt;
 oe-publish-sdk tmp/deploy/sdk/distro-image-toolchain-ext-ver.sh /var/www/html/path/to/esdk-update&lt;br /&gt;
&lt;br /&gt;
=== Publish SSTATE ===&lt;br /&gt;
 cp -r build/sstate-cache /var/www/html/path/to/sstate-cache&lt;br /&gt;
&lt;br /&gt;
=== Publish installer ===&lt;br /&gt;
Copy installer to web server and give this URL to your app developers. &lt;br /&gt;
 cp tmp/deploy/sdk/distro-image-toolchain-ext-ver.sh /var/www/html/path/to/sdk-installer.sh&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
=== Install and Use eSDK ===&lt;br /&gt;
* This assumes you have docker already installed as per Toaster instructions. No other dependencies are required (that the beauty of containers).&lt;br /&gt;
* Create folder for esdk bind mount where output from container will appear, say /path/to/esdk/workdir&lt;br /&gt;
 mkdir /path/to/esdk/workdir&lt;br /&gt;
* Run container, pointing to URL of eSDK minimal installer. You must do this every time you want to use eSDK. In this example I&#039;m suing an eSDk installer I created that is available at  https://downloads.yoctoproject.org/tools/support/workflow/poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-2.2.sh&lt;br /&gt;
 docker run --rm -it -v /path/to/esdk-workdir:/workdir crops/extsdk-container --url https://downloads.yoctoproject.org/tools/support/workflow/poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-2.2.sh&lt;br /&gt;
If you see the error &#039;&#039;&#039;ERROR: The extensible sdk cannot be installed as root.&#039;&#039;&#039; it means that the folder /path/to/esdk-workdir does not exist&lt;br /&gt;
* You now be in the eSDK container shell. &lt;br /&gt;
** For more details on eSDK container see https://github.com/crops/extsdk-container.&lt;br /&gt;
* Now follow instructions from [https://wiki.yoctoproject.org/wiki/Cookbook:Example:Creating_and_updating_recipes_with_devtool Yocto Project cookbook] on building an app.&lt;br /&gt;
* Recipe will be available in /path/to/esdk/workdir/workspace/recipes/bbexample/&lt;br /&gt;
&lt;br /&gt;
= Missing Features =&lt;br /&gt;
These are the features currently missing from the above workflow vision. Think of these as stories in an Agile development environment, rather than bugs. Where possible these are linked to bugzilla entries.&lt;br /&gt;
* Toaster: Base configuration (e.g. define what was Ostro in single configuration file) [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9588 [9588]]&lt;br /&gt;
* Toaster: Simple generation of eSDK installer in Toaster. [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9297 [9297]]&lt;br /&gt;
* Toaster: Layer Maintenance workflow. Requires &amp;quot;local layers&amp;quot; re-design. No bugzilla entry, but see [https://www.youtube.com/watch?v=z5wVjBwJDzY design proposal video]&lt;br /&gt;
* Toaster: Publish layer to Layer Index from Toaster [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9895 [9895]]&lt;br /&gt;
* CROPS: Application builder (but running eSDK in a container gets us close). [https://bugzilla.yoctoproject.org/show_bug.cgi?id=10119 [10119]] [https://bugzilla.yoctoproject.org/show_bug.cgi?id=4209 [4209]] &lt;br /&gt;
* CROPS: Eclipse integration. &#039;&#039;In progress. No bugzilla entry.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Developer_Workflow_Improvements&amp;diff=28011</id>
		<title>Developer Workflow Improvements</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Developer_Workflow_Improvements&amp;diff=28011"/>
		<updated>2017-06-17T01:01:40Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Layer Maintenance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to Yocto Project [[Main Page]]&lt;br /&gt;
= Introduction =&lt;br /&gt;
The page describes how new tools such as [https://www.gitbook.com/book/dnplas/yocto-project-crops/details Cross Platform Support] (CROPS), [http://www.yoctoproject.org/docs/current/sdk-manual/sdk-manual.html#sdk-extensible-sdk-intro Extensible SDK] (eSDK), [http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-modifying-source-code devtool] and [https://www.yoctoproject.org/docs/current/toaster-manual/toaster-manual.html#toaster-manual-intro Toaster] make it easier to get the best out of Yocto. To benefit from this article the reader must be comfortable with the basics of the Yocto Project (i.e. has gone through [http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html Quick Start Guide] and knows how to add packages to an image).&lt;br /&gt;
&lt;br /&gt;
We envisage two distinct workflows, layer maintenance and application development.&lt;br /&gt;
&lt;br /&gt;
== Layer Maintenance ==&lt;br /&gt;
* This tasks is mainly bug fixing recipes and upgrading to never versions. It also includes building images that exercise the layers under test &lt;br /&gt;
* Typically this is done in the distro maintainer (i.e. bitbake) environment, but if no extra layers are to be added then the extensible SDK is a better option as it ensures a common development environment.&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
* Poky or Toaster is used to generate a minimal eSDK installer. &lt;br /&gt;
* A developer uses resulting eSDK to create/modify an application by using devtool (iterative process). &lt;br /&gt;
* Once application is complete its recipe is added to a layer and Toaster is used to build an image that includes it&lt;br /&gt;
&lt;br /&gt;
= Workflow Vision =&lt;br /&gt;
This section calls out the workflows in more detail, describing specific use of tools in each step.&lt;br /&gt;
&lt;br /&gt;
The [[Developer Workflow Improvements#Instructions for Workflow in Current Form | set-up instructions]] at the end of this page represent the &amp;quot;what can currently be done&amp;quot; version of the workflows.&lt;br /&gt;
&lt;br /&gt;
== Build OS Image ==&lt;br /&gt;
# On OS of your choice start containerized Poky or Toaster instance. &lt;br /&gt;
# If running Poky container on Windows or Mac you must also start the samba container so that host OS has access to files in the container.&lt;br /&gt;
# Add new layers and packages as required to create OS on which applications will run&lt;br /&gt;
# Build image and validate&lt;br /&gt;
&lt;br /&gt;
== Creating Extensible SDK ==&lt;br /&gt;
# Build image as above&lt;br /&gt;
# Then build Extensible SDK&lt;br /&gt;
# Publish components required for app development&lt;br /&gt;
## eSDK installer&lt;br /&gt;
## eSDK updater files&lt;br /&gt;
## shared state&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
=== One time set-up on OS of your choice ===&lt;br /&gt;
# Create docker volume so that files fetched and created in the container are visible to host OS.&lt;br /&gt;
# Use extensible SDK container to install eSDK to volume.&lt;br /&gt;
# Development can also be done on the command line.&lt;br /&gt;
# Optionally install Eclipse and CROPS plug-in that&lt;br /&gt;
=== App development ===&lt;br /&gt;
# Start extensible SDK container so you can run devtool from command line or invoke it from Eclipse plug-in.&lt;br /&gt;
# Start samba container so that files are visible to host OS&lt;br /&gt;
# Use &#039;&#039;&#039;devtool&#039;&#039;&#039; to &#039;add&#039; application project from its URL. This pulls down source code, tries to work out dependent packages and generates a recipe&lt;br /&gt;
# Although generated recipe will likely build, it may need some tweaks to some of the tasks (e.g. configure, compile, install)&lt;br /&gt;
# Once app is building, iteratvely develop using devtool (or Eclipse) to deploy and test on target &lt;br /&gt;
# Build new image including new layer and recipe and validate&lt;br /&gt;
&lt;br /&gt;
== Layer Maintenance ==&lt;br /&gt;
# Build image as above&lt;br /&gt;
# Use &#039;&#039;&#039;devtool modify&#039;&#039;&#039; to update recipe&lt;br /&gt;
# Iterative development as per application development.&lt;br /&gt;
# Build image and validate&lt;br /&gt;
# Publish updated recipe&lt;br /&gt;
&lt;br /&gt;
= Instructions for Workflow in Current Form =&lt;br /&gt;
If you are inside a corporate firewall, install and configure the [https://github.com/crops/chameleonsocks Chameleonsocks] container based proxy solution. &lt;br /&gt;
&lt;br /&gt;
You have choice between using the Yocto Project tools on the command line with the Poky container or by using the Toaster web interface. Toaster is easier to get going but most needs more work to get the best of out interface (see section below), so these instructions will assume use of the command line.&lt;br /&gt;
&lt;br /&gt;
== Build OS image ==&lt;br /&gt;
We recommend that you first [https://github.com/crops/docker-win-mac-docs/wiki install docker] on your OS of choice and then follow instructions to set up [https://github.com/crops/poky-container/blob/master/README.md Poky] or [https://github.com/crops/toaster-container/blob/master/README.md Toaster] containers. However, these instructions will work for Poky or Toaster on Linux directly but you&#039;re on your own for installation and configuration.&lt;br /&gt;
&lt;br /&gt;
Now add layers and configure so you can build your image.&lt;br /&gt;
&lt;br /&gt;
== Build and Publish eSDK ==&lt;br /&gt;
This section is not part of the developer workflow but documents how the SDK components are generated and published. &lt;br /&gt;
This step creates a small installer that is made available to the developer. You must have access to an http server so you can publish SDK update files. &amp;lt;br/&amp;gt;&lt;br /&gt;
Building and publishing the SDK takes a number of steps. &lt;br /&gt;
=== Configure ===&lt;br /&gt;
Set the following variables in local.conf &lt;br /&gt;
:&amp;lt;tt&amp;gt;SDK_EXT_TYPE = &amp;quot;minimal&amp;quot;&amp;lt;/tt&amp;gt; ensure a minimal SDK build. This produces a small installer and enable components to de downloaded as they are installed&lt;br /&gt;
: SDK_UPDATE_URL points eSDK to URL that contains updates&lt;br /&gt;
:Optionally set &amp;lt;tt&amp;gt;SDK_INCLUDE_PKGDATA = &amp;quot;1&amp;quot;&amp;lt;/tt&amp;gt; to help eSDK users by pre-building all packages in all layers (i.e. not just packages included in the image). The installer remains small as build data is made available via sstate mirror. Downside is that eSDK build will take much longer.&lt;br /&gt;
&lt;br /&gt;
Here are some example settings&lt;br /&gt;
 SDK_EXT_TYPE = &amp;quot;minimal&amp;quot;&lt;br /&gt;
 SDK_UPDATE_URL = &amp;quot;http://my.server.com/path/to/esdk-update&amp;quot;&lt;br /&gt;
 SDK_INCLUDE_PKGDATA = &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The URL for the eSDK sstate mirror is not included in the above settings as it would conflict with the mirror used by the main build system. To handle this conflict, the value in put into a separate conf file &amp;lt;tt&amp;gt;conf/sdk-extra.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
 SSTATE_MIRRORS = &amp;quot;file://.* http://my.server.com/path/to/sstate-cache/PATH&amp;quot; &lt;br /&gt;
Note that if you are using Toasrter, you don&#039;t have access to &amp;lt;tt&amp;gt;conf/sdk-extra.conf&amp;lt;/tt&amp;gt;, so you have to set variables via the U/I. This means that Toaster cannot have an sstate mirror for the OS build and set the eSDK&#039;s as follows:&lt;br /&gt;
 SDK_LOCAL_CONF_WHITELIST = &amp;quot;SSTATE_MIRRORS&amp;quot;&lt;br /&gt;
 SSTATE_MIRRORS = &amp;quot;file://.* http://my.server.com/path/to/sstate-cache/PATH&amp;quot; &lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
Assuming image name is my-image, build as follows from command line&lt;br /&gt;
 bitbake my-image -c populate_sdk_ext&lt;br /&gt;
If using Toaster, build &amp;lt;tt&amp;gt;my-image:populate_sdk_ext&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Publish SDK Updater ===&lt;br /&gt;
The eSDK allows web updates, so you have to ensure they appeat at the URK specified by SDK_UPDATE_URL. Assuming /var/www/html/path/to is served up as http://my.server.com/path/to, publish as follows&lt;br /&gt;
 oe-publish-sdk tmp/deploy/sdk/distro-image-toolchain-ext-ver.sh /var/www/html/path/to/esdk-update&lt;br /&gt;
&lt;br /&gt;
=== Publish SSTATE ===&lt;br /&gt;
 cp -r build/sstate-cache /var/www/html/path/to/sstate-cache&lt;br /&gt;
&lt;br /&gt;
=== Publish installer ===&lt;br /&gt;
Copy installer to web server and give this URL to your app developers. &lt;br /&gt;
 cp tmp/deploy/sdk/distro-image-toolchain-ext-ver.sh /var/www/html/path/to/sdk-installer.sh&lt;br /&gt;
&lt;br /&gt;
== Application Development ==&lt;br /&gt;
=== Install and Use eSDK ===&lt;br /&gt;
* This assumes you have docker already installed as per Toaster instructions. No other dependencies are required (that the beauty of containers).&lt;br /&gt;
* Create folder for esdk bind mount where output from container will appear, say /path/to/esdk/workdir&lt;br /&gt;
 mkdir /path/to/esdk/workdir&lt;br /&gt;
* Run container, pointing to URL of eSDK minimal installer. You must do this every time you want to use eSDK. In this example I&#039;m suing an eSDk installer I created that is available at  https://downloads.yoctoproject.org/tools/support/workflow/poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-2.2.sh&lt;br /&gt;
 docker run --rm -it -v /path/to/esdk-workdir:/workdir crops/extsdk-container --url https://downloads.yoctoproject.org/tools/support/workflow/poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-2.2.sh&lt;br /&gt;
If you see the error &#039;&#039;&#039;ERROR: The extensible sdk cannot be installed as root.&#039;&#039;&#039; it means that the folder /path/to/esdk-workdir does not exist&lt;br /&gt;
* You now be in the eSDK container shell. &lt;br /&gt;
** For more details on eSDK container see https://github.com/crops/extsdk-container.&lt;br /&gt;
* Now follow instructions from [https://wiki.yoctoproject.org/wiki/Cookbook:Example:Creating_and_updating_recipes_with_devtool Yocto Project cookbook] on building an app.&lt;br /&gt;
* Recipe will be available in /path/to/esdk/workdir/workspace/recipes/bbexample/&lt;br /&gt;
&lt;br /&gt;
= Missing Features =&lt;br /&gt;
These are the features currently missing from the above workflow vision. Think of these as stories in an Agile development environment, rather than bugs. Where possible these are linked to bugzilla entries.&lt;br /&gt;
* Toaster: Base configuration (e.g. define what was Ostro in single configuration file) [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9588 [9588]]&lt;br /&gt;
* Toaster: Simple generation of eSDK installer in Toaster. [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9297 [9297]]&lt;br /&gt;
* Toaster: Layer Maintenance workflow. Requires &amp;quot;local layers&amp;quot; re-design. No bugzilla entry, but see [https://www.youtube.com/watch?v=z5wVjBwJDzY design proposal video]&lt;br /&gt;
* Toaster: Publish layer to Layer Index from Toaster [https://bugzilla.yoctoproject.org/show_bug.cgi?id=9895 [9895]]&lt;br /&gt;
* CROPS: Application builder (but running eSDK in a container gets us close). [https://bugzilla.yoctoproject.org/show_bug.cgi?id=10119 [10119]] [https://bugzilla.yoctoproject.org/show_bug.cgi?id=4209 [4209]] &lt;br /&gt;
* CROPS: Eclipse integration. &#039;&#039;In progress. No bugzilla entry.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=27975</id>
		<title>TipsAndTricks/EnablingAPackageFeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=TipsAndTricks/EnablingAPackageFeed&amp;diff=27975"/>
		<updated>2017-06-16T07:20:29Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Caveat == &lt;br /&gt;
This article is based on work done a few years ago with fido (1.8) and only covers using smart with rpm. Needs some testing and extended to cover using dnf.&lt;br /&gt;
&lt;br /&gt;
Instructions assume you have had at least one successful build of your target image.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Format ==&lt;br /&gt;
package format is set via variable PACKAGE_CLASSES, typically in local.conf. Look for line like&lt;br /&gt;
 PACKAGE_CLASSES ?= &amp;quot;package_rpm&amp;quot;&lt;br /&gt;
This means you&#039;re using rpm.&lt;br /&gt;
&lt;br /&gt;
== Know Your Package Architectures ==&lt;br /&gt;
Your OS image will be comprised of a number of different package architectures. &lt;br /&gt;
=== From the build system view ===&lt;br /&gt;
The package feed needs to know what they are so look in tmp/deploy/rpm&lt;br /&gt;
 $ ls tmp/deploy/rpm/&lt;br /&gt;
 all  core2_32  edison  x86_64_nativesdk&lt;br /&gt;
You can exclude anything starting with x86_64. This means the  architectures on the target are: &amp;lt;tt&amp;gt;all  core2_32  edison&amp;lt;/tt&amp;gt;&lt;br /&gt;
=== From target system view ===&lt;br /&gt;
 $ rpm -qq&lt;br /&gt;
look at the endings of the various packages.  For example , if you build for qemux86-64 the suffixes will be&lt;br /&gt;
 core2_64&lt;br /&gt;
 qemux86_64&lt;br /&gt;
 all&lt;br /&gt;
so those are the architectures supported on the target.&lt;br /&gt;
&lt;br /&gt;
== Select Your Package Feed URL ==&lt;br /&gt;
Is this example we&#039;ll use &amp;lt;tt&amp;gt;http://my-server.com/repo&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add Package Manager to Build ==&lt;br /&gt;
Smart package manager is in oe-core, so there is no need to add any extra layers. You do, however need to tell the build system to include pkg management on the target, since excluding package management saves space, it is not enabled by default.&lt;br /&gt;
&lt;br /&gt;
 EXTRA_IMAGE_FEATURES += &amp;quot; package-management &amp;quot;&lt;br /&gt;
&lt;br /&gt;
On releases prior to jethro, you *may* need to also do&lt;br /&gt;
 IMAGE_INSTALL_append=&amp;quot; python-smartrpm &amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Configure Package Feed in Build ==&lt;br /&gt;
Now you have the information to create a package feed, ideally you add details in your distro conf file. If you are not using your own distro, you can set the following in local.conf. Note, if you only want to configure your channels on the target and not have any defaults, these definitions can be excluded.&lt;br /&gt;
 PACKAGE_FEED_URIS = &amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_BASE_PATHS = &amp;quot;rpm&amp;quot;&lt;br /&gt;
 PACKAGE_FEED_ARCHS = &amp;quot;all edison core2_32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Create Package Feed ==&lt;br /&gt;
* Re-build image so it includes smart and the package feed info&lt;br /&gt;
** Also, if you find you need an additional recipe not included in the image e.g. gawk, you can do bitbake gawk and it&#039;s packages will be available too.&lt;br /&gt;
*** this can be done iteratively &lt;br /&gt;
* Update repo package indices (this step can be excluded in later versions of Yocto)&lt;br /&gt;
 bitbake package-index&lt;br /&gt;
* Copy packages to server. This sample script assumes files are served from /var/www/html/repo&lt;br /&gt;
** We exclude x86_64 as those are host side (aka native) rpms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsync -r -u --exclude &#039;x86_64*&#039; tmp/deploy/rpm/* /var/www/html/repo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Run Package Manager on Target ==&lt;br /&gt;
* Make sure network is up and sync with package feed.&lt;br /&gt;
 smart update&lt;br /&gt;
* Install my-package&lt;br /&gt;
 smart search my-package&lt;br /&gt;
 smart install my-package&lt;br /&gt;
&lt;br /&gt;
== Recover Package Feed Config On Target ==&lt;br /&gt;
Smart does not have a config file, so config must be done via command line. This script re-creates the config set by distro in example above&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
feed_url=&amp;quot;http://my-server.com/repo&amp;quot;&lt;br /&gt;
platform=&amp;quot;my-platform&amp;quot;&lt;br /&gt;
repo_name=&amp;quot;my-repo&amp;quot;&lt;br /&gt;
for arch in all edison core2_32; do&lt;br /&gt;
    smart channel --add $platform-$arch type=rpm-md name=&amp;quot;$repo_name&amp;quot;  baseurl=$feed_url/$arch -y &lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Rebuild the cache with the new channels added&lt;br /&gt;
 $ smart update&lt;br /&gt;
This will result in a set of feeds you can see with &lt;br /&gt;
 $ smart channel --show&lt;br /&gt;
&lt;br /&gt;
== Quick and Dirty Feed Serving ==&lt;br /&gt;
If you don&#039;t have a web server already serving up a directory and don&#039;t feel like going through the effort to do that you can do the following.&lt;br /&gt;
* Assume your feed is /opt/feed&lt;br /&gt;
* apt-get/dnf install python-twistd&lt;br /&gt;
* run twistd on the directory&lt;br /&gt;
 $ twistd -n web --path /opt/feed -p 5678&lt;br /&gt;
* This way you can serve diff feeds on diff ports easily&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
* [http://labix.org/smart/user-guide Smart online user guide]&lt;br /&gt;
* [https://www.fujitsu.com/jp/group/fct/documents/events/2016/A_Smart_Way_to_Manage_Packages_in_Yocto_Project.pdf Fujitsu ELC 2016 Presentation]&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* dnf&lt;br /&gt;
* httpd&lt;br /&gt;
* feed-stability&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Cockpit&amp;diff=27971</id>
		<title>Articles/Battles with Cockpit</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Cockpit&amp;diff=27971"/>
		<updated>2017-06-16T06:02:20Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I had the task of creating a recipe for [http://cockpit-project.org/ Cockpit], a Linux platform configuration tool. A key dependency is [https://github.com/performancecopilot/pcp Performance Co-Pilot], a system-level performance monitoring and management tool. What didn&#039;t help is that I knew nothing about the project itself. I&#039;ve been working with Yocto for almost 3 years. I&#039;m getting better, but am still learning, as this experience has shown me. Here is my story.&lt;br /&gt;
&lt;br /&gt;
I started by using devtool&#039;s recipe generation feature. &lt;br /&gt;
 $ devtool add devtool add pcp https://github.com/performancecopilot/pcp.git&lt;br /&gt;
It gave me a recipe, let&#039;s take a look&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Recipe created by recipetool&lt;br /&gt;
# This is the basis of a recipe and may need further editing in order to be fully functional.&lt;br /&gt;
# (Feel free to remove these comments when editing.)&lt;br /&gt;
&lt;br /&gt;
SUMMARY = &amp;quot;System-level performance monitoring and performance management&amp;quot;&lt;br /&gt;
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is&lt;br /&gt;
# your responsibility to verify that the values are complete and correct.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: multiple licenses have been detected; they have been separated with &amp;amp;&lt;br /&gt;
# in the LICENSE value for now since it is a reasonable assumption that all&lt;br /&gt;
# of the licenses apply. If instead there is a choice between the multiple&lt;br /&gt;
# licenses then you should change the value to separate the licenses with |&lt;br /&gt;
# instead of &amp;amp;. If there is any doubt, check the accompanying documentation&lt;br /&gt;
# to determine which situation is applicable.&lt;br /&gt;
#&lt;br /&gt;
# The following license files were not able to be identified and are&lt;br /&gt;
# represented as &amp;quot;Unknown&amp;quot; below, you will need to check them yourself:&lt;br /&gt;
#   COPYING&lt;br /&gt;
#   man/html/qwtlicense.html&lt;br /&gt;
#   debian/copyright&lt;br /&gt;
#   build/mac/installer-resources/License.html&lt;br /&gt;
#&lt;br /&gt;
# NOTE: spec file indicates the license may be &amp;quot;GPLv2+ and LGPLv2.1+ and CC-BY&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;Unknown&amp;quot;&lt;br /&gt;
LIC_FILES_CHKSUM = &amp;quot;file://COPYING;md5=37ab75b580d5aad4ada04260efa3702f \&lt;br /&gt;
                    file://man/html/qwtlicense.html;md5=c5c69645704bbe5b502541dc8b8f25a0 \&lt;br /&gt;
                    file://debian/copyright;md5=7fecb9815c8887be096ca82876491a3b \&lt;br /&gt;
                    file://build/mac/installer-resources/License.html;md5=8b1eb407ff164d61266fda749147081a&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SRC_URI = &amp;quot;git://github.com/performancecopilot/pcp.git;protocol=https&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Modify these as desired&lt;br /&gt;
PV = &amp;quot;3.11.10+git${SRCPV}&amp;quot;&lt;br /&gt;
SRCREV = &amp;quot;023872a815c9a914c53d755c0447e411440877be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
S = &amp;quot;${WORKDIR}/git&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# NOTE: the following prog dependencies are unknown, ignoring: which xz lzma hdiutil md5sum mkinstallp dpkg dblatex rpmbuild gzip publican qmake-qt4 qshape xmlto pod2man makepkg seinfo git dlltool gawk makedepend qmake-qt5 pkgmk true gmake dtrace rpm bzip2 gtar xconfirm echo qmake&lt;br /&gt;
# NOTE: unable to map the following pkg-config dependencies: libmicrohttpd libsystemd-journal&lt;br /&gt;
#       (this is based on recipes that have previously been built and packaged)&lt;br /&gt;
# NOTE: the following library dependencies are unknown, ignoring: nss pfm regex ibmad sasl2 papi gen ibumad nspr&lt;br /&gt;
#       (this is based on recipes that have previously been built and packaged)&lt;br /&gt;
DEPENDS = &amp;quot;libx11 ncurses cairo openssl bison-native zlib readline systemd avahi flex-native&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# NOTE: if this software is not capable of being built in a separate build directory&lt;br /&gt;
# from the source, you should replace autotools with autotools-brokensep in the&lt;br /&gt;
# inherit line&lt;br /&gt;
inherit perlnative python3native pkgconfig pythonnative autotools&lt;br /&gt;
&lt;br /&gt;
# Specify any options you want to pass to the configure script using EXTRA_OECONF:&lt;br /&gt;
EXTRA_OECONF = &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It seemed to do a pretty good job. It figured out some licences, detected an autotools project that included python and perl components, added some package dependencies and highlighted some that it couldn&#039;t figure out. I was almost there. How hard could it be? Now let&#039;s try and build it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build pcp&lt;br /&gt;
&amp;lt;snip&amp;gt;&lt;br /&gt;
| FATAL ERROR: Cannot perform cross-compilation without a file to source&lt;br /&gt;
|              configuration information from (config.linux is missing)&lt;br /&gt;
&amp;lt;snip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I&#039;m not much of an autotools guy but luckily had &#039;&#039;&#039;Joshua Lock&#039;&#039;&#039; to call on. It turns out that the project wasn&#039;t properly set up for cross-compiling. He also spotted that the project wasn&#039;t capable of building into a seprate build folder. Luckily if already had a config file for mingw-w64 so I copied it, tweaked it slightly and renamed to config.linux. I added it to the recipe&lt;br /&gt;
 SRC_URI += &amp;quot;file://config.linux&amp;quot;&lt;br /&gt;
However we have to copy the file to the right place. As with Yocto, there are many way to do this. I chose to do it manually before the compile step as&lt;br /&gt;
# ${S} is not set when SRC_URI declarations are typically given, so we can&#039;t use the subdir parameter&lt;br /&gt;
# Doing the copy after unpack would be more natural but as unpack is a pythno python, appends can&#039;t be a simple shell command&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Performance_Co-Pilot&amp;diff=27970</id>
		<title>Articles/Battles with Performance Co-Pilot</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Performance_Co-Pilot&amp;diff=27970"/>
		<updated>2017-06-16T06:00:07Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: Henry Bruce moved page Articles/Battles with Performance Co-Pilot to Articles/Battles with Cockpit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Articles/Battles with Cockpit]]&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Cockpit&amp;diff=27969</id>
		<title>Articles/Battles with Cockpit</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Articles/Battles_with_Cockpit&amp;diff=27969"/>
		<updated>2017-06-16T06:00:07Z</updated>

		<summary type="html">&lt;p&gt;Henry Bruce: Henry Bruce moved page Articles/Battles with Performance Co-Pilot to Articles/Battles with Cockpit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I had the task of creating a recipe for the [https://github.com/performancecopilot/pcp Performance Co-Pilot], a system-level performance monitoring and management tool. What didn&#039;t help is that I knew nothing about the project itself. I&#039;ve been working with Yocto for almost 3 years. I&#039;m getting better, but am still learning, as this experience has shown me. Here is my story.&lt;br /&gt;
&lt;br /&gt;
I started by using devtool&#039;s recipe generation feature. &lt;br /&gt;
 $ devtool add devtool add pcp https://github.com/performancecopilot/pcp.git&lt;br /&gt;
It gave me a recipe, let&#039;s take a look&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Recipe created by recipetool&lt;br /&gt;
# This is the basis of a recipe and may need further editing in order to be fully functional.&lt;br /&gt;
# (Feel free to remove these comments when editing.)&lt;br /&gt;
&lt;br /&gt;
SUMMARY = &amp;quot;System-level performance monitoring and performance management&amp;quot;&lt;br /&gt;
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is&lt;br /&gt;
# your responsibility to verify that the values are complete and correct.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: multiple licenses have been detected; they have been separated with &amp;amp;&lt;br /&gt;
# in the LICENSE value for now since it is a reasonable assumption that all&lt;br /&gt;
# of the licenses apply. If instead there is a choice between the multiple&lt;br /&gt;
# licenses then you should change the value to separate the licenses with |&lt;br /&gt;
# instead of &amp;amp;. If there is any doubt, check the accompanying documentation&lt;br /&gt;
# to determine which situation is applicable.&lt;br /&gt;
#&lt;br /&gt;
# The following license files were not able to be identified and are&lt;br /&gt;
# represented as &amp;quot;Unknown&amp;quot; below, you will need to check them yourself:&lt;br /&gt;
#   COPYING&lt;br /&gt;
#   man/html/qwtlicense.html&lt;br /&gt;
#   debian/copyright&lt;br /&gt;
#   build/mac/installer-resources/License.html&lt;br /&gt;
#&lt;br /&gt;
# NOTE: spec file indicates the license may be &amp;quot;GPLv2+ and LGPLv2.1+ and CC-BY&amp;quot;&lt;br /&gt;
LICENSE = &amp;quot;Unknown&amp;quot;&lt;br /&gt;
LIC_FILES_CHKSUM = &amp;quot;file://COPYING;md5=37ab75b580d5aad4ada04260efa3702f \&lt;br /&gt;
                    file://man/html/qwtlicense.html;md5=c5c69645704bbe5b502541dc8b8f25a0 \&lt;br /&gt;
                    file://debian/copyright;md5=7fecb9815c8887be096ca82876491a3b \&lt;br /&gt;
                    file://build/mac/installer-resources/License.html;md5=8b1eb407ff164d61266fda749147081a&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SRC_URI = &amp;quot;git://github.com/performancecopilot/pcp.git;protocol=https&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Modify these as desired&lt;br /&gt;
PV = &amp;quot;3.11.10+git${SRCPV}&amp;quot;&lt;br /&gt;
SRCREV = &amp;quot;023872a815c9a914c53d755c0447e411440877be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
S = &amp;quot;${WORKDIR}/git&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# NOTE: the following prog dependencies are unknown, ignoring: which xz lzma hdiutil md5sum mkinstallp dpkg dblatex rpmbuild gzip publican qmake-qt4 qshape xmlto pod2man makepkg seinfo git dlltool gawk makedepend qmake-qt5 pkgmk true gmake dtrace rpm bzip2 gtar xconfirm echo qmake&lt;br /&gt;
# NOTE: unable to map the following pkg-config dependencies: libmicrohttpd libsystemd-journal&lt;br /&gt;
#       (this is based on recipes that have previously been built and packaged)&lt;br /&gt;
# NOTE: the following library dependencies are unknown, ignoring: nss pfm regex ibmad sasl2 papi gen ibumad nspr&lt;br /&gt;
#       (this is based on recipes that have previously been built and packaged)&lt;br /&gt;
DEPENDS = &amp;quot;libx11 ncurses cairo openssl bison-native zlib readline systemd avahi flex-native&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# NOTE: if this software is not capable of being built in a separate build directory&lt;br /&gt;
# from the source, you should replace autotools with autotools-brokensep in the&lt;br /&gt;
# inherit line&lt;br /&gt;
inherit perlnative python3native pkgconfig pythonnative autotools&lt;br /&gt;
&lt;br /&gt;
# Specify any options you want to pass to the configure script using EXTRA_OECONF:&lt;br /&gt;
EXTRA_OECONF = &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It seemed to do a pretty good job. It figured out some licences, detected an autotools project that included python and perl components, added some package dependencies and highlighted some that it couldn&#039;t figure out. I was almost there. How hard could it be? Now let&#039;s try and build it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ devtool build pcp&lt;br /&gt;
&amp;lt;snip&amp;gt;&lt;br /&gt;
| FATAL ERROR: Cannot perform cross-compilation without a file to source&lt;br /&gt;
|              configuration information from (config.linux is missing)&lt;br /&gt;
&amp;lt;snip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I&#039;m not much of an autotools guy but luckily had &#039;&#039;&#039;Joshua Lock&#039;&#039;&#039; to call on. It turns out that the project wasn&#039;t properly set up for cross-compiling. He also spotted that the project wasn&#039;t capable of building into a seprate build folder. Luckily if already had a config file for mingw-w64 so I copied it, tweaked it slightly and renamed to config.linux. I added it to the recipe&lt;br /&gt;
 SRC_URI += &amp;quot;file://config.linux&amp;quot;&lt;br /&gt;
However we have to copy the file to the right place. As with Yocto, there are many way to do this. I chose to do it manually before the compile step as&lt;br /&gt;
# ${S} is not set when SRC_URI declarations are typically given, so we can&#039;t use the subdir parameter&lt;br /&gt;
# Doing the copy after unpack would be more natural but as unpack is a pythno python, appends can&#039;t be a simple shell command&lt;/div&gt;</summary>
		<author><name>Henry Bruce</name></author>
	</entry>
</feed>