<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hobby &#187; yocto</title>
	<atom:link href="https://hobby.farit.ru/tag/yocto/feed/" rel="self" type="application/rss+xml" />
	<link>https://hobby.farit.ru</link>
	<description></description>
	<lastBuildDate>Fri, 27 Feb 2026 07:17:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Building Yocto Linux for Intel Edison</title>
		<link>https://hobby.farit.ru/building-yocto-linux-for-intel-edison/</link>
		<comments>https://hobby.farit.ru/building-yocto-linux-for-intel-edison/#comments</comments>
		<pubDate>Sat, 01 Aug 2015 04:39:11 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[intel edison]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[yocto]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=84</guid>
		<description><![CDATA[The Intel Edison board is shipped with the Yocto Linux distribution installed. Yocto allows an experienced developer to compile a small-size Linux image with only the selected packages. Then the image is flashed into the board. It&#8217;s not as convenient as Ubuntu as there are no pre-compiled packages that are easy to install. I wanted [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The Intel Edison board is shipped with the <a href="https://www.yoctoproject.org/" target="_blank"><strong>Yocto</strong></a> Linux distribution installed. Yocto allows an experienced developer to compile a small-size Linux image with only the selected packages. Then the image is flashed into the board. It&#8217;s not as convenient as Ubuntu as there are no pre-compiled packages that are easy to install.</p>
<p>I wanted to add the program mc (Midnight Commander); so, I had to recompile the Yocto image. My computer OS is Linux Ubuntu 14.04. I experienced a few problems while compiling; so, I&#8217;ll describe them here.</p>
<p>The main document is <strong><a href="http://www.intel.com/support/edison/sb/CS-035278.htm" target="_blank">Board Support Package (BSP) User Guide</a></strong>. I followed it.</p>
<p>Installed the prerequisite packages with the following command:</p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install build-essential git diffstat gawk chrpath texinfo libtool \
gcc-multilib dfu-util u-boot-tools
</pre>
<p>Set up my git name and email:</p>
<pre class="brush: plain; title: ; notranslate">
git config --global user.name &quot;YOUR NAME&quot;
git config --global user.email &quot;YOUR EMAIL ADDRESS&quot;
</pre>
<p>Downloaded the package <strong>Linux source files</strong> from the <a href="https://software.intel.com/iot/hardware/edison/downloads" target="_blank"><strong>Intel Edison Software Downloads</strong></a> page. At the time of writing, it was in the section <strong>Intel Edison® Board Firmware Software Release 2.1</strong>.</p>
<p>I install everything related to the Intel Edison into the directory /home/farit/edison. The Linux sources consume 11G in that directory.</p>
<p>Decompressed the source package:</p>
<pre class="brush: plain; title: ; notranslate">
tar xzf edison-src-ww25.5-15.tgz  -C /home/farit/edison/
cd /home/farit/edison/edison-src/
</pre>
<p>Moved my download and build cache (also called sstate) directories from the default location under the build directory, using the &#8211;dl_dir and &#8211;sstate_dir options. To create download and sstate directory, used the mkdir command:</p>
<pre class="brush: plain; title: ; notranslate">
mkdir /home/farit/edison/bitbake_download_dir
mkdir /home/farit/edison/bitbake_sstate_dir
</pre>
<p>Used the setup.sh script to initialize the build environment for Intel Edison.</p>
<pre class="brush: plain; title: ; notranslate">
/home/farit/edison/edison-src/meta-intel-edison/setup.sh \
--dl_dir=/home/farit/edison/bitbake_download_dir \
--sstate_dir=/home/farit/edison/bitbake_sstate_dir \
--build_dir=/home/farit/edison/edison-src
</pre>
<p>After the setup, I ran these commands recommended by the setup script:</p>
<pre class="brush: plain; title: ; notranslate">
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake edison-image
</pre>
<p>The compilation took 5 or so hours. I should&#8217;ve used the SSD disk. But most files have been downloaded and cached now; so, it doesn&#8217;t take much time the second time.</p>
<p>Then I decided to compile in Midnight Commander. I checked the name of the package on the <a href="http://packages.yoctoproject.org/" target="_blank">Yocto recipes directory</a>. It was &#8220;mc&#8221;.<br />
I opened the file /home/farit/edison/edison-src/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb and added the lines at the bottom:</p>
<pre class="brush: plain; title: ; notranslate">
#Midnight Commander
IMAGE_INSTALL += &quot;mc&quot;
</pre>
<p>Then ran again:</p>
<pre class="brush: plain; title: ; notranslate">
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake edison-image
</pre>
<p>Then I created a new Linux image:</p>
<pre class="brush: plain; title: ; notranslate">
/home/farit/edison/edison-src/meta-intel-edison/utils/flash/postBuild.sh
/home/farit/edison/edison-src/build/toFlash/flashall.sh
</pre>
<p>At first, the command complained about the non-existing mkimage program, which is in the package u-boot-tools:</p>
<pre class="brush: plain; title: ; notranslate">
Error : ota_update.scr creation failed, mkimage tool not found
</pre>
<p>I added a symlink to mkimage and ran the postBuild.sh script again:</p>
<pre class="brush: plain; title: ; notranslate">
cd /home/farit/edison/edison-src
mkdir -p u-boot/tools
cd u-boot/tools
ln -s /usr/bin/mkimage mkimage
</pre>
<p>When there were no errors, I looked in the directory /home/farit/edison/edison-src/build/toFlash. It contained the same files as in the Intel&#8217;s firmware image.<br />
I ran the command flashall.sh in it as root. I added myself into the group &#8220;dialout&#8221;; so, I should be able to connect to a USB port as a regular user. I&#8217;ll check it again the next time.</p>
<figure id="attachment_87" style="width: 854px;" class="wp-caption alignnone"><a href="http://hobby.farit.ru/wp-content/uploads/2015/07/mc_edison.png"><img class="size-medium wp-image-87" src="http://hobby.farit.ru/wp-content/uploads/2015/07/mc_edison-854x463.png" alt="Midnight Commander on Intel Edison" width="854" height="463" /></a><figcaption class="wp-caption-text">Midnight Commander on Intel Edison</figcaption></figure>
<p>By default, the subshell (Ctrl-O) doesn&#8217;t work in Midnight Commander as it requires bash. Change your user shell from the default &#8220;/bin/sh&#8221; to &#8220;/bin/bash&#8221; in /etc/passwd.</p>
<p>When I want to quickly recompile just the kernel after changes, I run these commands:</p>
<pre class="brush: plain; title: ; notranslate">
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake -f linux-yocto
</pre>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/building-yocto-linux-for-intel-edison/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
