<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=CM-T43%3A_U-Boot%3A_Building_Images</id>
	<title>CM-T43: U-Boot: Building Images - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediawiki.compulab.com/w/index.php?action=history&amp;feed=atom&amp;title=CM-T43%3A_U-Boot%3A_Building_Images"/>
	<link rel="alternate" type="text/html" href="https://www.mediawiki.compulab.com/w/index.php?title=CM-T43:_U-Boot:_Building_Images&amp;action=history"/>
	<updated>2026-05-08T09:40:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://www.mediawiki.compulab.com/w/index.php?title=CM-T43:_U-Boot:_Building_Images&amp;diff=2843&amp;oldid=prev</id>
		<title>Nikita: /* Snapshot download */</title>
		<link rel="alternate" type="text/html" href="https://www.mediawiki.compulab.com/w/index.php?title=CM-T43:_U-Boot:_Building_Images&amp;diff=2843&amp;oldid=prev"/>
		<updated>2016-02-14T14:23:02Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Snapshot download&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
CM-T43 firmware consists of two components: Secondary Program Loader (SPL) and U-Boot.&lt;br /&gt;
Both components are based on [http://www.denx.de/wiki/U-Boot/WebHome U-Boot] source code.&lt;br /&gt;
SPL is the bootstrap utility invoked by the CPU internal boot ROM code of the AM437x SoC.&lt;br /&gt;
SPL performs minimal hardware initialization and loads U-Boot from the same boot device.&lt;br /&gt;
U-Boot initializes hardware modules necessary for system boot and loads the operating system.&lt;br /&gt;
&lt;br /&gt;
== Building Firmware images for CM-T43 ==&lt;br /&gt;
=== Getting U-Boot sources ===&lt;br /&gt;
There are various ways to get U-Boot sources that can be used as a baseline for CM-T43 SPL and U-Boot.&lt;br /&gt;
For instance, a copy of the U-Boot mainline git tree can be created or a the sources snapshot can be downloaded.&lt;br /&gt;
We assume that you have created {{filename|/home/development/cm-t43/u-boot}} directory for CM-T43 U-Boot development.&lt;br /&gt;
&lt;br /&gt;
==== Snapshot download ====&lt;br /&gt;
* Download [http://git.denx.de/?p=u-boot.git;a=snapshot;h=fa85e826c16b9ce1ad302a57e9c4b24db0d8b930 v2016.01] snapshot with your web browser.&lt;br /&gt;
* Extract the downloaded archive {{filename|u-boot-fa85e82.tar.gz}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/cm-t43/u-boot&lt;br /&gt;
tar xvf /path/to/downloaded/u-boot-fa85e82.tar.gz&lt;br /&gt;
mv u-boot u-boot-cm-t43&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: This will create {{filename|/home/development/cm-t43/u-boot/u-boot-cm-t43}} directory containing U-Boot source code tree.&lt;br /&gt;
* Apply the CM-T43 patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/cm-t43/u-boot/u-boot-cm-t43&lt;br /&gt;
patch -p1 &amp;lt; /path/to/cm-t43-u-boot-package/u-boot/u-boot-v2016.01-cm-t43-1.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Git clone ====&lt;br /&gt;
* Install [http://git-scm.com/ git] version control system.&lt;br /&gt;
* Create a clone of U-Boot tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/development/cm-t43/u-boot&lt;br /&gt;
git clone git://git.denx.de/u-boot.git u-boot-cm-t43&lt;br /&gt;
cd /home/development/cm-t43/u-boot/u-boot-cm-t43&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Create a branch for CM-T43 development. The CM-T43 patches are generated vs. v2016.01 tag (fa85e826c16b9ce1ad302a57e9c4b24db0d8b930 commit) in the U-Boot tree. It is recommended to use exactly the same baseline to avoid merge conflicts.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b cm-t43-dev v2016.01&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Apply the CM-T43 patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply /path/to/cm-t43-u-boot-package/u-boot/u-boot-v2016.01-cm-t43-1.patch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Building the firmware images ===&lt;br /&gt;
* First, compile both SPL and U-Boot. The following commands create the {{filename|MLO}}, {{filename|MLO.byteswap}}, and {{filename|u-boot.img}} binaries (along with other image types):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
export CROSS_COMPILE=arm-none-linux-eabi-&lt;br /&gt;
make mrproper&lt;br /&gt;
make cm_t43_defconfig &amp;amp;&amp;amp; make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Create the combined image for SPI-flash installation by creating a 0xFF initialized 768KB {{filename|cm-t43-firmware-sf}} file, and writing the {{filename|MLO.byteswap}}, {{filename|MLO}}, and {{filename|u-boot.img}} data to the appropriate offsets within the {{filename|cm-t43-firmware}} file. The {{filename|MLO.byteswap}} file will be written into the first 3 64KB segments to allow the bootROM to find it in 3 different places, thus improving reliability. The non-byteswapped {{filename|MLO}} will occupy the 4th 64KB segment, thus allowing the same {{filename|cm-t43-firmware}} to be written into SD-card, for which the bootROM requires non-byteswapped data. Finally, {{filename|u-boot.img}} is written to the 256KB offset, right at the end of the 4 MLO segments.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/zero count=768 bs=1K | tr '\000' '\377' &amp;gt; cm-t43-firmware&lt;br /&gt;
dd if=MLO.byteswap of=cm-t43-firmware bs=1k seek=0 conv=notrunc&lt;br /&gt;
dd if=MLO.byteswap of=cm-t43-firmware bs=1k seek=64 conv=notrunc&lt;br /&gt;
dd if=MLO.byteswap of=cm-t43-firmware bs=1k seek=128 conv=notrunc&lt;br /&gt;
dd if=MLO of=cm-t43-firmware bs=1k seek=192 conv=notrunc&lt;br /&gt;
dd if=u-boot.img of=cm-t43-firmware bs=1k seek=256 conv=notrunc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You can now install the {{filename|cm-t43-firmware}} file into the CM-T43 SPI flash or SD-card.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[CM-T43: U-Boot: Firmware Overview]]&lt;br /&gt;
* [[CM-T43: U-Boot: Firmware Update]]&lt;br /&gt;
* [[U-Boot quick reference]]&lt;br /&gt;
* [[U-Boot images]]&lt;br /&gt;
* [http://www.denx.de/wiki/U-Boot/Documentation U-Boot documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:U-Boot]]&lt;br /&gt;
[[Category:CM-T43]]&lt;/div&gt;</summary>
		<author><name>Nikita</name></author>
		
	</entry>
</feed>