Difference between revisions of "iMX6 TinyRex Ultra U-Boot"

From Voipac Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
==== Initial steps ====
 
==== Initial steps ====
 
Create working directory
 
Create working directory
<br /><code>
+
<br /><pre>
 
mkdir -pv ~/workdir/imx6/bootloader/
 
mkdir -pv ~/workdir/imx6/bootloader/
</code>
+
</pre>
  
 
== U-Boot v2015.04 ==
 
== U-Boot v2015.04 ==
  
 
=== Download & Extract source code ===
 
=== Download & Extract source code ===
<code>
+
<pre>
 
cd ~/workdir/imx6/bootloader/
 
cd ~/workdir/imx6/bootloader/
 
git clone -b uboot-imx-v2015.04 --single-branch https://github.com/voipac/uboot-imx uboot-imx-v2015.04-rex
 
git clone -b uboot-imx-v2015.04 --single-branch https://github.com/voipac/uboot-imx uboot-imx-v2015.04-rex
 
cd uboot-imx-v2015.04-rex
 
cd uboot-imx-v2015.04-rex
</code>
+
</pre>
  
 
=== Compile ===
 
=== Compile ===
Line 35: Line 35:
  
 
==== Compiling for SD3 and Android 7.x ====
 
==== Compiling for SD3 and Android 7.x ====
<code>
+
<pre>
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
make distclean
 
make distclean
Line 41: Line 41:
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultraandroid.imx
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultraandroid.imx
</code>
+
</pre>
  
 
==== Compiling for SPI1 and Linux/Yocto ====
 
==== Compiling for SPI1 and Linux/Yocto ====
<code>
+
<pre>
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
make distclean
 
make distclean
Line 50: Line 50:
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrarecovery.imx
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrarecovery.imx
</code>
+
</pre>
  
 
==== Compiling for SATA ====
 
==== Compiling for SATA ====
<code>
+
<pre>
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
 
make distclean
 
make distclean
Line 59: Line 59:
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrasata.imx
 
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrasata.imx
</code>
+
</pre>
  
  

Revision as of 22:33, 25 February 2021

U-boot is a bootloader responsible for hardware initialization, loading and booting linux kernel. It is also used for module flashing.

Build

Set toolchain

Export toolchain variables for every related terminal session.

Initial steps

Create working directory


mkdir -pv ~/workdir/imx6/bootloader/

U-Boot v2015.04

Download & Extract source code

cd ~/workdir/imx6/bootloader/
git clone -b uboot-imx-v2015.04 --single-branch https://github.com/voipac/uboot-imx uboot-imx-v2015.04-rex
cd uboot-imx-v2015.04-rex

Compile

Output file is called u-boot.imx

Compiling for SD3 and Linux/Yocto

cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
make distclean
make mx6tinyrexultra_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultra.imx

Compiling for SD3 and Android 7.x

cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
make distclean
make mx6tinyrexultraandroid_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultraandroid.imx

Compiling for SPI1 and Linux/Yocto

cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
make distclean
make mx6tinyrexultrarecovery_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrarecovery.imx

Compiling for SATA

cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex
make distclean
make mx6tinyrexultrasata_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
cp -av u-boot.imx /srv/tftp/imx6/u-boot-imx6-tinyrexultrasata.imx