<?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>FFU &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/ffu/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Sun, 09 Dec 2018 16:42:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>FFU &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Raspberry PI SD Card Provisioning with Windows 10 IoT Core &#8211; Adding Packages to the Existing FFU Image</title>
		<link>https://sibeeshpassion.com/raspberry-pi-sd-card-provisioning-with-windows-10-iot-core-adding-packages-to-the-existing-ffu-image/</link>
					<comments>https://sibeeshpassion.com/raspberry-pi-sd-card-provisioning-with-windows-10-iot-core-adding-packages-to-the-existing-ffu-image/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 09 Dec 2018 12:44:17 +0000</pubDate>
				<category><![CDATA[IoT]]></category>
		<category><![CDATA[Raspberry PI]]></category>
		<category><![CDATA[Custom IoT Core FFU Image]]></category>
		<category><![CDATA[FFU]]></category>
		<category><![CDATA[IoT Core]]></category>
		<category><![CDATA[IoT Core OS]]></category>
		<category><![CDATA[Raspberry PI SD Card Provisioning]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13431</guid>

					<description><![CDATA[[toc] Introduction In my previous article, we have seen how to create a basic FFU image which can be flashed to SD cards. Today, we will see how we can package our application and add this to our existing IoT Core OS image. Doesn&#8217;t it sound good? If you haven&#8217;t read my previous articles on the same topic, I strongly recommend you to read so that we can make sure that we both are in the same boat. For now, let&#8217;s just start doing some amazing things. Let&#8217;s just start then. Background Wow, that&#8217;s cool that you have your own FFU [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>In my previous article, we have seen how to <a href="https://sibeeshpassion.com/raspberry-pi-sd-card-provisioning-with-windows-10-iot-core-create-ffu-image-and-flash/">create a basic FFU image</a> which can be flashed to SD cards. Today, we will see how we can package our application and add this to our existing IoT Core OS image. Doesn&#8217;t it sound good? If you haven&#8217;t read my previous articles on the same topic, I strongly recommend you to read so that we can make sure that we both are in the same boat. For now, let&#8217;s just start doing some amazing things. Let&#8217;s just start then.</p>
<h2>Background</h2>
<p>Wow, that&#8217;s cool that you have your own FFU image in your SD card now, to make it more custom you may need to add your own application to it so that the same can be run in as many Raspberry Pi device as can, well that&#8217;s called Provisioning right? In this article,</p>
<ol>
<li>we will see how we can create an APPX package of a UWP application</li>
<li>how the APPX package can be added to our FFU image</li>
</ol>
<p>Let&#8217;s start doing the PowerShell commands now then.</p>
<h2>Prerequisites</h2>
<p>To do the wonderful things, we always need some prerequisites.  You can always see all the prerequisites from <a href="https://docs.microsoft.com/en-us/windows-hardware/manufacture/iot/set-up-your-pc-to-customize-iot-core">here</a>. But, in this part, we are going to be needed only the preceding tools.</p>
<ol>
<li>Windows Assessment and Deployment Kit (Windows ADK)</li>
<li>Windows Driver Kit (WDK) 10</li>
<li>IoT Core ADK Add-Ons</li>
<li>Windows 10 IoT Core Packages</li>
<li>The Raspberry Pi BSP</li>
<li>Custom FFU image we have created</li>
</ol>
<h2>Creating the UWP APPX</h2>
<p>For now, I am going to use the Microsoft HelloWorld application, which is already available in the <a href="https://github.com/Microsoft/Windows-iotcore-samples/tree/develop/Samples/HelloWorld">GitHub</a>. Let&#8217;s just clone that application and build the same. If you are getting an error as &#8220;Error Cannot resolve Assembly or Windows Metadata file &#8216;Windows.Foundation.UniversalApiContract.winmd'&#8221;, please make sure that you had set the target version in the application section, you can always see my detailed answer <a href="https://stackoverflow.com/questions/53691306/error-cannot-resolve-assembly-or-windows-metadata-file-windows-foundation-unive/53691307#53691307">here in StackOverflow</a>.</p>
<p>Now let&#8217;s just right click on the project and click on Store &#8211; &gt; Create App Packages.</p>
<div id="attachment_13433" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/Create-APPX-Menu.jpg"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-13433" class="size-full wp-image-13433" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/Create-APPX-Menu.jpg" alt="Create APPX Menu" width="650" height="380" srcset="/wp-content/uploads/2018/12/Create-APPX-Menu.jpg 650w, /wp-content/uploads/2018/12/Create-APPX-Menu-300x175.jpg 300w, /wp-content/uploads/2018/12/Create-APPX-Menu-400x234.jpg 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13433" class="wp-caption-text">Create APPX Menu</p></div>
<p>Now select the option &#8220;I want to create packages for sideloading&#8221; and click next. In the next screen, you can always automatically increment your application version. In the Generate app bundle option, select Never. And click Create. Now the app will get built and the APPX file will be generated for you.</p>
<div id="attachment_13434" style="width: 661px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/Create-APP-Package.jpg"><img decoding="async" aria-describedby="caption-attachment-13434" class="size-full wp-image-13434" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/Create-APP-Package.jpg" alt="Create APP Package" width="651" height="211" srcset="/wp-content/uploads/2018/12/Create-APP-Package.jpg 651w, /wp-content/uploads/2018/12/Create-APP-Package-300x97.jpg 300w, /wp-content/uploads/2018/12/Create-APP-Package-400x130.jpg 400w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-13434" class="wp-caption-text">Create APP Package</p></div>
<h2>Adding APPX to the Existing FFU</h2>
<p>As we have our own package and FFU image ready, we can go ahead and add this package to our FFU now. To do that open the IoTCorePShell, if you are not sure about how to open this, please check my previous article. Now let&#8217;s create a package for our app.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">newappxpkg "C:\Users\SibeeshVenu\source\repos\Windows-iotcore-samples.git\Samples\HelloWorld\CS\AppPackages\HelloWorld_1.0.0.0_ARM_Test\HelloWorld_1.0.0.0_ARM.appx" fga Appx.HelloWorld</pre>
<p>Please be noted that the &#8220;fga&#8221; is an indication that your application is a foreground application, if your application is a background application, you should use &#8220;bgt&#8221; instead of &#8220;fga&#8221;.</p>
<blockquote><p>Please make sure that your FFU image has at least one Foreground application in it. You will always see the blue spinning dots after connecting the monitor to the Raspberry Pi if you have only background application in your image.  So you should consider having a registered fgt as well in your image.</p></blockquote>
<p>You will not be able to understand what exactly happens if there any problems if you have only a background application in your image. Trust me, I had spent many hours looking at the blue screen hoping that my application will show up there.</p>
<p>The above command will create a new folder in your workspace, in our case it is at C:\OEE\Source-arm\Packages\Appx.HelloWorld. It will also copy the appx files and its dependencies from the folder we are specifying in the command and generates a customizations.xml file as well as a package xml file that is used to build the package.</p>
<div id="attachment_13435" style="width: 584px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/newappxpkg-output.jpg"><img decoding="async" aria-describedby="caption-attachment-13435" class="size-full wp-image-13435" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/newappxpkg-output.jpg" alt="newappxpkg output" width="574" height="433" srcset="/wp-content/uploads/2018/12/newappxpkg-output.jpg 574w, /wp-content/uploads/2018/12/newappxpkg-output-300x226.jpg 300w, /wp-content/uploads/2018/12/newappxpkg-output-400x302.jpg 400w" sizes="(max-width: 574px) 100vw, 574px" /></a><p id="caption-attachment-13435" class="wp-caption-text">newappxpkg output</p></div>
<p>This will also create a new entry as follows in the OEMFM.xml file.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">&lt;PackageFile Path="%PKGBLD_DIR%" Name="%OEM_NAME%.Appx.HelloWorld.cab"&gt;
        &lt;FeatureIDs&gt;
          &lt;FeatureID&gt;APPX_HELLOWORLD&lt;/FeatureID&gt;
        &lt;/FeatureIDs&gt;
      &lt;/PackageFile&gt;</pre>
<p>Now let&#8217;s just build our package.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">PS C:\OEE&gt;buildpkg Appx.HelloWorld
Processing Appx.HelloWorld.wm.xml
True
IoTCorePShell arm 10.0.0.0 Test</pre>
<p>Now you should be able to see your package.cab file in the build directory C:\OEE\Build\arm\pkgs.  Let&#8217;s add the feature APPX_HELLOWORLD to our product OEEIoTCore now.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">PS C:\OEE&gt;addfid OEEIoTCore Test APPX_HELLOWORLD -OEM
IoTCorePShell arm 10.0.0.0 Test</pre>
<p>You can also remove any feature from any product by using &#8220;removefid&#8221; command. As we have added our feature, now it is time to build our image.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">PS C:\OEE&gt;buildimage OEEIoTCore Test</pre>
<p>Please be noted that this may take some time, and once it is done, you will be getting an output as below.</p>
<div id="attachment_13436" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/buildimage.png"><img decoding="async" aria-describedby="caption-attachment-13436" class="size-full wp-image-13436" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/buildimage.png" alt="buildimage" width="650" height="479" srcset="/wp-content/uploads/2018/12/buildimage.png 650w, /wp-content/uploads/2018/12/buildimage-300x221.png 300w, /wp-content/uploads/2018/12/buildimage-400x295.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13436" class="wp-caption-text">buildimage</p></div>
<p>The new image will be available in your build folder (C:\OEE\Build\arm\OEEIoTCore\Test). Now you can write this FFU image with your application as <a href="https://sibeeshpassion.com/raspberry-pi-sd-card-provisioning-with-windows-10-iot-core-create-ffu-image-and-flash/#writing-flashing-the-ffu-image-to-sd-card">mentioned in my previous article</a>.</p>
<p>Now that our OS is flashed and it is time to connect the SD card to the Raspberry Pi. Once that is done, you can see that your application is running in <a href="https://sibeeshpassion.com/setting-up-your-raspberry-pi-with-microsoft-windows-10-iot-core/#login-to-device-portal">your device portal</a>.</p>
<div id="attachment_13437" style="width: 660px" class="wp-caption aligncenter"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/Custom-Package-in-Device-Portal.jpg"><img decoding="async" aria-describedby="caption-attachment-13437" class="size-full wp-image-13437" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/Custom-Package-in-Device-Portal.jpg" alt="Custom Package in Device Portal" width="650" height="309" srcset="/wp-content/uploads/2018/12/Custom-Package-in-Device-Portal.jpg 650w, /wp-content/uploads/2018/12/Custom-Package-in-Device-Portal-300x143.jpg 300w, /wp-content/uploads/2018/12/Custom-Package-in-Device-Portal-400x190.jpg 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13437" class="wp-caption-text">Custom Package in Device Portal</p></div>
<p>Now let&#8217;s add a background application and follow the same procedure.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">PS C:\OEE&gt;newappxpkg "C:\Users\SibeeshVenu\SourceCode\OEE\ml.OEE.Pi.Windows\ml.OEE.Pi.Windows.BeaconDetector\AppPackages\ml.OEE.Pi.Windows.BeaconDetector_1.0.3.0_ARM_Test\ml.OEE.Pi.Windows.BeaconDetector_1.0.3.0_ARM.appx" bgt Appx.Beacon</pre>
<p>I am sure you will be able to see your background application in your device portal, once you had followed the steps correctly.</p>
<div id="attachment_13442" style="width: 660px" class="wp-caption alignnone"><a href="https://sibeeshpassion.com/wp-content/uploads/2018/12/Background-Application-in-IoT-Device-Portal.jpg"><img decoding="async" aria-describedby="caption-attachment-13442" class="size-full wp-image-13442" src="https://sibeeshpassion.com/wp-content/uploads/2018/12/Background-Application-in-IoT-Device-Portal.jpg" alt="Background Application in IoT Device Portal" width="650" height="336" srcset="/wp-content/uploads/2018/12/Background-Application-in-IoT-Device-Portal.jpg 650w, /wp-content/uploads/2018/12/Background-Application-in-IoT-Device-Portal-300x155.jpg 300w, /wp-content/uploads/2018/12/Background-Application-in-IoT-Device-Portal-400x207.jpg 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-13442" class="wp-caption-text">Background Application in IoT Device Portal</p></div>
<h2>Conclusion</h2>
<p>Wow!. Now we have learned,</p>
<ul>
<li>how we can generate APPX package of our UWP application</li>
<li>how to add the new feature to the existing IoT Core FFU image</li>
<li>how to write the same to an SD card</li>
<li>how to manage the new application in Device Portal</li>
</ul>
<h2><span id="your-turn-what-do-you-think">Your turn. What do you think?</span></h2>
<p>Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post as useful? Kindly do not forget to share me your feedback.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/raspberry-pi-sd-card-provisioning-with-windows-10-iot-core-adding-packages-to-the-existing-ffu-image/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
