Difference between revisions of "Transclusion: CL-SOM-iMX7: U-Boot: Building Images"

From Compulab Mediawiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==== Snapshot download ====
 
* Download [http://git.denx.de/?p=u-boot.git;a=snapshot;h=d85ca029f257b53a96da6c2fb421e78a003a9943;sf=tgz v2017.07] snapshot with your web browser.
 
* Extract the downloaded archive {{filename|u-boot-d85ca02.tar.gz}}
 
<pre>
 
cd /home/development/cl-som-imx7/u-boot
 
tar xvf /path/to/downloaded/u-boot-d85ca02.tar.gz
 
mv u-boot* u-boot-cl-som-imx7
 
</pre>
 
: This will create {{filename|/home/development/cl-som-imx7/u-boot/u-boot-cl-som-imx7}} directory containing U-Boot source code tree.
 
* Apply the CL-SOM-iMX7 patch
 
<pre>
 
cd /home/development/cl-som-imx7/u-boot/u-boot-cl-som-imx7
 
patch -p1 < /path/to/cl-som-imx7-u-boot-package/u-boot/u-boot-*.patch
 
</pre>
 
 
 
==== Git clone ====
 
==== Git clone ====
 
* Install [http://git-scm.com/ git] version control system.
 
* Install [http://git-scm.com/ git] version control system.
Line 19: Line 4:
 
<pre>
 
<pre>
 
cd /home/development/cl-som-imx7/u-boot
 
cd /home/development/cl-som-imx7/u-boot
git clone git://git.denx.de/u-boot.git u-boot-cl-som-imx7
+
git clone https://github.com/compulab/u-boot.git -b v2017.07-cl-som-imx7-1.9 u-boot-cl-som-imx7
cd /home/development/cl-som-imx7/u-boot/u-boot-cl-som-imx7
+
cd u-boot-cl-som-imx7
</pre>
 
* Create a branch for CL-SOM-iMX7 development. The CL-SOM-iMX7 patches are generated vs. v2017.07 tag (d85ca029f257b53a96da6c2fb421e78a003a9943 commit) in the U-Boot tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
 
<pre>
 
git checkout -b cl-som-imx7-dev v2017.07
 
</pre>
 
* Apply CL-SOM-iMX7 patch
 
<pre>
 
git am /path/to/cl-som-imx7-u-boot-package/u-boot/patches/*.patch
 
 
</pre>
 
</pre>
 +
* Create a branch for CL-SOM-iMX7 development
 +
<pre>git checkout -b cl-som-imx7-1.9-devel</pre>
  
 
=== Building the firmware images ===
 
=== Building the firmware images ===
Line 41: Line 20:
 
* Merge the SPL and U-Boot images into one firmware image:
 
* Merge the SPL and U-Boot images into one firmware image:
 
<pre>
 
<pre>
dd if=/dev/zero count=576 bs=1K | tr '\000' '\377' > of=cl-som-imx7-firmware
+
dd if=/dev/zero count=640 bs=1K | tr '\000' '\377' > cl-som-imx7-firmware
 
dd if=SPL of=cl-som-imx7-firmware bs=1K seek=1 conv=notrunc
 
dd if=SPL of=cl-som-imx7-firmware bs=1K seek=1 conv=notrunc
 
dd if=u-boot.img of=cl-som-imx7-firmware bs=1K seek=64 conv=notrunc
 
dd if=u-boot.img of=cl-som-imx7-firmware bs=1K seek=64 conv=notrunc
 
</pre>
 
</pre>

Latest revision as of 15:09, 28 June 2023

Git clone

  • Install git version control system.
  • Create a clone of U-Boot tree
cd /home/development/cl-som-imx7/u-boot
git clone https://github.com/compulab/u-boot.git -b v2017.07-cl-som-imx7-1.9 u-boot-cl-som-imx7
cd u-boot-cl-som-imx7
  • Create a branch for CL-SOM-iMX7 development
git checkout -b cl-som-imx7-1.9-devel

Building the firmware images

  • First, compile U-Boot. The following commands create the u-boot.imx binary (along with other image types):
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-eabi-
make mrproper
make cl-som-imx7_defconfig && make
  • Merge the SPL and U-Boot images into one firmware image:
dd if=/dev/zero count=640 bs=1K | tr '\000' '\377' > cl-som-imx7-firmware
dd if=SPL of=cl-som-imx7-firmware bs=1K seek=1 conv=notrunc
dd if=u-boot.img of=cl-som-imx7-firmware bs=1K seek=64 conv=notrunc