Difference between revisions of "iMX6 TinyRex Ultra U-Boot"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
==== Initial steps ==== | ==== Initial steps ==== | ||
Create working directory | Create working directory | ||
− | + | <pre> | |
mkdir -pv ~/workdir/imx6/bootloader/ | mkdir -pv ~/workdir/imx6/bootloader/ | ||
</pre> | </pre> | ||
Line 25: | Line 25: | ||
Output file is called u-boot.imx | Output file is called u-boot.imx | ||
− | ==== | + | ==== Compile for SD3 and Linux/Yocto ==== |
<pre> | <pre> | ||
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | ||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
− | ==== | + | ==== Compile for SD3 and Android 7.x ==== |
<pre> | <pre> | ||
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | ||
Line 43: | Line 43: | ||
</pre> | </pre> | ||
− | ==== | + | ==== Compile for SPI1 and Linux/Yocto ==== |
<pre> | <pre> | ||
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | ||
Line 52: | Line 52: | ||
</pre> | </pre> | ||
− | ==== | + | ==== Compile for SATA ==== |
<pre> | <pre> | ||
cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | cd ~/workdir/imx6/bootloader/uboot-imx-v2015.04-rex | ||
Line 61: | Line 61: | ||
</pre> | </pre> | ||
+ | === How to Flash new version === | ||
+ | ==== Flash Normal image on SD3 ==== | ||
+ | <pre> | ||
+ | sudo dd if=u-boot-imx6-tinyrex*.imx of=/dev/sdc bs=1k seek=1 skip=0 oflag=dsync | ||
+ | </pre> | ||
+ | |||
+ | ==== Flash Recovery image on SPI1 ==== | ||
+ | <pre> | ||
+ | setenv ipaddr 192.168.0.150 | ||
+ | setenv serverip 192.168.0.1 | ||
+ | mw.b 0x10800000 0xFF 0x80000 | ||
+ | tftp 0x10800000 imx6/u-boot-imx6-tinyrex*recovery.imx | ||
+ | if sf probe 0:0; then sf erase 0x0 0x80000;sf write 0x10800000 0x400 0x7fc00; fi | ||
+ | </pre> | ||
− | ==== | + | ==== Flash on SATA ==== |
− | + | <pre> | |
+ | setenv ipaddr 192.168.0.150 | ||
+ | setenv serverip 192.168.0.1 | ||
+ | mw.b 0x10800000 0xFF 0x80000 | ||
+ | tftp 0x10800000 imx6/u-boot-imx6-tinyrex*sata.imx | ||
+ | if sata init; then sata write 0x10800000 0x2 0x3ff; fi | ||
+ | </pre> | ||
==== ==== | ==== ==== |
Revision as of 22:39, 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
Compile 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
Compile 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
Compile 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
Compile 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
How to Flash new version
Flash Normal image on SD3
sudo dd if=u-boot-imx6-tinyrex*.imx of=/dev/sdc bs=1k seek=1 skip=0 oflag=dsync
Flash Recovery image on SPI1
setenv ipaddr 192.168.0.150 setenv serverip 192.168.0.1 mw.b 0x10800000 0xFF 0x80000 tftp 0x10800000 imx6/u-boot-imx6-tinyrex*recovery.imx if sf probe 0:0; then sf erase 0x0 0x80000;sf write 0x10800000 0x400 0x7fc00; fi
Flash on SATA
setenv ipaddr 192.168.0.150 setenv serverip 192.168.0.1 mw.b 0x10800000 0xFF 0x80000 tftp 0x10800000 imx6/u-boot-imx6-tinyrex*sata.imx if sata init; then sata write 0x10800000 0x2 0x3ff; fi