<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://bugs.maemo.com/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://bugs.maemo.com/index.php?action=history&amp;feed=atom&amp;title=Firmware_hacking</id>
		<title>Firmware hacking - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://bugs.maemo.com/index.php?action=history&amp;feed=atom&amp;title=Firmware_hacking"/>
		<link rel="alternate" type="text/html" href="http://bugs.maemo.com/index.php?title=Firmware_hacking&amp;action=history"/>
		<updated>2026-04-07T08:32:50Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.15.5-7</generator>

	<entry>
		<id>http://bugs.maemo.com/index.php?title=Firmware_hacking&amp;diff=53789&amp;oldid=prev</id>
		<title>134.83.1.241:&amp;#32;/* X-Loader Hacking */</title>
		<link rel="alternate" type="text/html" href="http://bugs.maemo.com/index.php?title=Firmware_hacking&amp;diff=53789&amp;oldid=prev"/>
				<updated>2015-01-28T17:11:04Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;X-Loader Hacking&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:11, 28 January 2015&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;- Nokia's keys (which was never given to public).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;- Nokia's keys (which was never given to public).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The booting stage is separated into two parts prior to the booting of the kernel from /dev/mtd3. The first stage is the NOLO-X Loader (which is signed) and NOLO-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2nd &lt;/del&gt;(which is not signed and is only a binary blob, if you want to edit &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2nd&lt;/del&gt;, see the section NOLO hacking).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The booting stage is separated into two parts prior to the booting of the kernel from /dev/mtd3. The first stage is the NOLO-X Loader (which is signed) and NOLO-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;secondary &lt;/ins&gt;(which is not signed and is only a binary blob, if you want to edit &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;secondary.bin&lt;/ins&gt;, see the section NOLO hacking).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;X-Loader portion is not only signed but was said to be encrypted in AES 256bit. The information below contains specific information from another handset bearing similar hardware features as Nokia N900. (The original site is no longer accessible).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;X-Loader portion is not only signed but was said to be encrypted in AES 256bit. The information below contains specific information from another handset bearing similar hardware features as Nokia N900. (The original site is no longer accessible).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-07 08:32:51 --&gt;
&lt;/table&gt;</summary>
		<author><name>134.83.1.241</name></author>	</entry>

	<entry>
		<id>http://bugs.maemo.com/index.php?title=Firmware_hacking&amp;diff=52150&amp;oldid=prev</id>
		<title>tuxsavvy:&amp;#32;Created page with &quot;= NOLO Hacking = For all NOLO related hacks see: [http://talk.maemo.org/showthread.php?t=75504 here] and [http://talk.maemo.org/showpost.php?p=1321201&amp;postcount=55 here].  = X-Lo…&quot;</title>
		<link rel="alternate" type="text/html" href="http://bugs.maemo.com/index.php?title=Firmware_hacking&amp;diff=52150&amp;oldid=prev"/>
				<updated>2013-08-14T18:27:14Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= NOLO Hacking = For all NOLO related hacks see: [http://talk.maemo.org/showthread.php?t=75504 here] and [http://talk.maemo.org/showpost.php?p=1321201&amp;amp;postcount=55 here].  = X-Lo…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= NOLO Hacking =&lt;br /&gt;
For all NOLO related hacks see: [http://talk.maemo.org/showthread.php?t=75504 here] and [http://talk.maemo.org/showpost.php?p=1321201&amp;amp;postcount=55 here].&lt;br /&gt;
&lt;br /&gt;
= X-Loader Hacking =&lt;br /&gt;
The information pertain requires JTAG and knowledge when dealing with serial debugging, etc. Most of the information has been scoured from various sources, credit goes to jacekowski for providing insights.&lt;br /&gt;
&lt;br /&gt;
You will need: &lt;br /&gt;
- [http://www.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&amp;amp;navigationId=12013&amp;amp;contentId=28741 OMAP3430 CSST Binary Release - Version 2.5] &lt;br /&gt;
- Nokia's keys (which was never given to public).&lt;br /&gt;
&lt;br /&gt;
The booting stage is separated into two parts prior to the booting of the kernel from /dev/mtd3. The first stage is the NOLO-X Loader (which is signed) and NOLO-2nd (which is not signed and is only a binary blob, if you want to edit 2nd, see the section NOLO hacking).&lt;br /&gt;
&lt;br /&gt;
X-Loader portion is not only signed but was said to be encrypted in AES 256bit. The information below contains specific information from another handset bearing similar hardware features as Nokia N900. (The original site is no longer accessible).&lt;br /&gt;
&lt;br /&gt;
Initial Software image&lt;br /&gt;
&lt;br /&gt;
Since the NAND flash cannot be used to XIP (eXecute In Place), and since there must be public-key certificates inside the ISW block, there's a header on the ISW (Initial SoftWare) block. This header is not publicly documented (i.e., not in the TRM) for HS devices like the Milestone and the Droid. User droid001 has compared the Droid dump, the Milestone dump and the example CSST HS image, proposing an ISW structure like this one:&lt;br /&gt;
&lt;br /&gt;
isw&lt;br /&gt;
&lt;br /&gt;
ISW Block&lt;br /&gt;
&lt;br /&gt;
ISW Block Headers&lt;br /&gt;
&lt;br /&gt;
X-LOADER Header&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0200: 00 24 00 00  8c be 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
0210: 00 00 00 87  58 2d 4c 4f  41 44 45 52  00 00 00 00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x0200	0x00002400	ISW offset1) to X-LOADER 	&lt;br /&gt;
0x0204	0x0000BE8C	X-LOADER block length 	This is the number of bytes to load into RAM, since the whole X-LOADER block is copied.&lt;br /&gt;
This value differs on the Droid (it's 0x0000862C).&lt;br /&gt;
0x0208	0x00000000 0x00000000		&lt;br /&gt;
0x0210	0x87000000	RAM load address. This is the RAM location where the X-LOADER block is copied into RAM. 	The RAM execution starts at (this value+ 0x350), which is the ISW Entry Point, because CertISW's length is fixed (0x350).&lt;br /&gt;
0x0214	'X-LOADER'	Id 	&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
KEYS header&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0220: 00 02 00 00  60 09 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
0230: 00 00 00 00  4b 45 59 53  00 00 00 00  00 00 00 00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x0220	0x00000200	ISW offset to CertPK 	&lt;br /&gt;
0x0224	0x00000960	Lenght of CertPK 	&lt;br /&gt;
0x0228	0x00000000 0x00000000		&lt;br /&gt;
0x0230	0x00000000		&lt;br /&gt;
0x0234	'KEYS'	Id 	Public Keys (plural?)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PRIMAPP header&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0240: 00 0c 00 00  50 16 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
0250: 00 00 00 00  50 52 49 4d  41 50 50 00  00 00 00 00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x0240	0x00000C00	ISW offset to CertPPA 	&lt;br /&gt;
0x0244	0x00001650	Length of CertPPA	This value differs on the Droid (0x00001604).&lt;br /&gt;
0x0248	0x00000000 0x00000000		&lt;br /&gt;
0x0250	0x00000000		&lt;br /&gt;
0x0254	'PRIMAPP'	Id 	Primary Application&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ISW Block Headers closing mark&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0260: ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff&lt;br /&gt;
0270: ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff&lt;br /&gt;
&lt;br /&gt;
Empty space&lt;br /&gt;
&lt;br /&gt;
0280: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
 ...&lt;br /&gt;
03f0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
&lt;br /&gt;
KEYS block&lt;br /&gt;
Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x0400	'CertPK_' 	Public Key Certificate2) 	Ends at 0x0200+0x0200+(0x0960-0x0001) = 0x0d5f&lt;br /&gt;
&lt;br /&gt;
Empty space&lt;br /&gt;
&lt;br /&gt;
0d60: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
 ...&lt;br /&gt;
0df0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
&lt;br /&gt;
PRIMAPP block&lt;br /&gt;
Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x0e00	'CertPPA' 	Primary Protected Application Certificate3) 	Ends at 0x0200+0x0c00+(0x1650-0x0001) = 0x244f&lt;br /&gt;
&lt;br /&gt;
Empty space&lt;br /&gt;
&lt;br /&gt;
2450: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
 ...&lt;br /&gt;
25f0: 00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00&lt;br /&gt;
&lt;br /&gt;
X-LOADER block&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This storage area contains the signed ISW. We have named it “X-LOADER” for naming consistency reasons, and to avoid having too many data blocks called “ISW”. This is not to be confused with the [http://gitorious.org/x-load-omap3 X-Loader or X-Load program], which is the name of a program that is not used in Motorola Milestone/Droid but in TI OMAP development boards. In fact, Motorola itself (or picked this up by some patch from TI) labeled the whole 0x00000-0x7ffff NAND area as “X-Loader-NAND” in this [http://pastebin.com/f1f80e2d6 code added by Motorola to the Linux kernel]. And TI's eFuse patent mentions that the “X-LOADER” string is required for the system to boot in HS mode.&lt;br /&gt;
&lt;br /&gt;
CertISW&lt;br /&gt;
Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
&amp;lt;pre&amp;gt;0x2600	'CertISW' 	Initial Software Certificate4) 	Fixed length 0x350 Bytes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ISW Code &amp;amp; Data&lt;br /&gt;
&amp;lt;pre&amp;gt;Offset (mbmloader img)	Value	Meaning	Comment&lt;br /&gt;
0x2950	0f 10 a0 e1 	See disassembly below. 	ISW Entry point&lt;br /&gt;
0x2954	lots of code and data here 	This contains the Motorola mbmloader code (anything else?).	Ends at 0x0200+0x2400+(0xbe8c-0x0001)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a disasembly of the Entry Point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
   Starting to disassemble from this point brings a meaningful flow. It is the &lt;br /&gt;
   initial portion of the whole ca. 48kB or 34kB by droid image loaded into RAM&lt;br /&gt;
   (SDRAM Q2-ChipSelect-0 512MB starts at 0x8000 0000 [see TRM]) &lt;br /&gt;
 &lt;br /&gt;
   It is the check for the PC if it was 0x87000350, which fits with the&lt;br /&gt;
   recorded &amp;quot;Load Address&amp;quot;+&amp;quot;Initial SW Entry Point&amp;quot; in CSST that is 0x87000000 + 0x0350.&lt;br /&gt;
 &lt;br /&gt;
   When the ISW entry point is changed in CSST, its value will be added to a value with base&lt;br /&gt;
   value 0x350 at 0x27B4 of the .img file.&lt;br /&gt;
 &lt;br /&gt;
   So in a nutshell, the first 0x0350 bytes in RAM are likely a copy of the CertISW.&lt;br /&gt;
*/&lt;br /&gt;
 &lt;br /&gt;
ROM:00000000 0F 10 A0 E1                 MOV     R1, PC          ; Subtract 8 for the address of THIS&lt;br /&gt;
ROM:00000004 08 10 41 E2                 SUB     R1, R1, #8      ; due to pipelining.&lt;br /&gt;
ROM:00000008 C0 20 9F E5                 LDR     R2, =0x87000350&lt;br /&gt;
ROM:0000000C 02 00 51 E1                 CMP     R1, R2          ; Checks whether it is running at the correct RAM location.&lt;br /&gt;
ROM:00000010 1B 00 00 1A                 BNE     loc_84          ; If it's not, branches into a dead loop.&lt;br /&gt;
:&lt;br /&gt;
:&lt;br /&gt;
ROM:00000084             loc_84                                  ; CODE XREF: ROM:00000010&lt;br /&gt;
ROM:00000084                                                     ; ROM:loc_84&lt;br /&gt;
ROM:00000084 FE FF FF EA                 B       loc_84          ; This is a Dead Loop.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A nice disassembly of mbmloader has been provided by Yakk IDA DB of mbmloader. He used IDA version 5.5.&lt;br /&gt;
&lt;br /&gt;
[http://pastebin.com/f1a32bf1c Here] is an older, barely readable decompilation of mbmloader by maui.&lt;br /&gt;
&lt;br /&gt;
ISW Block End&lt;br /&gt;
1) ISW offsets are relative to the start of the ISW block (0x200).&lt;br /&gt;
2) , 4) CSST_UserManual 2.5 p.77 4.2.5&lt;br /&gt;
3) CSST_UserManual 2.5 p.4 0.3&lt;br /&gt;
--- END ---&lt;br /&gt;
The following set of information is pulled from another website (which is also now no longer available):&lt;br /&gt;
&lt;br /&gt;
== OMAP Bootloader Overview ==&lt;br /&gt;
&lt;br /&gt;
There are several stages of bootloaders that perform different levels of initialization on an OMAP platform, in order to eventually load and run the filesystem. This figure shows the booting sequence of the ROM code, x-loader, u-boot, and kernel, with each stage performing enough configuration in order to load and execute the next.&lt;br /&gt;
&lt;br /&gt;
The Bootloader Project covers specifically the x-loader and the u-boot: a code overview, and how to obtain and build the code.&lt;br /&gt;
&lt;br /&gt;
Why are there two bootloaders? The first bootloader, x-loader, is a stripped-down version of the u-boot, designed to run in OMAP's small on-chip SRAM. It initializes the main off-chip memory of the system and other necessary device drivers, and then loads the larger bootloader for Linux, u-boot. &lt;br /&gt;
&lt;br /&gt;
When a system is first booted, the CPU　invokes the reset vector to start the code at a known location in ROM:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; ROM Code: &lt;br /&gt;
1) Performs minimal clocks, memories and peripheral configuration. &lt;br /&gt;
2) Searches the booting devices for a valid booting image. &lt;br /&gt;
3) Loads the x-loader into SRAM and executes it. &lt;br /&gt;
&lt;br /&gt;
-&amp;gt; X-Loader: &lt;br /&gt;
1) Sets up the pin muxing. &lt;br /&gt;
2) Initializes clocks and memory. &lt;br /&gt;
3) Loads the U-Boot into SDRAM and executes it. &lt;br /&gt;
&lt;br /&gt;
-&amp;gt; U-Boot: &lt;br /&gt;
1) Performs some additional platform initialization. &lt;br /&gt;
2) Sets the boot arguments. &lt;br /&gt;
3) Passes control to the kernel image. &lt;br /&gt;
&lt;br /&gt;
-&amp;gt; Kernel: &lt;br /&gt;
1) Decompresses the kernel into SDRAM. &lt;br /&gt;
2) Sets up peripherals such as LCD, HDMI, I2C bus, USB, SD card, audio etc. &lt;br /&gt;
3) Mounts the Linux filesystem that contains at userspace libraries/applications.&lt;br /&gt;
&lt;br /&gt;
== OMAP Boot Sequence ==&lt;br /&gt;
&lt;br /&gt;
Detailed documentation on the OMAP boot sequence is available in the OMAP TRM, Initialization chapter. The TRMs for multiple OMAP platforms (OMAP4430, OMAP4460, OMAP34xx, etc) are available here: [http://www.ti.com/general/docs/wtbu/wtbudocumentcenter.tsp?templateId=6123&amp;amp;navigationId=12037 http://www.ti.com/general/docs/wtbu/wtbudocumentcenter.tsp?templateId=6123&amp;amp;navigationId=12037]&lt;br /&gt;
&lt;br /&gt;
=== SYSBOOT Pins ===&lt;br /&gt;
&lt;br /&gt;
The internal ROM Code can attempt to boot from several different peripheral and memory devices, including, but not limited to: Serial (UART3), SD Card, eMMC, NAND, and USB. The order in which these devices are searched for a valid first-stage booting image (x-loader) is determine by a set of GPIO configuration pins referred to as SYSBOOT. The TRM includes a table that shows the booting device list that each combination of the SYSBOOT pins refers to.&lt;br /&gt;
&lt;br /&gt;
The SYSBOOT value can be read from physical address 0x480022f0, either using JTAG, or if you have linux running, use devmem2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# devmem2 0x480022f0 b                           &lt;br /&gt;
/dev/mem opened.&lt;br /&gt;
Memory mapped at address 0x40020000.&lt;br /&gt;
Value at address 0x480022F0 (0x400202f0): 0x2F&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For OMAP34xx, there is also a tool to show the boot order: [http://linux.fjfi.cvut.cz/~zub/omap34xx-boot-order/ omap34xx-boot-order]&lt;br /&gt;
&lt;br /&gt;
=== First Stage Boot ===&lt;br /&gt;
&lt;br /&gt;
For example, the SYSBOOT pins could be set such that booting device list consists of 1) serial (UART3), 2) SD card (MMC1), and 3) NAND flash. In this case, the ROM code would first look for a valid x-loader over the serial port, then in the SD card, then in the NAND flash. Whenever it finds a valid x-loader, it proceeds with execution of that binary. &lt;br /&gt;
&lt;br /&gt;
==== Serial Boot ====&lt;br /&gt;
&lt;br /&gt;
For serial boot, a simple ID is written out of the serial port. If the host responds correctly within a short window of time, the ROM will read from the serial port and transfer the data to the internal SRAM. Control is passed to the start of SDRAM if no errors are detected. UART3 is the only uart for which the ROM will attempt to load from.&lt;br /&gt;
&lt;br /&gt;
==== SD Card Boot ====&lt;br /&gt;
&lt;br /&gt;
If MMC is included in the booting device list, the ROM looks for an SD Card on the first MMC controller. If a card is found, the ROM then looks for the first FAT32 partition within the partition table. Once the partition is found, the root directory is scanned for a special signed file called &amp;quot;MLO&amp;quot; (which is the x-loader binary with a header containing the memory location to load the file to and the size of the file). Assuming all is well with the file, it is transfered into the internal SRAM and control is passed to it. Both MMC1 and MMC2 can be used for booting.&lt;br /&gt;
&lt;br /&gt;
==== NAND / eMMC Boot ====&lt;br /&gt;
&lt;br /&gt;
If NAND is included in the booting device list, the ROM attempts to load the first sector of NAND. If the sector is bad, corrupt, or blank, the ROM will try the next sector (up to 4) before exiting. Once a good sector is found, the ROM transfers the contents to SRAM and transfers control to it. (The same steps are performed for eMMC if eMMC is included in the booting device list instead of NAND.)&lt;br /&gt;
&lt;br /&gt;
=== Second Stage Boot ===&lt;br /&gt;
&lt;br /&gt;
It is the job of the x-loader to transfer the 2nd stage loader into main memory, which we call the u-boot. Typically both the x-loader and u-boot come from the same storage medium. For example, typically if the x-loader is transferred via USB, the u-boot will also be transferred via USB, and if the x-loader is transferred via SD card, the u-boot will also be transferred via SD card. However, this is not required. For example, you could flash the serial x-loader into the NAND. The ROM code will load the x-loader from NAND and transfer control to the x-loader, which will wait for the u-boot to be downloaded from the serial port. &lt;br /&gt;
&lt;br /&gt;
==== Serial Boot ====&lt;br /&gt;
&lt;br /&gt;
In the case of loading both the u-boot over the serial port, the x-loader waits for the host to initiate a kermit connection to reliably transfer large files into main memory. Once the file transfer is completed successfully, control is transfered.&lt;br /&gt;
&lt;br /&gt;
==== SD Card Boot ====&lt;br /&gt;
&lt;br /&gt;
In the case of loading the u-boot via the SD card, the SD card x-loader looks for a FAT32 partition on the first MMC controller and scans the top level directory for a file named &amp;quot;u-boot.bin&amp;quot;. It then transfers the file into main memory and transfers control to it.&lt;br /&gt;
&lt;br /&gt;
==== NAND / eMMC Boot ====&lt;br /&gt;
&lt;br /&gt;
In the case of a u-boot stored in NAND, the x-loader expects the u-boot to be located at the 5th sector (offset 0x00800000). It transfers the image from NAND into main memory and transfers control to it. In the case of a u-boot stored in eMMC, the x-loader expects the u-boot to be located at the offset 0x200. &lt;br /&gt;
&lt;br /&gt;
=== x-loader overview ===&lt;br /&gt;
&lt;br /&gt;
The x-loader is a small first stage bootloader derived from the u-boot base code. It is loaded into the internal static RAM by the OMAP ROM code. Due to the small size of the internal static RAM, the x-loader is stripped down to the essentials. The x-loader configures the pin muxing, clocks, DDR, and serial console, so that it can access and load the second stage bootloader (u-boot) into the DDR.&lt;br /&gt;
&lt;br /&gt;
=== u-boot overview ===&lt;br /&gt;
&lt;br /&gt;
The u-boot is a second stage bootloader that is loaded by the x-loader into DDR. It comes from [http://www.denx.de/wiki/U-Boot Das U-Boot]. The u-boot can perform CPU dependent and board dependent initialization and configuration not done in the x-loader. The u-boot also includes fastboot functionality for partitioning and flashing the eMMC. The u-boot runs on the Master CPU (CPU ID 0), which is responsible for the initialization and booting; at the same time, the Slave CPU (CPU ID 1) is held in the “wait for event” state.&lt;br /&gt;
&lt;br /&gt;
== Building the Bootloaders ==&lt;br /&gt;
&lt;br /&gt;
The following steps will build the x-loader and u-boot.&lt;br /&gt;
&lt;br /&gt;
Note: In order to build the x-loader or u-boot, it is recommended that you use the omappedia Release Notes page corresponding to the platform you are using (Blaze, Blaze Tablet, Panda, or Zoom) and follow the instructions for that release: [http://www.omappedia.com/wiki/Release_Notes http://www.omappedia.com/wiki/Release_Notes] In general, the instructions will be very similar with the following exceptions:&lt;br /&gt;
&lt;br /&gt;
    The commit ID used to pull the code from the u-boot and x-loader git trees varies based on the release. It is recommended that you use the correct commit ID corresponding to your release, as this is how the validation is performed.&lt;br /&gt;
    The config file used to setup the configuration when building the u-boot and x-loader varies based on the platform you are using. See the tables below. &lt;br /&gt;
&lt;br /&gt;
Also, ensure that you have installed the pre-requisite packages for building the bootloaders, namely Git and the CodeSourcery ARM Compiler. These instructions are included in the omappedia Release Notes corresponding to your release. You can also find the information here:&lt;br /&gt;
&lt;br /&gt;
    Git is available for download at [http://git-scm.com/ git-scm.com]. For more details on installing and using git please see [http://wiki.omap.com/index.php/Git this wiki page].&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
[http://wiki.maemo.org/N900_Hardware_Hacking/serial_dump http://wiki.maemo.org/N900_Hardware_Hacking/serial_dump]&lt;br /&gt;
&lt;br /&gt;
[http://mg.pov.lt/maemo-irclog/%23maemo.2012-01-08.log.html#t2012-01-08T15:44:38 http://mg.pov.lt/maemo-irclog/%23maemo.2012-01-08.log.html#t2012-01-08T15:44:38]&lt;br /&gt;
&lt;br /&gt;
[http://webcache.googleusercontent.com/search?q=cache:ocBmTvXGqJIJ:and-developers.com/partitions:isw http://webcache.googleusercontent.com/search?q=cache:ocBmTvXGqJIJ:and-developers.com/partitions:isw]&lt;br /&gt;
&lt;br /&gt;
[http://webcache.googleusercontent.com/search?q=cache:YQlA5N60_HkJ:omappedia.org/wiki/Bootloader_Project http://webcache.googleusercontent.com/search?q=cache:YQlA5N60_HkJ:omappedia.org/wiki/Bootloader_Project]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/omap-u-boot-utils/ http://code.google.com/p/omap-u-boot-utils/]&lt;br /&gt;
&lt;br /&gt;
[http://www.droid-developers.org/wiki/Cryptography http://www.droid-developers.org/wiki/Cryptography]&lt;br /&gt;
&lt;br /&gt;
[http://gitorious.org/x-load-omap3 http://gitorious.org/x-load-omap3]&lt;/div&gt;</summary>
		<author><name>tuxsavvy</name></author>	</entry>

	</feed>