Sachen von svnmisc/i.MX/ hierher geschoben
Hubert Hoegl [Thu, 21 Jul 2011 07:36:44 +0000 (09:36 +0200)]
docs/notizen/Flashing an SD Card for i.MX23.txt [new file with mode: 0644]
docs/notizen/SbFileFormat.html [new file with mode: 0644]
docs/notizen/iMX28_SB_Description.pdf [new file with mode: 0644]
docs/notizen/imx28.rst [new file with mode: 0644]
docs/notizen/ltib.txt [new file with mode: 0644]
docs/notizen/sd.txt [new file with mode: 0644]

diff --git a/docs/notizen/Flashing an SD Card for i.MX23.txt b/docs/notizen/Flashing an SD Card for i.MX23.txt
new file mode 100644 (file)
index 0000000..3893a51
--- /dev/null
@@ -0,0 +1,36 @@
+http://forums.freescale.com/freescale/attachments/freescale/IMXCOMM/432/2/Flashing%20an%20SD%20Card%20for%20i.MX23.txt\r
+---\r
+\r
+FLASHING a .SB image and rootfs to an SD Card\r
+(NOTE - "sdb1" could enumerate differently on your host, so confirm what it enumerates as before running fdisk!) \r
+\r
+    * insert the card reader to the Linux host.\r
+    * Un-mount the card reader, i.e. 'sudo umount /dev/sdb1'\r
+    * run fdisk, 'sudo fdisk /dev/sdb'\r
+          o Press 'p' to show the partitions on the card\r
+          o Press 'd' to delete a partition. Repeat to remove all partitions\r
+          o Press 'n' to create a new partition\r
+                + press 'p' to select the primary partition\r
+                + press '1' for creating partition 1 on the card\r
+                + press Enter to start from first block\r
+                + Type '16MB' to create the 16MB partitions\r
+          o Press 't' to change the newly created partition type\r
+                + Enter '53' for the new partition type\r
+          o Press 'n' to create a second partition\r
+                + Press Enter to accept all default setting\r
+          o Press 'w' to write  the partitions to the card and exit the fdisk\r
+\r
+# Create the SD/MMC raw partition image and copy it to the card.\r
+\r
+    * run 'dd if=/dev/zero of=mmc_boot_partition.raw bs=512 count=4' to create and fill the image file, mmc_boot_partition.raw with 4 blocks of 512 bytes each\r
+    * run 'dd if=~/ltib/rootfs/boot/imx233_linux.sb of=mmc_boot_partition.raw ibs=512 seek=4 conv=sync,notrunc' to append the boot stream, imx233_linux.sb, to the mmc_boot_partition.raw.\r
+    * run 'dd if=mmc_boot_partition.raw of=/dev/sdb1' to write the file to the boot partition on the SD card\r
+    * format the second partition on the SD card\r
+          o run 'sudo mkfs.ext2 /dev/sdb2' command.\r
+    * mount the second partition on the card\r
+          o if you do not have the mmc mounting point created yet, create one with 'sudo mkdir /mnt/mmc'\r
+          o run 'sudo mount /dev/sdb2 /mnt/mmc' to mount the partition as the mmc card\r
+    * Copy the rootfs to the card\r
+          o run 'sudo cp -a ~/ltib/rootfs/* /mnt/mmc' to put down the root filesystem\r
+    * unmount the card, 'umount /dev/sdb2'.\r
+\r
diff --git a/docs/notizen/SbFileFormat.html b/docs/notizen/SbFileFormat.html
new file mode 100644 (file)
index 0000000..b6aa825
--- /dev/null
@@ -0,0 +1,824 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
+<head>
+       <title> SbFileFormat &lt; Main &lt; Wiki</title>
+                 
+       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1;charset=windows-1252" />  <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/wiki/Main/WebRss" />
+       <link rel="icon" href="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/favicon0.ico" type="image/x-icon" /> <link rel="shortcut icon" href="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/favicon0.ico" type="image/x-icon" />
+       <link rel="alternate" href="http://www.rockbox.org/wiki/bin/edit/Main/SbFileFormat?t=1303122211" type="application/x-wiki" title="edit SbFileFormat" />
+       <meta name="description" content="SbFileFormat" />
+        <!--[if IE]></base><![endif]-->
+       
+       <style type="text/css" media="all"></style>
+<link rel="stylesheet" type="text/css" href="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/style000.css" />
+<style type="text/css" media="all"></style>
+<!--[if IE]><style type="text/css" media="screen">
+pre {
+       overflow-x:auto;
+       padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
+}
+</style>
+<![endif]-->
+
+
+<meta name="foswiki.TWISTYANIMATIONSPEED" content="fast" /><!--TWISTYPLUGIN::META-->
+<script type="text/javascript" src="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/strikeon.js"></script><!--JavascriptFiles/strikeone-->
+<style type="text/css" media="all">
+.foswikiTable {border-width:1px}
+.foswikiTable .tableSortIcon img {padding-left:.3em; vertical-align:text-bottom}
+.foswikiTable td {padding:3px; padding:3px; vertical-align:top}
+.foswikiTable th {padding:3px; border-style:none solid; padding:3px; vertical-align:top; background-color:#99cccc; color:black}
+.foswikiTable th a:link {color:black}
+.foswikiTable th a:visited {color:black}
+.foswikiTable th a:hover {color:black; background-color:#99cccc}
+.foswikiTable th.foswikiSortedCol {background-color:#c4c1ba}
+.foswikiTable tr.foswikiTableRowdataBg0 td {background-color:#c6d6f5}
+.foswikiTable tr.foswikiTableRowdataBg0 td.foswikiSortedCol {background-color:#f7f7f6}
+.foswikiTable tr.foswikiTableRowdataBg1 td {background-color:#d6e6f5}
+.foswikiTable tr.foswikiTableRowdataBg1 td.foswikiSortedCol {background-color:#f0f0ee}
+</style><!--TABLEPLUGIN_default-->
+<meta name="foswiki.PUBURL" content="http://www.rockbox.org/wiki/pub" /> <!-- PUBURL -->
+<meta name="foswiki.PUBURLPATH" content="/wiki/pub" /> <!-- PUBURLPATH -->
+<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
+<meta name="foswiki.SCRIPTURL" content="http://www.rockbox.org/wiki/bin" /> <!-- SCRIPTURL -->
+<meta name="foswiki.SCRIPTURLPATH" content="/wiki/bin" /> <!-- SCRIPTURLPATH -->
+<meta name="foswiki.SERVERTIME" content="18%20Apr%202011%20-%2012:23" /> <!-- SERVERTIME -->
+<meta name="foswiki.SKIN" content="rockbox" /> <!-- SKIN -->
+<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
+<meta name="foswiki.TOPIC" content="SbFileFormat" /> <!-- TOPIC -->
+<meta name="foswiki.USERNAME" content="guest" /> <!-- USERNAME -->
+<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
+<meta name="foswiki.WEB" content="Main" /> <!-- WEB -->
+<meta name="foswiki.WIKINAME" content="WikiGuest" /> <!-- WIKINAME -->
+<meta name="foswiki.WIKIUSERNAME" content="Main.WikiGuest" /> <!-- WIKIUSERNAME -->
+<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
+<script type='text/javascript' src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/jquery-1.js'></script><!--JQUERYPLUGIN-->
+<script type='text/javascript' src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/jquery00.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
+<script type='text/javascript' src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/jquery01.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
+</head>
+<body class=""><div class="foswikiPage">
+<a name="PageTop"></a> 
+<body>
+<table border=0 cellpadding=7 cellspacing=0>
+<tr valign="top">
+<td bgcolor="#6887bb" valign="top" rowspan=7 class='leftmenu'>
+<br>
+<div align="center"><a href="http://www.rockbox.org/">
+<img src="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/rockbox1.png" width=99 height=30 border=0 alt="Rockbox.org home"></a>
+</div>
+<div style="margin-top:20px">
+<div class="submenu">
+Downloads
+</div>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/package0.png' align='top'> <a class="menulink" href="http://www.rockbox.org/download/">releases</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/bomb0000.png' align='top'> <a class="menulink" href="http://build.rockbox.org/">current build</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/style000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/wiki/RockboxExtras">extras</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/palette0.png' align='top'> <a class="menulink" href="http://themes.rockbox.org/">themes</a>
+<div class="submenu">
+Documentation
+</div>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/help0000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/wiki/GeneralFAQ">FAQ</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/page_whi.png' align='top'> <a class="menulink" href="http://www.rockbox.org/manual.shtml">manual</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/applicat.png' align='top'> <a class="menulink" href="http://www.rockbox.org/wiki/">wiki</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/book_ope.png' align='top'> <a class="menulink" href="http://www.rockbox.org/wiki/DocsIndex">docs index</a>
+<div class="submenu">
+Support
+</div>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/email000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/mail/">mailing lists</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/group000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/irc/">IRC</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/comment_.png' align='top'> <a class="menulink" href="http://forums.rockbox.org/">forums</a>
+<div class="submenu">
+Tracker
+</div>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/bug00000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/tracker/index.php?type=2">bugs</a><br>
+<img width=16 height=16 src='SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/brick000.png' align='top'> <a class="menulink" href="http://www.rockbox.org/tracker/index.php?type=4">patches</a><br>
+<div class="submenu">
+Search
+</div>
+<form id="fsform" action="http://www.rockbox.org/tracker/index.php" method="get" onSubmit="return fsstrip();">
+<input id="taskid" name="show_task" type="text" size="10" maxlength="10" accesskey="t"><br>
+<input class="mainbutton" type="submit" value="Flyspray #">
+</form>
+<br>
+<form action="http://www.google.com/search">
+<input name=as_q size=10><br>
+<input value="Web pages" type=submit>
+<input type=hidden name=as_sitesearch value="www.rockbox.org">
+</form>
+<p>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="StrikeOne.submit(this)"><input type='hidden' name='validation_key' value='?e1087e821bf0b5eea36fb41d81f85ad3' />
+<input type="hidden" name="cmd" value="_s-xclick">
+<input type="hidden" name="hosted_button_id" value="585407">
+<input type="image" src="SbFileFormat%20%3C%20Main%20%3C%20Wiki_files/paypal-d.gif" border="0" name="submit" alt="">
+</form>
+</div>
+</td>
+<td bgcolor="#6887bb" width=100%><div class="foswikiMain">
+<div class="wikihead">
+       <form name="main" action="http://www.rockbox.org/wiki/Main/SbFileFormat"> <span style="float:right"> <a href="http://www.rockbox.org/wiki/WebSearch">Search</a> | Go  <input type="text" name="topic" size="10" /> </span></form>
+       <a href="http://www.rockbox.org/wiki/WebHome">Wiki</a>
+                &gt; <a href="http://www.rockbox.org/wiki/Main/WebHome">Main</a>
+                &gt; 
+                <font size="+1"><b>SbFileFormat</b>   </font>
+ </div>
+</td></tr><tr><td valign="top" class="rightcontent"><div class="foswikiContentHeader"></div>
+<div class="foswikiTopicText"><a name="foswikiTOC"></a><div class="foswikiToc"> <ul>
+<li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Global_file_format"> Global file format </a> <ul>
+<li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#File_header"> File header </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Chunk_header"> Chunk header </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Encryption_data"> Encryption data </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Final_signature"> Final signature </a>
+</li></ul> 
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Chunk_bodies"> Chunk bodies </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Boot_section_format"> Boot section format </a> <ul>
+<li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Nop_instruction"> Nop instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Tag_instruction"> Tag instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Load_instruction"> Load instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Fill_instruction"> Fill instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Jump_instruction"> Jump instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Call_instruction"> Call instruction </a>
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Mode_instruction"> Mode instruction </a>
+</li></ul> 
+</li> <li> <a href="http://www.rockbox.org/wiki/Main/SbFileFormat#Encryption_notes"> Encryption notes </a>
+</li></ul> 
+</div>
+<p />
+The sb format is used by most STMP chips to load the firmware. The format is different for different generations of chips. This page describes the sb format used by STMP 36xx and 37xx. It is used for example by Fuze+ (<a href="http://www.rockbox.org/wiki/SansaFuzePlus">SansaFuzePlus</a>). One can produce such a file using the elftosb2 program which can be found <a href="http://lyre.svn.sourceforge.net/viewvc/lyre/propendous-imx233_board/firmware/bootstream-1.0/elftosb2/elftosb2" target="_top">at Lyre project svn</a>. The Rockbox svn also contains an open source implementation of elftosb2 (see /utils/sbtools/). The sbtoelf utility which can be found in the Rockbox svn (next to elftosb) is able to decrypt and extract data from a .sb file, and can repack the code in several ELF files.
+<p />
+Format of the sb file.
+Everything is coded as little endian, even strings, except the "STMP" file magic.
+<p />
+<p />
+<h2><a name="Global_file_format"></a>  Global file format </h2>
+The .sb file consists of several blocks as show below
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=1;up=0#sorted_table" title="Sort by this column">block</a> </th>
+                       <th class="foswikiTableCol1 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=1;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> file header </td>
+                       <td class="foswikiTableCol1 foswikiLastCol"> basic file header containing version info and sizes of the rest of the file </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> chunk headers </td>
+                       <td class="foswikiTableCol1 foswikiLastCol"> this is a list of actual data blocks in the file </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> encryption data </td>
+                       <td class="foswikiTableCol1 foswikiLastCol"> not much known about this </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> chunk bodies </td>
+                       <td class="foswikiTableCol1 foswikiLastCol"> the actual data, aligned to blocks of 16 bytes </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> file signature </td>
+                       <td class="foswikiTableCol1 foswikiLastCol foswikiLast"> encrypted SHA-1 sum of the whole encrypted file, padded with random data </td>
+               </tr>
+       </tbody></table>
+<p />
+<h3><a name="File_header"></a>  File header </h3>
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=2;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=2;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=2;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=2;up=0#sorted_table" title="Sort by this column">meaning</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x00 </td>
+                       <td align="right" class="foswikiTableCol1"> 0x14 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> SHA-1 sum of the rest of the file header (from 0x14-0x5F) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x14 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> "STMP" </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> file magic </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x18 </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 01 01 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Major and minor versions of the format </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1A </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 00 01 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> a set of flags </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1C </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> total length of file in 16-byte units </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x20 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> 0C 00 00 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> the elftosb2 program sets this to field (0x2A) + 2 x nr_keys = 6 + nr_chunks + 2 x nr_keys; probably the total size of headers (header+chunks+encryption data). Apparently this is the first boot tag block </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x24 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> 00 00 00 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> First bootable section id (always 0 ?) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x28 </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 01 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> number of encryption keys </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2A </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0A 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> the elftosb2 program sets this to field (0x2C) + field (0x30) x field (0x2E) = 6+nr_chunks all the time; probably the offset to encryption data </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2C </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 06 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> the elftosb2 program hardwires this field to 6 </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2E </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 04 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> number of following chunk headers </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x30 </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 01 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> size of a chunk header in units of 16 bytes </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x32 </td>
+                       <td align="right" class="foswikiTableCol1"> 6 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> the elftosb2 program puts a random number here, however the fuze+ file has "sgtl" (= short for sigmatel?) at 0x34) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x38 </td>
+                       <td align="right" class="foswikiTableCol1"> 8 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> creation time in microseconds since 2000/1/1 00:00:00 </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x40 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> product major version </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x44 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> product minor version </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x48 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> product sub version </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4C </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> component major version </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x50 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> component minor version </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x54 </td>
+                       <td align="right" class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> component sub version </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x58 </td>
+                       <td align="right" class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 00 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> drive tag </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0x5A </td>
+                       <td align="right" class="foswikiTableCol1 foswikiLast"> 6 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> the elftosb2 program puts a random number here </td>
+               </tr>
+       </tbody></table>
+<p />
+The set of flags is as follows: bit 0 is display progress, bit 1 is verbose progress.
+<p />
+<h3><a name="Chunk_header"></a>  Chunk header </h3>
+<p />
+Chunk headers start at offset 0x60.
+Each chunk header is 16 bytes long and has the following structure. There are two types of chunks: boot sections and data sections.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=3;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=3;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=3;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=3;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> "host" </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> chunk name </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> chunk offset in file in 16-byte units </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x8 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> chunk size in 16-byte units </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0xC </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 4 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> 01 00 00 00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> flags: bit 0 is bootable, bit 1 is cleartext (not encrypted) </td>
+               </tr>
+       </tbody></table>
+<p />
+See section about chunk data for more information about the content.
+<p />
+<h3><a name="Encryption_data"></a>  Encryption data </h3>
+The elftosb2 program uses AES-128 in CBC mode. Internally, all important data is encrypted using a random key that will denote PK.
+This random key PK is written in an encrypted form in the sb file using the keys specified to the elftosb2 program.
+At this place of the file, the elftosb2 program outputs one 32 bytes value per key:
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=4;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=4;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=4;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=4;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 16 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> this is the CBC-MAC of the header plus all the chunk headers (using the ith key if this is the ith key block, and using a 0 as IV) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0x10 </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 16 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> this is PK encrypted with the ith key using the first 16-bytes of the sb header as IV (ie part of SHA-1 signature) </td>
+               </tr>
+       </tbody></table>
+<p />
+Notice that if there are several keys, it is possible to cross-check PK with the several keys.
+<p />
+<h3><a name="Final_signature"></a>  Final signature </h3>
+<p />
+The final signature is a 32-bytes block. When decrypted using PK, it consists of the SHA-1 of the whole file (ie the encrypted file) except the last 32-bytes (of course); since the SHA-1 is 20-bytes long, it is padded with random data.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=5;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=5;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=5;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=5;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 20 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> SHA-1 of the whole file except the last 32 bytes </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0x14 </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 12 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> random data </td>
+               </tr>
+       </tbody></table>
+<p />
+<h2><a name="Chunk_bodies"></a>  Chunk bodies </h2>
+<p />
+In the fuze+ firmware file, the following chunks were found: <ul>
+<li> a chunk consisting of just NULL characters
+</li> <li> "host", encrypted
+</li> <li> "play", encrypted
+</li> <li> "rsrc", plain
+</li></ul> 
+<p />
+It is suspected that only boot sections are encrypted.
+A section is encrypted in AES-128 CBC mode using the PK key (see encryption data section) and the first 16-bytes of the sb header as IV (ie part of SHA-1 signature).
+The boot sections have a special format (when decrypted) to explain where load the instructions, which part of memory to fill and how to call functions. The format of the data sections has not been investigated.
+<p />
+<h2><a name="Boot_section_format"></a>  Boot section format </h2>
+<p />
+A boot section consist of a list of instruction. Each instruction starts with a 4-byte header with indicates what type of instruction it is. All values are in little-endian. All instruction are of size 16-bytes even, unused bytes are set to zero.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=6;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=6;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=6;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=6;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum (see explaination below) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x06 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0x2 </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 2 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> Always zero except for tag command </td>
+               </tr>
+       </tbody></table>
+<p />
+The checksum is computed this way. This is 90 plus the sum of all bytes of the instruction except the first one (to avoid circular reference), modulo 2^8=256. Here is an example:
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=7;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=7;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=7;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=7;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x4F </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x02 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode (Load) </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> 0x08048134 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Loading address </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x8 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> 0x00000013 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Length of the data (in bytes) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0xC </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 4 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> 0x099b99e2 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> CRC of the data </td>
+               </tr>
+       </tbody></table>
+<p />
+We check that 0x4F = 90+(0x2+0x00+0x00)+(0x08+0x04+0x81+0x34)+(0x00+0x00+0x00+0x13)+(0x09+0x9b+0x99+0xe2)
+<p />
+<h3><a name="Nop_instruction"></a>  Nop instruction </h3>
+<p />
+The nop instruction terminates the boot section (it seems), it only consists of the header with opcode 0.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=8;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=8;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=8;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=8;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x00 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0x2 </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 2 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> Always zero </td>
+               </tr>
+       </tbody></table>
+<p />
+<h3><a name="Tag_instruction"></a>  Tag instruction </h3>
+<p />
+The tag instruction has the opcode 1 and has unknown format and semantics.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=9;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=9;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=9;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=9;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x01 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Unknown </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> ? </td>
+                       <td class="foswikiTableCol1 foswikiLast"> ? </td>
+                       <td class="foswikiTableCol2 foswikiLast"> ? </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> ? </td>
+               </tr>
+       </tbody></table>
+<p />
+<h3><a name="Load_instruction"></a>  Load instruction </h3>
+<p />
+The load instruction has the  opcode 2 and is of variable size. It starts with a 16-byte header followed by some data. The header indicates the size of the data, the address at which to load it and include a CRC checksum.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=10;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=10;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=10;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=10;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x02 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Loading address </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x8 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Length of the data (in bytes) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0xC </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 4 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> CRC of the data (see explaination below) </td>
+               </tr>
+       </tbody></table>
+<p />
+The data is padded so next instruction will be aligned on a 16-byte boundary. The padding data is random and IS TAKEN INTO ACCOUNT in the CRC. The CRC is a classical CRC32 algorithm, the tables used can be found in the SVN.
+<p />
+<h3><a name="Fill_instruction"></a>  Fill instruction </h3>
+<p />
+The fill instruction has the opcode 3 and is of fixed size (16-bytes). The instruction indicates the size of memory range to fill, the starting address and the pattern.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=11;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=11;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=11;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=11;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x03 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Filling address </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x8 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Length of the area to fill (in bytes ?) </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0xC </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 4 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> Pattern </td>
+               </tr>
+       </tbody></table>
+<p />
+<h3><a name="Jump_instruction"></a>  Jump instruction </h3>
+<p />
+The jump instruction is the same as the call instruction (except for the semantics of course) and has opcode 4.
+<p />
+<h3><a name="Call_instruction"></a>  Call instruction </h3>
+<p />
+The call instruction has opcode and has a calling address as well as a argument for the function.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=12;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=12;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=12;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=12;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x05 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x4 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Calling address </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x8 </td>
+                       <td class="foswikiTableCol1"> 4 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> 0xC </td>
+                       <td class="foswikiTableCol1 foswikiLast"> 4 </td>
+                       <td class="foswikiTableCol2 foswikiLast"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> Argument </td>
+               </tr>
+       </tbody></table>
+<p />
+<h3><a name="Mode_instruction"></a>  Mode instruction </h3>
+<p />
+The mode instruction has opcode 6 and has unknown format and semantics.
+<p />
+<table cellpadding="3px" class="foswikiTable" rules="none" border="1">
+       <thead>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=0;table=13;up=0#sorted_table" title="Sort by this column">offset</a> </th>
+                       <th class="foswikiTableCol1"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=1;table=13;up=0#sorted_table" title="Sort by this column">length</a> </th>
+                       <th class="foswikiTableCol2"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=2;table=13;up=0#sorted_table" title="Sort by this column">example</a> </th>
+                       <th class="foswikiTableCol3 foswikiLastCol"> <a rel="nofollow" href="http://www.rockbox.org/wiki/Main/SbFileFormat?sortcol=3;table=13;up=0#sorted_table" title="Sort by this column">description</a> </th>
+               </tr>
+       </thead>
+       <tbody>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x0 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> - </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> checksum </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x1 </td>
+                       <td class="foswikiTableCol1"> 1 </td>
+                       <td class="foswikiTableCol2"> 0x06 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Opcode </td>
+               </tr>
+               <tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
+                       <td class="foswikiTableCol0 foswikiFirstCol"> 0x2 </td>
+                       <td class="foswikiTableCol1"> 2 </td>
+                       <td class="foswikiTableCol2"> 0x0000 </td>
+                       <td class="foswikiTableCol3 foswikiLastCol"> Always zero </td>
+               </tr>
+               <tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
+                       <td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> ? </td>
+                       <td class="foswikiTableCol1 foswikiLast"> ? </td>
+                       <td class="foswikiTableCol2 foswikiLast"> ? </td>
+                       <td class="foswikiTableCol3 foswikiLastCol foswikiLast"> ? </td>
+               </tr>
+       </tbody></table>
+<p />
+<h2><a name="Encryption_notes"></a>  Encryption notes </h2>
+<p />
+See <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation" target="_top">Block ciphers on wikipedia</a> for more information on CBC mode.
+See <a href="http://en.wikipedia.org/wiki/CBC-MAC" target="_top">CBC-MAC on wikipedia</a> for more information on CBC-MAC.
+When nothing is said, it means the IV (Initialisation Vector) is taken to be 0.
+<p />
+-- <a href="http://www.rockbox.org/wiki/AmauryPouly">AmauryPouly</a> - 26 Nov 2010
+<a name="TopicEnd"></a>
+</div>
+<div class="foswikiContentFooter"></div><div class="foswikiTopicInfo" style="background:#d6e6f5 ">
+<div class="foswikiTopicActions" ><span class="foswikiRequiresChangePermission"><a href='http://www.rockbox.org/wiki/bin/edit/Main/SbFileFormat?t=1303122212;nowysiwyg=1' rel='nofollow' title='Edit this topic text' accesskey='e'><span class='foswikiAccessKey'>E</span>dit</a></span><span class="foswikiSeparator"> | </span><span class="foswikiRequiresChangePermission"><a href='http://www.rockbox.org/wiki/bin/attach/Main/SbFileFormat' rel='nofollow' title='Attach an image or document to this topic' accesskey='a'><span class='foswikiAccessKey'>A</span>ttach</a></span><span class="foswikiSeparator"> | </span><span><a href='http://www.rockbox.org/wiki/Main/SbFileFormat?cover=print' rel='nofollow' title='Printable version of this topic' accesskey='p'><span class='foswikiAccessKey'>P</span>rint version</a></span><span class="foswikiSeparator"> | </span><span><span class="foswikiRequiresChangePermission"><a href='http://www.rockbox.org/wiki/bin/oops/Main/SbFileFormat?template=oopshistory' rel='nofollow' title='View total topic history' accesskey='h'><span class='foswikiAccessKey'>H</span>istory</a></span>: r14&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/bin/compare/Main/SbFileFormat?rev1=13;rev2=14">&lt;</a>&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/SbFileFormat?rev=13">r13</a>&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/bin/compare/Main/SbFileFormat?rev1=12;rev2=13">&lt;</a>&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/SbFileFormat?rev=12">r12</a>&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/bin/compare/Main/SbFileFormat?rev1=11;rev2=12">&lt;</a>&nbsp;<a rel="nofollow" href="http://www.rockbox.org/wiki/SbFileFormat?rev=11">r11</a></span><span class="foswikiSeparator"> | </span><span><a href='http://www.rockbox.org/wiki/Main/SbFileFormat?template=backlinksweb' rel='nofollow' title='Search the Main Web for topics that link to here' accesskey='b'><span class='foswikiAccessKey'>B</span>acklinks</a></span><span class="foswikiSeparator"> | </span><span><a href='http://www.rockbox.org/wiki/Main/SbFileFormat?raw=on' rel='nofollow' title='View without formatting' accesskey='v'><span class='foswikiAccessKey'>V</span>iew wiki text</a></span><span class="foswikiSeparator"> | </span><span><a href='http://www.rockbox.org/wiki/Main/SbFileFormat?template=more&amp;maxrev=14&amp;currrev=14' rel='nofollow' title='Delete or rename this topic; set parent topic; view and compare revisions' accesskey='m'><span class='foswikiAccessKey'>M</span>ore topic actions</a></span></div></div><div class="foswikiRevInfo">r14 - 17 Apr 2011 - 23:31:55 - <a href="http://www.rockbox.org/wiki/AmauryPouly">AmauryPouly</a></div>
+<a name="PageBottom"></a>
+<div class="foswikiFooterNote"></div><div class="foswikiCopyright">Copyright Â© by the contributing authors. </div></div></div>
+</body></html>
+<!-- This document saved from http://www.rockbox.org/wiki/SbFileFormat -->
diff --git a/docs/notizen/iMX28_SB_Description.pdf b/docs/notizen/iMX28_SB_Description.pdf
new file mode 100644 (file)
index 0000000..1ebbd79
Binary files /dev/null and b/docs/notizen/iMX28_SB_Description.pdf differ
diff --git a/docs/notizen/imx28.rst b/docs/notizen/imx28.rst
new file mode 100644 (file)
index 0000000..88db98c
--- /dev/null
@@ -0,0 +1,192 @@
+H. Hoegl, 2010-11-22 
+
+Freescale i.MX28
+
+2011-07-20 
+
+ * Pengutronix Kernel konfiguriert und kompiliert. Der Crosscompiler in /opt/freescale ist beim 2.6.35 Download von Freescale dabei als RPM Paket.
+
+   Kernel Version:
+       commit 85e2efbb1db9a18d218006706d6e4fbeb0216213
+       Author: Linus Torvalds <torvalds@linux-foundation.org>
+       Date:   Tue Feb 15 19:23:45 2011 -0800
+
+    Linux 2.6.38-rc5
+
+   export PATH=$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/
+
+   make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
+   make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- 
+
+   ...
+   
+     CC [M]  drivers/scsi/osd/osd_initiator.o
+     drivers/scsi/osd/osd_initiator.c: In function 'build_test':
+     drivers/scsi/osd/osd_initiator.c:67: error: size of array 'type name' is negative
+     drivers/scsi/osd/osd_initiator.c:68: error: size of array 'type name' is negative
+
+    Entferne SCSI/OSD Option aus menuconfig.
+
+    ---
+
+    drivers/staging/comedi/drivers.c: In function 'comedi_buf_alloc':
+    drivers/staging/comedi/drivers.c:505: error: 'PAGE_KERNEL_NOCACHE' undeclared (first use in this function)
+    drivers/staging/comedi/drivers.c:505: error: (Each undeclared identifier is reported only once
+    drivers/staging/comedi/drivers.c:505: error: for each function it appears in.)
+
+   -> disabled comedi staging driver
+
+   ---
+
+     CC [M]  drivers/staging/rt2870/sta_ioctl.o
+     drivers/staging/rt2870/../rt2860/sta_ioctl.c: In function 'rt_ioctl_iwaplist':
+     drivers/staging/rt2870/../rt2860/sta_ioctl.c:721: error: unrecognizable insn:
+     (insn 305 293 154 6 drivers/staging/rt2870/../rt2860/sta_ioctl.c:712 (set (reg:SI 3 r3)
+             (post_modify:SI (reg/f:SI 10 sl [orig:162 ivtmp.1419 ] [162])
+                         (plus:SI (reg/f:SI 10 sl [orig:162 ivtmp.1419 ] [162])
+                                         (const_int 1556 [0x614])))) -1 (nil)
+                                             (nil))
+                                             drivers/staging/rt2870/../rt2860/sta_ioctl.c:721: internal compiler error: in extract_insn, at recog.c:2084
+
+    -> disabled all staging drivers
+
+   ---
+
+   Nun kompiliert Kernel bis zum Ende.
+
+   hhoegl@aspire1:~/linux-imx28/linux-2.6$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-  uImage
+  CHK     include/linux/version.h
+  CHK     include/generated/utsrelease.h
+make[1]: `include/generated/mach-types.h' is up to date.
+  CALL    scripts/checksyscalls.sh
+  CHK     include/generated/compile.h
+  Kernel: arch/arm/boot/Image is ready
+  SHIPPED arch/arm/boot/compressed/lib1funcs.S
+  AS      arch/arm/boot/compressed/lib1funcs.o
+  LD      arch/arm/boot/compressed/vmlinux
+  OBJCOPY arch/arm/boot/zImage
+  Kernel: arch/arm/boot/zImage is ready
+  UIMAGE  arch/arm/boot/uImage
+Image Name:   Linux-2.6.38-rc5+
+Created:      Thu Jul 21 07:55:13 2011
+Image Type:   ARM Linux Kernel Image (uncompressed)
+Data Size:    3058492 Bytes = 2986.81 kB = 2.92 MB
+Load Address: 0x40008000
+Entry Point:  0x40008000
+  Image arch/arm/boot/uImage is ready
+
+
+
+
+2011-06-06 
+
+ * i.MX28 PWM Driver
+   linux-2.6/arch/arm/plat-mxc/pwm.c
+
+ * iMX28 | SYSFS and GPIO
+   http://forums.freescale.com/t5/i-MX-Microprocessors/iMX28-SYSFS-and-GPIO/td-p/60938
+
+ * http://www.mailrepository.com/linux-mtd.lists.infradead.org/msg/3647601/
+
+  ARM: mxs: add GPMI device for imx23/imx28
+
+   arch/arm/mach-mxs/clock-mx23.c                  |    1 +
+   arch/arm/mach-mxs/clock-mx28.c                  |    1 +
+   arch/arm/mach-mxs/devices-mx23.h                |    4 +
+   arch/arm/mach-mxs/devices-mx28.h                |    4 +
+   arch/arm/mach-mxs/devices/Kconfig               |    3 +
+   arch/arm/mach-mxs/devices/Makefile              |    1 +
+   arch/arm/mach-mxs/devices/platform-gpmi.c       |   82 ++++++++++++++++++++++
+   arch/arm/mach-mxs/include/mach/devices-common.h |    6 ++
+   arch/arm/mach-mxs/mach-mx23evk.c                |   28 ++++++++
+   arch/arm/mach-mxs/mach-mx28evk.c        
+
+
+2011-04-18 
+
+ * http://imxcommunity.org/
+   http://imxcommunity.org/group/imx28andimx28evk   
+
+
+2011-04-17 
+
+ * Patrick Bellasi, Linux Board Porting, how to add Linux support for
+   a new board (KiCad, SAM9260), 46 Folien, 2009.
+   http://www.slideshare.net/derkling/linux-porting-to-a-custom-board
+
+2011-04-13 
+
+ * Getting Started Guide for Freescale i.MX28 EVK (Timesys)
+   https://linuxlink.timesys.com/docs/gsg/i.MX28EVK
+
+2010-11-28 
+
+ * LTIB GPP Upload eines Paketes: 
+       http://bitshrine.org/cgi-bin/gpp_upload.cgi
+
+   LTIB Projekt
+
+       savannah.nongnu.org/projects/ltib
+
+   LTIB Mailing Liste
+
+         http://lists.gnu.org/archive/html/ltib/
+
+     Faq
+
+        http://bitshrine.org/ltib/documentation-LtibFaq
+
+   Pakete (wieso leer?)
+    
+      http://bitshrine.org/gpp/      
+
+   i.MX Foren
+
+            http://forums.freescale.com/t5/i-MX-Microprocessors/bd-p/IMXCOMM
+
+Im aktuellen Mainstream Kernel ist schon imx27 drin (Juergen Beisert, 
+Pengutronix). Das geht sicher auch fuer i.mx28, oder?
+
+    hhoegl@aspire1:~/linux-2.6.36.1/arch/arm/mach-imx$ ls
+    clock-imx1.c                include           mach-scb9328.c
+    clock-imx21.c               Kconfig           Makefile
+    clock-imx27.c               mach-cpuimx27.c   Makefile.boot
+    cpu-imx27.c                 mach-imx27lite.c  mm-imx1.c
+    devices.c                   mach-mx1ads.c     mm-imx21.c
+    devices.h                   mach-mx21ads.c    mm-imx27.c
+    devices-imx1.h              mach-mx27_3ds.c   mx1-camera-fiq-ksym.c
+    devices-imx21.h             mach-mx27ads.c    mx1-camera-fiq.S
+    devices-imx27.h             mach-mxt_td60.c   pcm970-baseboard.c
+    dma-v1.c                    mach-pca100.c     pm-imx27.c
+    eukrea_mbimx27-baseboard.c  mach-pcm038.c
+         
+
+2010-11-22
+
+ * Distributionen
+    - ltib
+    - ptxdist
+    - poky (poky-laverne-4.0.tar.bz2)
+
+ * Pengutronix macht Support fuer i.MX im mainstream kernel
+
+ * Linutronix bietet fuer Garz und Fricke Boards auch ein BSP an
+   http://www.garz-fricke.com
+
+ * Freies Projekt: http://opencircuits.com/Linuxstamp_mx27 (OpenOCD,
+   Redboot)
+
+     ecos enthaelt RedBoot fuer i.MX27: ECOS_REPOSITORY/hal/arm/mx27/
+
+ * ftp://ftp.phytec.de/pub/Products/phyCORE-iMX27/Linux/PD10.1.1/
+   OSELAS.BSP-Phytec-phyCORE-i.MX27-PD10.1.1.tar.gz
+
+   OSELAS BSP von Pengutronix (mit barebox), kann mit Ptxdist 
+     kompiliert werden.
+
+   Dokument mit 48 Seiten: OSELAS.BSP-Phytec-phyCORE-i.MX27-Quickstart.pdf
+
+
+.. vim: et sw=4 ts=4
diff --git a/docs/notizen/ltib.txt b/docs/notizen/ltib.txt
new file mode 100644 (file)
index 0000000..04dc9cd
--- /dev/null
@@ -0,0 +1,622 @@
+H. Hoegl, 2011-04-16 
+--------------------
+
+Kompiliere Freescale L2.6.35... 
+aus Debian 6.0 (Squeeze)
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ./ltib
+
+ltib [-m <mode>] [options....]
+    Where:
+        --mode|m
+          Where mode is either:
+            prep        just prep the package
+            scbuild     rpmbuild -bc --short-circuit
+            scinstall   rpmbuild -bi --short-circuit
+            scdeploy    does an scinstall followed by an install to the rootfs
+            patchmerge  generate and merge a patch (requires -p <pkg>)
+            clean       clean/uninstall target packages
+            distclean   full cleanup, removes nearly everything
+            listpkgs    list packages (alphanumeric)
+            listpkgseula list package names and licenses
+            listpkgstw  list packages in twiki format
+            listpkgscsv list packages in a format for import into spreadsheet
+            release     make a binary release iso image
+            trelease    make a non-distributable test iso release
+            config      configure selected platform (no build)
+            selectype   sub-platform selection (no build)
+            shell       enter ltib shell mode (sets up spoofing etc)
+            addsrpms    import srpms into ltib (semi-automatic)
+        --rootn|R     : Root context number (0 is the primary and implicit)
+        --pkg|p       : operate on this package only
+        --configure|c : run the interactive configuration and build
+        --selectype   : run the sub-platform configuration and build
+        --preconfig   : configuration file to build from (defaults to .config)
+        --profile     : profile file.  This is used to select an alternate
+                        set of userspace packages, this is saved and used
+                        on later runs of ltib (e.g config/profiles/max.config)
+        --rcfile|r <f>: use this resource file
+        --batch|b     : batch mode, assume yes to all questions
+        --force|f     : force rebuilds even if they are up to date
+        --reinstall|e : re-install rpms (but don't force rebuild)
+        --erase|E     : remove (erase) rpm
+        --nodeps|n    : turn off install/uninstall dependency checks
+        --conflicts|k : don't force install rpms that have file conflicts
+        --keepsrpms|s : keep the srpms after the build (deleted by default)
+        --verbose|v   : more output
+        --dry-run|d   : mostly a dry run (calls to system are just echos)
+        --continue|C  : try to continue on package build errors (autobuilds)
+        --version|V   : print the application version and quit
+        --noredir|N   : do not redirect any output
+        --deploy|D    : run the deploy scripts even if build is up to date
+        --no-deploy   : disabled deployment (even with -p <pkg>
+        --dlonly      : just download the packages only
+        --dltest      : test that the BSP's packages are available
+        --external    : check against external staging repositories
+        --leavesrc|l  : leave the sources unpacked (only valid for pkg mode)
+        --sticky      : Make the selected root number sticky
+        --no-sticky   : Remove root stickiness
+        --hostcf      : (re)configure/build/install the host support package set
+        --enabled     : use with package listings
+        --ignorelock  : use if you really want to ignore any locks (careful!)
+        --fullbsp     : used with -m release to copy additional content
+        --distmap     : used with -m release to copy specical packages into ISO
+        --no-sudo     : don't check sudo, work around for broken sudo (fc9)
+        --help|h      : help on usage
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ 
+
+
+Fehler beim Kompilieren von (fehlt: uuid.h)
+/opt/freescale/ltib/usr/src/rpm/BUILD/mtd-utils
+
+Loesche Verzeichnis mtd-utils.
+
+Loesung: apt-get install uuid-dev
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ du -sk
+779984 .
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ find . -name *.rpm -print
+./.tc_test_gcc-4.4.4-glibc-2.11.1-multilib-1.0-1.i386.rpm
+./rpm/RPMS/arm/busybox-1.15.0-1.arm.rpm
+./rpm/RPMS/arm/kobs-ng-10.12.01-1.arm.rpm
+./rpm/RPMS/arm/fake-provides-1.0-5.arm.rpm
+./rpm/RPMS/arm/hotplug-2004_03_29-3.arm.rpm
+./rpm/RPMS/arm/skell-1.18-2.arm.rpm
+./rpm/RPMS/arm/udev-117-5.arm.rpm
+./rpm/RPMS/arm/kernel-2.6.35.3-imx_10.12.01.arm.rpm
+./rpm/RPMS/arm/modeps-1.0-1.arm.rpm
+./rpm/RPMS/arm/imx-bootlets-src-10.12.01-1.arm.rpm
+./rpm/RPMS/arm/base_libs-1.2-1.arm.rpm
+./rpm/RPMS/arm/sysconfig-1.2-5.arm.rpm
+./rpm/RPMS/arm/u-boot-2009.08-imx_10.12.01.arm.rpm
+./rpm/RPMS/arm/merge-0.1-1.arm.rpm
+
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls rpm/
+BUILD  RPMS  SOURCES  SPECS  SRPMS
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls rpm/RPMS/arm/
+base_libs-1.2-1.arm.rpm               merge-0.1-1.arm.rpm
+busybox-1.15.0-1.arm.rpm              modeps-1.0-1.arm.rpm
+fake-provides-1.0-5.arm.rpm           skell-1.18-2.arm.rpm
+hotplug-2004_03_29-3.arm.rpm          sysconfig-1.2-5.arm.rpm
+imx-bootlets-src-10.12.01-1.arm.rpm   u-boot-2009.08-imx_10.12.01.arm.rpm
+kernel-2.6.35.3-imx_10.12.01.arm.rpm  udev-117-5.arm.rpm
+kobs-ng-10.12.01-1.arm.rpm
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib/rpm$ ls SOURCES/
+linux-2.6.35.3-imx_10.12.01.bz2  linux-2.6.35.3.tar.bz2
+
+Linux From Scratch
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls dist/lfs-5.1/
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls doc/
+COPYING            LtibCreateNewTarget  LtibFreescaleSpecifics  LtibTodo
+index              LtibFaq              LtibInstall             wiki_style.css
+LtibBestPractices  LtibFaqPackages      LtibPackagePool
+LtibConvertPcsBsp  LtibFeatures         LtibReleaseProcess
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls bin/
+autobuild_ltib           geninitramfs     mk_max_config
+checkmd5                 listpkginfo      mk_pkg_results
+cvsmanifest              Ltibaddsrpms.pm  netinstall
+depmod.pl                ltib_install     setlocalversion
+device_genromfs_min.txt  Ltiblistpkgs.pm  spit_profile
+device_genromfs.txt      Ltibrelease.pm   splice_profile
+device_table_min.txt     Ltibutils.pm     stripall
+device_table.txt         maketar          ubifs_ubinize_tmpl.ini
+
+Was ist "elftosb"? (drei relevante Tools: elftosb, sbtool, keygen)
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ tmp/elftosb/opt/freescale/rootfs/i686/opt/freescale/ltib/usr/bin/elftosb  -h
+usage: elftosb [-?|--help] [-v|--version] [-f|--chip-family <family>]
+               [-c|--command <file>] [-o|--output <file>]
+               [-P|--product <version>] [-C|--component <version>]
+               [-k|--key <file>] [-z|--zero-key] [-D|--define <const>]
+               [-O|--option <option>] [-d|--debug] [-q|--quiet] [-V|--verbose]
+               [-p|--search-path <path>] files...
+
+
+Options:
+  -?/--help                    Show this help
+  -v/--version                 Display tool version
+  -f/--chip-family <family>    Select the chip family (default is 37xx)
+  -c/--command <file>          Use this command file
+  -o/--output <file>           Write output to this file
+  -p/--search-path <path>      Add a search path used to find input files
+  -P/--product <version        Set product version
+  -C/--component <version>     Set component version
+  -k/--key <file>              Add OTP key, enable encryption
+  -z/--zero-key                Add default key of all zeroes
+  -D/--define <const>=<int>    Define or override a constant value
+  -O/--option <name>=<value>   Set or override a processing option
+  -d/--debug                   Enable debug output
+  -q/--quiet                   Output only warnings and errors
+  -V/--verbose                 Print extra detailed log information
+
+
+Beispiel (pastebin):
+
+elftosb2/elftosb2 -V -z -c src/system_init_sb.db \
+            -o ./output/system_init_sb.bin
+Boot Section 0x00000000:
+       LOAD | addr=0x00000000 | len=0x00000038 | crc=0xe7665dd1
+       LOAD | addr=0x00000040 | len=0x000011a8 | crc=0x47c7f1f2
+       CALL | addr=0x00000000 | arg=0x00000000
+       LOAD | addr=0x00000000 | len=0x00000088 | crc=0x94de5ff6
+       FILL | addr=0x00000088 | len=0x00000800 | pattern=0x00000000
+       JUMP | addr=0x00000000 | arg=0x00000000
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib/tmp/elftosb/opt/freescale/rootfs/i686/opt/freescale/ltib/usr/bin$ ./sbtool  -h
+usage: sbtool [-?|--help] [-v|--version] [-k|--key <file>] [-z|--zero-key]
+              [-x|--extract <value>] [-b|--binary] [-d|--debug] [-q|--quiet]
+              [-V|--verbose] sb-file
+
+Options:
+  -?/--help                    Show this help
+  -v/--version                 Display tool version
+  -k/--key <file>              Add OTP key used for decryption
+  -z/--zero-key                Add default key of all zeroes
+  -x/--extract <index>         Extract section number <index>
+  -b/--binary                  Extract section data as binary
+  -d/--debug                   Enable debug output
+  -q/--quiet                   Output only warnings and errors
+  -V/--verbose                 Print extra detailed log information
+
+eescale/ltib/usr/bin$ ./keygen -h
+usage: keygen [-?|--help] [-v|--version] [-q|--quiet] [-V|--verbose]
+              [-n|--number <int>] key-files...
+
+Options:
+  -?/--help                    Show this help
+  -v/--version                 Display tool version
+  -q/--quiet                   Output only warnings and errors
+  -V/--verbose                 Print extra detailed log information
+  -n/--number <int>            Number of keys to generate per file (default=1)
+
+Der Quelltext von elftosb enthaelt einen Hinweis (ReadMe.txt):
+
+    The preferred way to work on elftosb and related tools is to use Xcode on
+    Mac OS X. The elftosb.xcodeproj directory is an Xcode project "file". It
+    has targets for elftosb, keygen, sbtool, and an aggregate target that
+    builds all of the above. The main reason to use Xcode is that the project
+    is set up so that the flex and bison input files are processed
+    automatically and the output files compiled.
+
+
+Das .sb Format ("safe boot format") hat irgendwas mit dem frueheren Hersteller
+der i.MX Bausteine zu tun, das war "Sigmatel". 
+
+Aha! Im iMX28 Reference Manual steht in Kapitel 12.5 "General Boot
+Procedure":
+
+    During ROM startup, the boot mode is sampled by boot pins, and then the ROM
+    loader will take control. The ROM loader first calls an initialization
+    function for the selected boot driver, which initializes the hardware port
+    and external device corresponding to the boot mode. After that, the loader
+    requests for the stream of boot image data from the driver. The boot image
+    contains a stream of boot commands, such as LOAD, LOAD DCD, SKIP, HAB JUMP
+    and HAB CALL commands.  The loader implemented in ROM code will interpret
+    these commands and load the boot image into memory and execute HAB JUMP or
+    HAB CALL command. In the case of HAB JUMP, the ROM will pass control to the
+    boot image and will leave the ROM context.
+
+Das ist eindeutig das .SB Format, auch wenn es im Manual nicht so genannt
+wird. Im Abschnitt 12.6 steht, wie das Program Image aussehen muss. Im Boot 
+ROM gibt es auch einen "high assurance boot" (HAB).   Auch in 12.8 
+Constructing Boot Image (SB Files) to Be Loaded by ROM steht was.
+
+
+In Zusammenhang mit dem SB Format steht auch das Paket
+imx-bootlets-src-10.12.01. Da ist low level Code drin fuer Power, Interrupt,
+SDRAM, LRADC (Touch) und aehnliches. Braucht man wahrscheinlich, wenn man ein
+SB Image booten will.  Darin gibt es linux.bd (ROM command script, oder auch
+.sb File genannt):
+
+----
+options {
+        driveTag = 0x00;
+        flags = 0x01;
+}
+sources {
+        power_prep="./power_prep/power_prep";
+        sdram_prep="./boot_prep/boot_prep";
+        linux_prep="./linux_prep/output-target/linux_prep";
+        zImage = "./zImage";
+}
+
+section (0) {
+
+        //----------------------------------------------------------
+        // Power Supply initialization
+        //----------------------------------------------------------
+        load power_prep;
+        call power_prep;
+
+        //----------------------------------------------------------
+        // SDRAM initialization
+        //----------------------------------------------------------
+        load sdram_prep;
+        call sdram_prep;
+
+        //----------------------------------------------------------
+        // Prepare to boot Linux
+        //----------------------------------------------------------
+        load linux_prep;
+        call linux_prep;
+
+        //----------------------------------------------------------
+        //  Load ans start Linux kernel
+        //----------------------------------------------------------
+        load zImage > 0x40008000;
+        jump linux_prep;
+}
+
+
+rtlabor@rt8:~/hhoegl/imx28/imx-bootlets-src-10.12.01$ ls -l
+total 52
+drwxr-xr-x 2 rtlabor rtlabor 4096 Nov  4 08:35 boot_prep
+-rwxr-xr-x 1 rtlabor rtlabor  803 Nov  4 08:35 create_updater.sh
+-rw-r--r-- 1 rtlabor rtlabor 1054 Nov  4 08:35 linux.bd
+-rw-r--r-- 1 rtlabor rtlabor 1244 Nov  4 08:35 linux_ivt.bd
+drwxr-xr-x 7 rtlabor rtlabor 4096 Nov  4 08:35 linux_prep
+drwxr-xr-x 5 rtlabor rtlabor 4096 Nov  4 08:35 mach-mx23
+drwxr-xr-x 5 rtlabor rtlabor 4096 Nov  4 08:35 mach-mx28
+-rw-r--r-- 1 rtlabor rtlabor 3342 Nov  4 08:35 Makefile
+drwxr-xr-x 2 rtlabor rtlabor 4096 Nov  4 08:35 power_prep
+-rw-r--r-- 1 rtlabor rtlabor  773 Nov  4 08:35 uboot.bd
+-rw-r--r-- 1 rtlabor rtlabor  929 Nov  4 08:35 uboot_ivt.bd
+-rw-r--r-- 1 rtlabor rtlabor 1236 Nov  4 08:35 updater.bd
+-rw-r--r-- 1 rtlabor rtlabor 1421 Nov  4 08:35 updater_ivt.bd
+
+
+Hier wird das DDR SDRAM initialisiert:
+
+rtlabor@rt8:~/hhoegl/imx28/imx-bootlets-src-10.12.01$ ls boot_prep/
+debug.c  debug.h  init-mx23.c  init-mx28.c  link.lds  Makefile
+
+rtlabor@rt8:~/hhoegl/imx28/imx-bootlets-src-10.12.01$ ls power_prep/
+debug.c  debug.h  eabi.S  link.lds  Makefile  power_prep.c
+
+
+...The linux version of elftosb comes with the Linux BSP.  Use the "ltib -p
+imx-bootlets -m prep" command in ltib to unpack this code to you ltib/rpm/BUILD
+directory.  Somewhere in that package directory you will find the elftosb linux
+binary.
+
+----
+
+http://forums.freescale.com/t5/i-MX-Microprocessors/how-to-use-elftosb2-software-on-imx233/td-p/56153
+
+    A .bd file is a command script that instructs the ROM on how to behave
+    (which ELF file(s) to load, call, and jump to).  There are examples of .bd
+    files and their contents in the Linux BSP.
+
+    You can think of an .sb file as a "fancy" ELF file that is made to run on
+    i.MX233.  It can be encrypted, and can consist of multiple ELF files.  For
+    example, one ELF could initialize the power system, then the ROM would
+    load/call the next ELF file, which may initialize the SDRAM, then the ROM
+    may finally jump to some application ELF file.  That behavior is defined in
+    the .bd file and the .sb file is the end result binary, which can be run on
+    i.MX233.
+
+ Best Regards,
+
+ Ernie A.
+ i.MX Embedded Apps
+
+---
+
+http://www.rockbox.org/wiki/SbFileFormat
+
+
+----
+
+Auch das Chumby verwendet das SB Bootformat:
+
+// Falconwing STMP378x ROM command script to load and run chumby_boot
+
+sources {
+    power_prep="images/power";
+    clocks_prep="images/clocks";
+    sdram_prep="images/sdram_prep";
+    chumby_stub="images/chumby_stub";
+}
+
+section (0) {
+
+    //----------------------------------------------------------
+    // Power supply iinitialization.
+    //----------------------------------------------------------
+    load power_prep;
+    call power_prep;
+
+
+    //----------------------------------------------------------
+    // Clocks initialization.
+    //----------------------------------------------------------
+    load clocks_prep;
+    call clocks_prep;
+
+
+    //----------------------------------------------------------
+    // SDRAM initialization.
+    //----------------------------------------------------------
+    load sdram_prep;
+    call sdram_prep;
+
+
+    //----------------------------------------------------------
+    // Load linux command line files.
+    //----------------------------------------------------------
+    load chumby_stub;
+    jump chumby_stub;
+}
+
+----
+
+Gefunden:
+http://permalink.gmane.org/gmane.comp.systems.archos.rockbox.cvs/30936
+
+Added: trunk/utils/sbtools/README
+===================================================================
+--- trunk/utils/sbtools/README                         (rev 0)
++++ trunk/utils/sbtools/README 2011-04-17 23:40:14 UTC (rev 29744)
+@@ -0,0 +1,32 @@
++This file document the format of the command file used by the elftosb tool.
++By no way our tools tries to be compatible with Freescale's elftosb2.
++However, our format is more subset of the general one.
++
++The parse supports a limited form of comments: comments starting with // and ending at the end of the line.
++
++A file first contains the list of sources:
++
++sources
++{
++    hw_init = "sdram_init.elf";
++    rockbox = "rockbox.elf";
++}
++
++It can then contain an arbitrary number of section. A section is identified by a number.
++Within a section, three commands are supported: "load", "jump" and "call":
++
++section(0x626f6f74) // hex for 'boot'
++{
++    load hw_init;
++    call hw_init;
++    load rockbox;
++    jump rockbox;
++}
++
++Finally, both elftosb and sbtoelf tools use key files. A key file is a list of keys.
++Each key consist is 128-bit long and is written in hexadecimal:
++
++00000000000000000000000000000000
++
++The parser does not handle blank line and only allows a final newline at the end of the file.
++A file is allowed to contain zero (0) keys.
+
+_______________________________________________
+rockbox-cvs mailing list
+rockbox-cvs <at> cool.haxx.se
+http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
+---
+
+
+cdrom-imx28/Mfgtools-Rel-10.12.01_ER_MX28_UPDATER/Utils/sb_loader/
+   Damit kann man ein .sb Image auf das Target laden:
+   Da ist aber nur ein sb_loader.exe drin.
+
+cdrom-imx28/Mfgtools-Rel-10.12.01_ER_MX28_UPDATER/Utils/cfimager/
+   cfimager.exe tool is used to flash boot images and create FAT partition on
+   SD/MMC cards on the host PC for i.MX233 ,i.MX28 ,i.MX50 ,i.MX51 and i.MX53
+   SOCs. 
+
+Hier sind ein paar Linux Dateien, wozu?:
+
+hhoegl@aspire1:~/Dienste/cdrom/cdrom-imx28/Mfgtools-Rel-10.12.01_ER_MX28_UPDATER/Profiles/MX28 Linux Update/OS Firmware$ tree
+.
+|-- config.block
+|-- fdisk-u.input
+|-- files
+|   |-- linux.sb
+|   |-- rootfs.tar.bz2
+|   |-- uboot.sb
+|   `-- uImage
+|-- ucl.xml
+|-- updater_ivt.sb
+`-- updater.sb
+
+
+----
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls /opt/freescale/ltib/usr/bin/
+autoconf              git-fsck-objects         git-unpack-objects
+autoheader            git-gc                   git-update-index
+autom4te              git-get-tar-commit-id    git-update-ref
+autoreconf            git-grep                 git-update-server-info
+autoscan              git-gui                  git-upload-archive
+autoupdate            git-hash-object          git-upload-pack
+bin2nand              git-imap-send            git-var
+bison                 git-index-pack           git-verify-pack
+bmp_logo              git-init                 git-verify-tag
+ccache                git-init-db              git-web--browse
+cgcc                  git-instaweb             git-whatchanged
+conf                  gitk                     git-write-tree
+distcc                git-log                  ifnames
+distccd               git-lost-found           img2srec
+distccmon-text        git-ls-files             info
+docfdisk              git-ls-remote            infokey
+doc_loadbios          git-ls-tree              jffs2dump
+dtc                   git-mailinfo             keygen
+elftosb               git-mailsplit            lex
+flashcp               git-merge                libtool
+flash_erase           git-merge-base           libtoolize
+flash_eraseall        git-merge-file           makeinfo
+flash_info            git-merge-index          mconf
+flash_lock            git-merge-octopus        mkbootenv
+flash_otp_dump        git-merge-one-file       mkfs.cramfs
+flash_otp_info        git-merge-ours           mkfs.jffs2
+flash_unlock          git-merge-recursive      mkfs.ubifs
+flex                  git-merge-resolve        mkimage
+fsck.cramfs           git-merge-stupid         mkpfi
+ftl_check             git-merge-subtree        mtd_debug
+ftl_format            git-mergetool            mtdinfo
+gendiff               git-merge-tree           mux_server
+gen_eth_addr          git-mktag                nand2bin
+genext2fs             git-mktree               nanddump
+gen_init_cpio         git-mv                   nandtest
+genromfs              git-name-rev             nandwrite
+git                   git-pack-objects         nftldump
+git-add               git-pack-redundant       nftl_format
+git-add--interactive  git-pack-refs            pddcustomize
+git-am                git-parse-remote         pfi2bin
+git-annotate          git-patch-id             pfiflash
+git-apply             git-peek-remote          pkg-config
+git-archimport        git-prune                recv_image
+git-archive           git-prune-packed         rfddump
+git-bisect            git-pull                 rfdformat
+git-blame             git-push                 rpm
+git-branch            git-quiltimport          rpm2cpio
+git-bundle            git-read-tree            rpmbuild
+git-cat-file          git-rebase               rpmdb
+git-check-attr        git-rebase--interactive  rpme
+git-checkout          git-receive-pack         rpmi
+git-checkout-index    git-reflog               rpmquery
+git-check-ref-format  git-relink               rpmsign
+git-cherry            git-remote               rpmu
+git-cherry-pick       git-repack               rpmverify
+git-citool            git-repo-config          sbtool
+git-clean             git-request-pull         serve_image
+git-clone             git-rerere               sparse
+git-commit            git-reset                sumtool
+git-commit-tree       git-revert               texi2dvi
+git-config            git-rev-list             texi2pdf
+git-count-objects     git-rev-parse            texindex
+git-cvsexportcommit   git-rm                   tunctl
+git-cvsimport         git-send-email           ubiattach
+git-cvsserver         git-send-pack            ubicrc32
+git-daemon            git-shell                ubicrc32.pl
+git-describe          git-shortlog             ubidetach
+git-diff              git-show                 ubiformat
+git-diff-files        git-show-branch          ubigen
+git-diff-index        git-show-index           ubimirror
+git-diff-tree         git-show-ref             ubimkvol
+git-fast-export       git-sh-setup             ubinfo
+git-fast-import       git-stash                ubinize
+git-fetch             git-status               ubirename
+git-fetch-pack        git-stripspace           ubirmvol
+git-fetch--tool       git-submodule            ubirsvol
+git-filter-branch     git-svn                  ubiupdatevol
+git-fmt-merge-msg     git-symbolic-ref         unifdef
+git-for-each-ref      git-tag                  unubi
+git-format-patch      git-tar-tree             wget
+git-fsck              git-unpack-file          yacc
+
+rtlabor@rt8:~/hhoegl/imx28/opt/ltib$ ls /opt/freescale/ltib/usr/lib/
+libbeecrypt.la        libltdl.so.3.1.0      librpmbuild.a      librpmio.la
+libbeecrypt.so        libpopt.a             librpmbuild.la     librpmio.so
+libbeecrypt.so.2      libpopt.la            librpmbuild.so     librpm.la
+libbeecrypt.so.2.2.0  libpopt.so            librpmdb-4.0.4.so  librpm.so
+libfdt.a              libpopt.so.0          librpmdb.a         liby.a
+libfl.a               libpopt.so.0.0.0      librpmdb.la        rpm
+libltdl.a             librpm-4.0.4.so       librpmdb.so        rpmpopt
+libltdl.so            librpm.a              librpmio-4.0.4.so  rpmrc
+libltdl.so.3          librpmbuild-4.0.4.so  librpmio.a
+
+ARM Crosscompiler
+/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/
+
+arm-fsl-linux-gnueabi-addr2line     arm-linux-gprof
+arm-fsl-linux-gnueabi-ar            arm-linux-ld
+arm-fsl-linux-gnueabi-as            arm-linux-ldd
+arm-fsl-linux-gnueabi-c++           arm-linux-nm
+arm-fsl-linux-gnueabi-cc            arm-linux-objcopy
+arm-fsl-linux-gnueabi-c++filt       arm-linux-objdump
+arm-fsl-linux-gnueabi-cpp           arm-linux-populate
+arm-fsl-linux-gnueabi-ct-ng.config  arm-linux-ranlib
+arm-fsl-linux-gnueabi-g++           arm-linux-readelf
+arm-fsl-linux-gnueabi-gcc           arm-linux-run
+arm-fsl-linux-gnueabi-gcc-4.4.4     arm-linux-size
+arm-fsl-linux-gnueabi-gccbug        arm-linux-strings
+arm-fsl-linux-gnueabi-gcov          arm-linux-strip
+arm-fsl-linux-gnueabi-gdb           arm-none-linux-gnueabi-addr2line
+arm-fsl-linux-gnueabi-gprof         arm-none-linux-gnueabi-ar
+arm-fsl-linux-gnueabi-ld            arm-none-linux-gnueabi-as
+arm-fsl-linux-gnueabi-ldd           arm-none-linux-gnueabi-c++
+arm-fsl-linux-gnueabi-nm            arm-none-linux-gnueabi-cc
+arm-fsl-linux-gnueabi-objcopy       arm-none-linux-gnueabi-c++filt
+arm-fsl-linux-gnueabi-objdump       arm-none-linux-gnueabi-cpp
+arm-fsl-linux-gnueabi-populate      arm-none-linux-gnueabi-ct-ng.config
+arm-fsl-linux-gnueabi-ranlib        arm-none-linux-gnueabi-g++
+arm-fsl-linux-gnueabi-readelf       arm-none-linux-gnueabi-gcc
+arm-fsl-linux-gnueabi-run           arm-none-linux-gnueabi-gcc-4.4.4
+arm-fsl-linux-gnueabi-size          arm-none-linux-gnueabi-gccbug
+arm-fsl-linux-gnueabi-strings       arm-none-linux-gnueabi-gcov
+arm-fsl-linux-gnueabi-strip         arm-none-linux-gnueabi-gdb
+arm-linux-addr2line                 arm-none-linux-gnueabi-gprof
+arm-linux-ar                        arm-none-linux-gnueabi-ld
+arm-linux-as                        arm-none-linux-gnueabi-ldd
+arm-linux-c++                       arm-none-linux-gnueabi-nm
+arm-linux-cc                        arm-none-linux-gnueabi-objcopy
+arm-linux-c++filt                   arm-none-linux-gnueabi-objdump
+arm-linux-cpp                       arm-none-linux-gnueabi-populate
+arm-linux-ct-ng.config              arm-none-linux-gnueabi-ranlib
+arm-linux-g++                       arm-none-linux-gnueabi-readelf
+arm-linux-gcc                       arm-none-linux-gnueabi-run
+arm-linux-gcc-4.4.4                 arm-none-linux-gnueabi-size
+arm-linux-gccbug                    arm-none-linux-gnueabi-strings
+arm-linux-gcov                      arm-none-linux-gnueabi-strip
+arm-linux-gdb
+
+arm-fsl-linux-gnueabi-gdb (Version 7.1)
+
+
+rtlabor@rt8:~/hhoegl/imx28$ ls /opt/freescale/ltib/sbin/
+install-info
+
+
+hhoegl@aspire1:~$ ls L2.6.35_10.12.01_SDK_docs/
+AN_MX_NAND_BAD_BLOCK.pdf
+gcc4.4.4_multilib_toolchain_release_note.pdf
+GNOME_Mobile_Release_Notes.pdf
+i.MX28_Linux_BSP_RM.pdf
+i MX28_Linux_BSP_RN.pdf
+i.MX28_Linux_BSP_UG.pdf
+Linux_HelloWorld_AN.pdf
+ltib_build_host_setup.pdf
+LTIB_for_i.MX28__a_step-by-step_guide.pdf
+README_2.6.35_kernel_upgrade.pdf
+Release_Notes_About_Adding_New_Toolchain_To_Ltib.pdf
+uboot_mx28.pdf
+
+* Huebsches freies Projekt mit i.MX233: Lyre project: Open Hardware music player
+  and recorder running Rockbox firmware
+
+   http://lyre.sourceforge.net
+
+  OpenOCD Config:
+     http://forums.freescale.com/freescale/attachments/freescale/IMXCOMM/803/1/imx23.cfg
+
+
diff --git a/docs/notizen/sd.txt b/docs/notizen/sd.txt
new file mode 100644 (file)
index 0000000..33ed3ec
--- /dev/null
@@ -0,0 +1,290 @@
+H. Hoegl, 26.4.2011
+
+SD/MMC Karte mit U-Boot Bootstream flashen
+------------------------------------------
+
+*  Erster Versuch
+
+   - Musste eine Funktion in mk_mx28_sd auskommentieren (is_mounted()), da hier
+     das Skript beendet wurde. Woran liegt das?
+
+   - Habe die Skripte mk_mx28_sd und mk_hdr.sh in 
+     L2.6.35_10.12.01_ER_images_MX28/ kopiert.  Hier sind sie 
+     zu finden: L2.6.35_10.12.01_SDK_scripts/. Da drin sind folgende 
+     Dateien (auch Doku):
+
+      ::
+
+       led_flasher_README.pdf  mk_hdr.sh              mk_mx28_sd_README.pdf
+       led_flasher_README.rtf  mk_mx28_sd             Ubuntu_LTIB_setup.sh
+       led_flasher.sh          mk_mx28_sd_README.doc  Ubuntu_LTIB_setup_sh_README.pdf
+     
+     Muss im Skript den Boot Stream aendern auf::
+
+        $DEBUG install_boot_stream $sb_name $p0 2
+
+   - Was macht die mk_mx28_sd Option -d?  Im Normalfall wird das
+     "HAB enabled" image verwendet (imx28_ivt_uboot.sb).
+   
+     ::
+
+        -d        Use HAB disabled boot images.
+
+::
+
+    hhoegl@gazelle:~/imx28/Freescale-L2.6.35/L2.6.35_10.12.01_ER_images_MX28$ sudo ./mk_mx28_sd -u /dev/sde
+
+    Insert the specified device (/dev/sde) now, if you have not already done so.
+
+    This script requires the use of 'sudo' and erases the content of the specified device (/dev/sde)
+    Are you sure you want to continue? (yes/no): 
+    yes
+
+    Command (m for help): Building a new DOS disklabel with disk identifier 0x38feb27f.
+    Changes will remain in memory only, until you decide to write them.
+    After that, of course, the previous content won't be recoverable.
+
+    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
+
+    Command (m for help): Command action
+       e   extended
+       p   primary partition (1-4)
+    Partition number (1-4): First cylinder (1-1021, default 1): Last cylinder, +cylinders or +size{K,M,G} (1-1021, default 1021): 
+    Command (m for help): Selected partition 1
+    Hex code (type L to list codes): Changed system type of partition 1 to b (W95 FAT32)
+
+    Command (m for help): Command action
+       e   extended
+       p   primary partition (1-4)
+    Partition number (1-4): First cylinder (19-1021, default 19): Using default value 19
+    Last cylinder, +cylinders or +size{K,M,G} (19-1021, default 1021): 
+    Command (m for help): Partition number (1-4): Hex code (type L to list codes): Changed system type of partition 2 to 53 (OnTrack DM6 Aux3)
+
+    Command (m for help): Command action
+       e   extended
+       p   primary partition (1-4)
+    Partition number (1-4): First cylinder (37-1021, default 37): Using default value 37
+    Last cylinder, +cylinders or +size{K,M,G} (37-1021, default 1021): Using default value 1021
+
+    Command (m for help): Partition number (1-4): Hex code (type L to list codes): 
+    Command (m for help): 
+    Disk /dev/sde: 1977 MB, 1977614336 bytes
+    61 heads, 62 sectors/track, 1021 cylinders
+    Units = cylinders of 3782 * 512 = 1936384 bytes
+    Disk identifier: 0x38feb27f
+
+       Device Boot      Start         End      Blocks   Id  System
+    /dev/sde1               1          18       34007    b  W95 FAT32
+    /dev/sde2              19          36       34038   53  OnTrack DM6 Aux3
+    /dev/sde3              37        1021     1862635   83  Linux
+
+    Command (m for help): The partition table has been altered!
+
+    Calling ioctl() to re-read partition table.
+
+    WARNING: If you have created or modified any DOS 6.x
+    partitions, please see the fdisk manual page for additional
+    information.
+    Syncing disks.
+
+    Installing boot stream imx28_ivt_uboot.sb on /dev/sde2...
+    0+1 records in
+    1+0 records out
+    512 bytes (512 B) copied, 0.174494 s, 2.9 kB/s
+    286+1 records in
+    287+0 records out
+    146944 bytes (147 kB) copied, 0.144702 s, 1.0 MB/s
+    ...finished installing boot stream on /dev/sde2.
+
+* Nachher die Karte mit cfdisk ansehen:
+
+                          cfdisk (util-linux-ng 2.16)
+
+                              Disk Drive: /dev/sde
+                        Size: 1977614336 bytes, 1977 MB
+              Heads: 61   Sectors per Track: 62   Cylinders: 1021
+
+    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
+ ------------------------------------------------------------------------------
+    sde1                    Primary   W95 FAT32                           34.86
+    sde2                    Primary   OnTrack DM6 Aux3                    34.86
+    sde3                    Primary   Linux                             1907.34
+
+Mounten unter Linux ausprobieren. Erster naiver Versuch hat nur Chaos
+gebracht.
+
+
+* MMC/SD Karte einstecken (2G Karte)
+
+U-Boot von MMC/SD starten. Das ist erklaert in 
+  LTIB_for_i.MX28__a_step-by-step_guide.pdf. Wie man U-Boot baut, 
+  steht in uboot_mx28.pdf.
+  
+  Schalterstellung der 4 DIP Schalter: 1-0-0-1
+
+resetting ...
+
+PowerPrep start initialize power...
+Battery Voltage = 4.24V
+5v source detected.Valid battery                               voltage detected.Booting from battery                           voltage source.
+Dec 27 201009:22:42
+FRAC 0x92925552
+memory type is DDR2
+                   Wait for ddr ready 1power 0x00820616
+Frac 0x92925552
+start change cpu freq
+hbus 0x00000003
+cpu 0x00010001
+start test memory accress
+ddr2 0x40000000
+finish simple test
+
+
+U-Boot 2009.08 (Dec 27 2010 - 09:16:36)
+
+Freescale i.MX28 family
+CPU:   454 MHz
+BUS:   151 MHz
+EMI:   205 MHz
+GPMI:   24 MHz
+DRAM:  128 MB
+MMC:   IMX_SSP_MMC: 0, IMX_SSP_MMC: 1
+*** Warning - bad CRC or MMC, using default environment
+
+In:    serial
+Out:   serial
+Err:   serial
+Net:   got MAC address from IIM: 00:04:9f:01:7d:f3
+FEC0
+Hit any key to stop autoboot:  0 
+MX28 U-Boot > 
+
+
+MX28 U-Boot > help
+?       - alias for 'help'
+autoscr - DEPRECATED - use "source" command instead
+base    - print or set address offset
+bdinfo  - print Board Info structure
+boot    - boot default, i.e., run 'bootcmd'
+bootd   - boot default, i.e., run 'bootcmd'
+bootm   - boot application image from memory
+bootp   - boot image via network using BOOTP/TFTP protocol
+cmp     - memory compare
+coninfo - print console devices and information
+cp      - memory copy
+crc32   - checksum calculation
+dhcp    - boot image via network using DHCP/TFTP protocol
+echo    - echo args to console
+fatinfo - print information about filesystem
+fatload - load binary file from a dos filesystem
+fatls   - list files in a directory (default /)
+go      - start application at address 'addr'
+help    - print online help
+iminfo  - print header information for application image
+imxtract- extract a part of a multi-image
+itest   - return true/false on integer compare
+loadb   - load binary file over serial line (kermit mode)
+loads   - load S-Record file over serial line
+loady   - load binary file over serial line (ymodem mode)
+loop    - infinite loop on address range
+md      - memory display
+mii     - MII utility commands
+mm      - memory modify (auto-incrementing address)
+mmc     - MMC sub system
+mmcinfo - mmcinfo <dev num>-- display MMC info
+mtest   - simple RAM read/write test
+mw      - memory write (fill)
+mxs_mmc - MXS specific MMC sub system
+nfs     - boot image via network using NFS protocol
+nm      - memory modify (constant address)
+ping    - send ICMP ECHO_REQUEST to network host
+printenv- print environment variables
+rarpboot- boot image via network using RARP/TFTP protocol
+reset   - Perform RESET of the CPU
+run     - run commands in an environment variable
+saveenv - save environment variables to persistent storage
+setenv  - set environment variables
+sleep   - delay execution for some time
+source  - run script from memory
+tftpboot- boot image via network using TFTP protocol
+version - print monitor version
+MX28 U-Boot > 
+
+MX28 U-Boot > mmcinfo
+Device: IMX_SSP_MMC
+Manufacturer ID: 3
+OEM: 5344
+Name: SD02G 
+Tran Speed: 25000000
+Rd Block Len: 512
+SD version 2.0
+High Capacity: No
+Capacity: 8493788899368714240
+Bus Width: 4-bit
+MX28 U-Boot > 
+
+MX28 U-Boot > bdinfo
+arch_number = 0x000009E3
+env_t       = 0x00000000
+boot_params = 0x40000100
+DRAM bank   = 0x00000000
+-> start    = 0x40000000
+-> size     = 0x08000000
+ethaddr     = (not set)
+ip_addr     = 192.168.1.103
+baudrate    = 115200 bps
+
+
+MX28 U-Boot > printenv
+bootargs=console=ttyAM0,115200n8 
+bootcmd=run bootcmd_net
+bootdelay=3
+baudrate=115200
+ipaddr=192.168.1.103
+serverip=192.168.1.101
+netmask=255.255.255.0
+bootfile="uImage"
+loadaddr=0x42000000
+nfsroot=/home/notroot/nfs/rootfs
+bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp fec_mac=${ethaddr}
+bootcmd_net=run bootargs_nfs; dhcp; bootm
+bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p3 rw rootwait ip=dhcp fec_mac=${ethaddr}
+bootcmd_mmc=run bootargs_mmc; mmc read 0 ${loadaddr} 100 3000; bootm
+stdin=serial
+stdout=serial
+stderr=serial
+ethact=FEC0
+ver=U-Boot 2009.08 (Dec 27 2010 - 09:16:36)
+
+Environment size: 651/130044 bytes
+
+MX28 U-Boot > help mii
+mii - MII utility commands
+
+Usage:
+mii device                     - list available devices
+mii device <devname>           - set current device
+mii info   <addr>              - display MII PHY info
+mii read   <addr> <reg>        - read  MII PHY <addr> register <reg>
+mii write  <addr> <reg> <data> - write MII PHY <addr> register <reg>
+mii dump   <addr> <reg>        - pretty-print <addr> <reg> (0-5 only)
+Addr and/or reg may be ranges, e.g. 2-7.
+
+MX28 U-Boot > help ping
+ping - send ICMP ECHO_REQUEST to network host
+
+Usage:
+ping pingAddress
+
+MX28 U-Boot > fatinfo mmc 0:1
+Interface:  MMC
+  Device 0: Vendor: Man 035344 Snr 60655d68 Rev: 8.0 Prod: SD02G
+  Type: Removable Hard Disk
+  Capacity: 1886.0 MB = 1.8 GB (3862528 x 512)
+
+  No valid FAT fs found
+
+
+
+
+.. vim: et sw=4 ts=4