summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/CreateApplicationImage.html250
1 files changed, 250 insertions, 0 deletions
diff --git a/doc/CreateApplicationImage.html b/doc/CreateApplicationImage.html
new file mode 100644
index 0000000..28328e6
--- a/dev/null
+++ b/doc/CreateApplicationImage.html
@@ -0,0 +1,250 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+
+
+
+
+
+
+
+ <head>
+ <title>
+ Tutorials/CreateApplicationImage – wdtvtools
+ </title>
+ <link rel="search" href="/apps/trac/wdtvtools/search" />
+ <link rel="help" href="/apps/trac/wdtvtools/wiki/TracGuide" />
+ <link rel="alternate" href="/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage?format=txt" type="text/x-trac-wiki" title="Plain Text" />
+ <link rel="up" href="/apps/trac/wdtvtools/wiki/Tutorials" title="View parent page" />
+ <link rel="start" href="/apps/trac/wdtvtools/wiki" />
+ <link rel="stylesheet" href="/apps/trac/wdtvtools/chrome/common/css/trac.css" type="text/css" /><link rel="stylesheet" href="/apps/trac/wdtvtools/chrome/common/css/wiki.css" type="text/css" />
+ <link rel="shortcut icon" href="/apps/trac/wdtvtools/chrome/common/trac.ico" type="image/x-icon" />
+ <link rel="icon" href="/apps/trac/wdtvtools/chrome/common/trac.ico" type="image/x-icon" />
+ <link type="application/opensearchdescription+xml" rel="search" href="/apps/trac/wdtvtools/search/opensearch" title="Search wdtvtools" />
+ <script type="text/javascript" src="/apps/trac/wdtvtools/chrome/common/js/jquery.js"></script><script type="text/javascript" src="/apps/trac/wdtvtools/chrome/common/js/trac.js"></script><script type="text/javascript" src="/apps/trac/wdtvtools/chrome/common/js/search.js"></script>
+ <!--[if lt IE 7]>
+ <script type="text/javascript" src="/apps/trac/wdtvtools/chrome/common/js/ie_pre7_hacks.js"></script>
+ <![endif]-->
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+ $("#content").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
+ });
+ </script>
+ <link type="text/css" href="/apps/trac/wdtvtools/chrome/site/ha-css/default2.css" rel="stylesheet" />
+
+ <link rel="stylesheet" type="text/css" href="http://static.sourceforge.net/css/develop/hosted.php?secure=0&amp;1275061049" media="all" />
+ <!-- BEGIN: AdSolution-Tag 4.2: Global-Code [PLACE IN HTML-HEAD-AREA!] -->
+ <!-- DoubleClick Random Number -->
+ <script language="JavaScript" type="text/javascript">
+ dfp_ord=Math.random()*10000000000000000;
+ dfp_tile = 1;
+ </script>
+
+ <!-- End DoubleClick Random Number -->
+ <!-- END: AdSolution-Tag 4.2: Global-Code -->
+
+</head>
+ <body>
+
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+
+<script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-32013-36");
+</script>
+
+<!--[if IE 7]><div id="ie7only"><![endif]-->
+<!--[if IE 6]><div id="ie6only"><![endif]-->
+<!--[if IE]><div id="ieonly"><![endif]-->
+<div id="sf_doc3">
+ <div id="sf_hd" class="sfha">
+ <p id="metaNav"><strong>Welcome, Guest!</strong> <a href="https://sourceforge.net/account/login.php" title="Log in">Log&nbsp;In</a> | <a href="/account/registration/" title="Get a SourceForge.net account">Create&nbsp;Account</a></p>
+ <a href="http://sourceforge.net" id="sf_logo"></a>
+ <ul id="sfnav">
+ <li><a href="/projects/wdtvtools" title="Project summary page hosted on SourceForge.net">Visit project wdtvtools</a></li>
+ </ul>
+ <div id="sf_fad1" class="sf">
+ <script type="text/javascript">
+ //<![CDATA[
+ document.write('<script src="http://ad.doubleclick.net/adj/ostg.sourceforge/cons_hosted_apps_p11_spons;pg=default;dcopt=ist;tile='+dfp_tile+';tpc=project;tpc=wdtvtools;ord='+dfp_ord+'?" type="text/javascript"><\/script>');
+ dfp_tile++;
+ //]]>
+ </script>
+ </div>
+ </div>
+
+ <div id="sf_bd" class="sfha">
+
+ <div id="doc3" class="yui-t6">
+ <div id="bd">
+ <a name="content"></a>
+<!-- End Header -->
+ <div id="banner">
+ <div id="header">
+ <h1><a href="http://sourceforge.net/apps/trac/wdtvtools/">wdtvtools</a></h1>
+ </div>
+ <form id="search" action="/apps/trac/wdtvtools/search" method="get">
+ <div>
+ <label for="proj-search">Search:</label>
+ <input type="text" id="proj-search" name="q" size="18" value="" />
+ <input type="submit" value="Search" />
+ </div>
+ </form>
+ <div id="metanav" class="nav">
+ <ul>
+ <li class="first"><a href="/apps/trac/wdtvtools/prefs">Preferences</a></li><li><a href="/apps/trac/wdtvtools/wiki/TracGuide">Help/Guide</a></li><li class="last"><a href="/apps/trac/wdtvtools/about">About Trac</a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="mainnav" class="nav">
+ <ul>
+ <li class="first active"><a href="/apps/trac/wdtvtools/wiki">Wiki</a></li><li><a href="/apps/trac/wdtvtools/timeline">Timeline</a></li><li><a href="/apps/trac/wdtvtools/roadmap">Roadmap</a></li><li><a href="/apps/trac/wdtvtools/browser">Browse Source</a></li><li><a href="/apps/trac/wdtvtools/report">View Tickets</a></li><li class="last"><a href="/apps/trac/wdtvtools/search">Search</a></li>
+ </ul>
+ </div>
+ <div id="main">
+ <div id="ctxtnav" class="nav">
+ <h2>Context Navigation</h2>
+ <ul>
+ <li class="first "><a href="/apps/trac/wdtvtools/wiki/Tutorials">Up</a></li><li><a href="/apps/trac/wdtvtools/wiki/WikiStart">Start Page</a></li><li><a href="/apps/trac/wdtvtools/wiki/TitleIndex">Index</a></li><li><a href="/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage?action=history">History</a></li><li class="last"><a href="/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage?action=diff&amp;version=1">Last Change</a></li>
+ </ul>
+ <hr />
+ </div>
+ <div id="content" class="wiki">
+ <p class="path">
+ <a class="pathentry" title="View Tutorials" href="/apps/trac/wdtvtools/wiki/Tutorials">Tutorials</a><span class="pathentry sep">/</span><a class="pathentry" title="View Tutorials/CreateApplicationImage" href="/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage">CreateApplicationImage</a>
+ <br style="clear: both" />
+ </p>
+ <div class="wikipage searchable">
+
+ <h1 id="CreateApplicationImagesapp.binFiles">Create Application Images (app.bin Files)</h1>
+<p>
+Both user firmwares for the WDTV, <a class="missing wiki">ext3-boot?</a> and <a class="missing wiki">WDLXTV?</a>, support application images that can be used to add further capabilities. This can included additional programs that are not available via the <a class="missing wiki">OptWare?</a> package manager, new functionality like <a class="wiki" href="/apps/trac/wdtvtools/wiki/event-osd">event-osd</a> or OSD mods to change the UI. All these mods have in common that their files must be packed into an application image to be deployed to the WDTV. This tutorial explains some details and how to create them.
+</p>
+<h2 id="Background">Background</h2>
+<blockquote>
+<p>
+<i>If the terms ext3 and cramfs ring a bell, you can skip this section.</i>
+</p>
+</blockquote>
+<p>
+Application images (or app.bin files) are a disk with a filesystem in a file. So instead of formatting your HDD you format the file and copy files into it. There are two major file systems that make sense to be used for the app.bin files: ext3 and cramfs.
+</p>
+<p>
+ext3 is a widely used Linux filesystem that should be used for app.bin files where the application must write to the app.bin file, e.g. to cache downloaded files. cramfs (compressed ROM file system (don't ask me why is ram instead of rom)) on the other hand is a filesystem that is readonly, so ideally for themes because they are a fixed set of files.
+</p>
+<p>
+In general it doesn't matter which one you use when you don't need write access to the app.bin file, but the cramfs has the advantage that it does not take damage in case of a crash due to power loss of the WDTV. Its an unlikely event, but can happen and in this case the app.bin file must be replaced with a fresh copy.
+</p>
+<h2 id="Creatingext3images">Creating ext3 images</h2>
+<blockquote>
+<p>
+<i>The following steps can only be done ok a Linux or MacOS system where the e2fsprogs are available. Every normal Linux distribution should have them, you can even install it onto the WDTV and create your images there (<tt># ipkg install e2fsprogs</tt>).</i>
+</p>
+</blockquote>
+<p>
+Lets make the following assumptions:
+</p>
+<ul><li>you are in a writable directory, called the working directory from here on
+</li><li>all the files you want to copy to the app.bin file are in a directory called content in your working directory
+</li><li>you are logged in as root
+</li><li>your final application image file should be named <tt>cool.app.bin</tt>
+</li></ul><p>
+First you must create the app.bin file container. This can be done with dd, it copies data from one file to another.
+</p>
+<pre class="wiki"># dd if=/dev/zero of=./cool.app.bin bs=1M count=8
+</pre><p>
+This will create an 8 megabyte big file in your working directory filled with zeros. The parameter bs specifies the block size, here 1 megabyte (1024 * 1024 bytes) and count gives how often the block size is copied. Next we must create the file system on the file:
+</p>
+<pre class="wiki"># mkfs.ext3 -F cool.app.bin
+# tune2fs -c 0 -i 0 cool.app.bin
+</pre><p>
+The first command creates the actual file system, the second one sets some parameters to disable file system checks. After the filesystem is created you can use it by mounting the file to a directory with:
+</p>
+<pre class="wiki"># mkdir -p cool-loop/
+# mount -o loop cool.app.bin cool-loop/
+</pre><p>
+This way the filesystem is available in the directory cool-loop. When you copy a file to cool-loop you are actually writing it to the cool.app.bin file. You can now make anything you'd normally do, e.g. copy the contents of the content directory to it:
+</p>
+<pre class="wiki"># cp -r content/* cool-loop/
+</pre><p>
+When you are done you should make sure that all files are owned by root because this is the only user on a normal WDTV firmware.
+</p>
+<pre class="wiki"># chown -R root:root
+</pre><p>
+Finally you can unmount the file system to make sure everything is written to the cool.app.bin file:
+</p>
+<pre class="wiki"># umount cool-loop/
+</pre><h3 id="UtilityScript">Utility Script</h3>
+<p>
+When you are done doing this manually and know what you are doing, you can use a script from the <a class="ext-link" href="http://wdtv.elmarweber.org"><span class="icon">WDTV Tools</span></a> project: <a class="ext-link" href="http://wdtvtools.svn.sourceforge.net/viewvc/wdtvtools/trunk/appbinutils/assemble-app-bin.sh?view=markup"><span class="icon">assemble-app-bin.sh</span></a>
+</p>
+<p>
+You can download it with
+</p>
+<pre class="wiki"># wget http://wdtvtools.svn.sourceforge.net/viewvc/wdtvtools/trunk/appbinutils/assemble-app-bin.sh
+</pre><p>
+The same stuff we have done above is done with the script by executing it with the following parameters
+</p>
+<pre class="wiki"># assemble-app-bin.sh cool 8 content
+</pre><p>
+(first parameter is the app name, second one the size in MB and the last one the directory to pack into the filesystem)
+</p>
+<h2 id="CreatingcramfsImages">Creating cramfs Images</h2>
+<p>
+Creating cramfs images is easier than creating ext3 images and can also be done under Windows (you need <a class="ext-link" href="http://www.cygwin.com/"><span class="icon">cygwin</span></a> and the cramfsprogs package). On your average Linux distribution you must install the cramfsprogs package.
+</p>
+<ul><li>Debian / Ubuntu <tt># apt-get install cramfsprogs</tt>
+</li><li>Gentoo <tt># emerge cramfs</tt>
+</li><li>Others: You know it otherwise Google does
+</li></ul><p>
+To create the file cool.app.bin containing the contents of the directory /foo/bar/content you just execute the following command and the file is created.
+</p>
+<pre class="wiki"># mkcramfs /foo/bar/content cool.app.bin
+</pre>
+
+
+ </div>
+ </div>
+ <div id="altlinks">
+ <h3>Download in other formats:</h3>
+ <ul>
+ <li class="last first">
+ <a rel="nofollow" href="/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage?format=txt">Plain Text</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="footer" lang="en" xml:lang="en"><hr />
+ <a id="tracpowered" href="http://trac.edgewall.org/"><img src="/apps/trac/wdtvtools/chrome/common/trac_logo_mini.png" height="30" width="107" alt="Trac Powered" /></a>
+ <p class="left">
+ Powered by <a href="/apps/trac/wdtvtools/about"><strong>Trac 0.11.2.1</strong></a><br />
+ By <a href="http://www.edgewall.org/">Edgewall Software</a>.
+ </p>
+ <p class="right"><!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sniper-lan.de/piwik/" : "http://sniper-lan.de/piwik/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 8); piwikTracker.trackPageView(); piwikTracker.enableLinkTracking(); } catch( err ) {} </script><noscript><p><img src="http://sniper-lan.de/piwik/piwik.php?idsite=8" style="border:0" alt=""/></p></noscript> <!-- End Piwik Tag --></p>
+ </div>
+<!-- Footer -->
+ </div>
+ </div>
+<!-- End Footer -->
+
+ <br style="clear: both"/>
+ </div>
+
+ <div id="sf_ft" class="sfha">
+ <p class="copyright">&copy; 2010 <a title="Network which provides and promotes Open Source software downloads, development, discussion and news." href="http://geek.net">Geeknet, Inc.</a> <a href="http://p.sf.net/sourceforge/terms">Terms of Use</a> <a href="http://p.sf.net/sourceforge/privacy">Privacy Policy</a></p>
+ </div>
+
+ <script type="text/javascript">
+ pageTracker._trackPageview();
+ </script>
+
+</div>
+<!--[if IE]></div><![endif]-->
+<!--[if IE 6]></div><![endif]-->
+<!--[if IE 7]></div><![endif]-->
+</body>
+</html>
+
+