Difference between revisions of "iMX6 OpenRex Ultra Recovery"

From Voipac Wiki
Jump to navigation Jump to search
(Created page with "Category:iMX6 OpenRex SBC Category:iMX6 OpenRex Ultra Category:iMX6 OpenRex Recovery <!-- --> <div style="float:right">__TOC__</div> == Description == Recovery pro...")
 
 
(14 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
 
== Description ==
 
== Description ==
Recovery procedure consist from following steps:
+
The recovery procedure consists of following steps:
* Loading bootloader binary over USB using Mfgtools fealture
+
* Loading bootloader binary over USB using Mfgtool feature
 
* Flashing new bootloader over Ethernet using TFTP
 
* Flashing new bootloader over Ethernet using TFTP
 
* Erasing bootloader environment
 
* Erasing bootloader environment
* Reseting module
+
* Resetting SBC
* Creating a new SD card containing filesystem (if needed)
+
* Creating a new SD card containing filesystem
 +
<br />
 +
Requirements:
 +
* [http://downloads.voipac.com/files/iMX6_OpenRex_SBC/tools/mfgtools-Imx6Rex.zip Mfg_tool]
 +
* Serial adapter with terminal application
 +
* TFTP server
 +
* DHCP server (optional)
 +
<br />
 +
This procedure is intended to be used to erase bootloader environment or to load the default environment.
  
== Bootloader ==
+
== Updating bootloader ==
=== Updating from TFTP server ===
+
=== Using Mfgtool ===
Downloading the U-Boot image (on computer acting as TFTP server):
+
If the board is unable to boot (e.g. when bootloader was deleted or not transferred successfully), [[iMX6 OpenRex USB Booting|USB Booting]] option should be used to load the image file.
 +
 
 +
=== From TFTP server ===
 +
Download the U-Boot image (on computer acting as TFTP server):
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd /srv/tftp/imx6/
 
cd /srv/tftp/imx6/
Line 20: Line 31:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Updating in U-Boot:
+
Update the bootloader in U-Boot:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
setenv ipaddr 192.168.0.150
 
setenv ipaddr 192.168.0.150
Line 29: Line 40:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Updating from SD card ===
+
=== From SD card ===
 
==== Creating SD card in Linux ====
 
==== Creating SD card in Linux ====
 
Create VFAT partition:
 
Create VFAT partition:
Line 41: Line 52:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Copy bootloader to SD card:
+
Check if device was correctly mounted and copy bootloader into it:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd /media/user/61B3-D9BF  
 
cd /media/user/61B3-D9BF  
Line 47: Line 58:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Updating in U-Boot:
+
Update the bootloader in U-Boot:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
mw.b 0x10800000 0xFF 0x80000;
 
mw.b 0x10800000 0xFF 0x80000;
Line 54: Line 65:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== Erasing bootloader environment ===
+
== Erasing bootloader environment ==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
OpenRex U-Boot > env default -f -a
 
OpenRex U-Boot > env default -f -a
Line 65: Line 76:
  
 
== Creating bootable SD card ==
 
== Creating bootable SD card ==
Follow [[iMX6 Open Rex Ultra Creating Bootable microSD Card|these steps]] to prepare the SD card
+
If a fresh SD card containing filesystem is needed, follow [[iMX6 OpenRex Ultra Creating Bootable microSD Card|these steps]] to prepare the device.

Latest revision as of 11:13, 24 April 2022

Description

The recovery procedure consists of following steps:

  • Loading bootloader binary over USB using Mfgtool feature
  • Flashing new bootloader over Ethernet using TFTP
  • Erasing bootloader environment
  • Resetting SBC
  • Creating a new SD card containing filesystem


Requirements:

  • Mfg_tool
  • Serial adapter with terminal application
  • TFTP server
  • DHCP server (optional)


This procedure is intended to be used to erase bootloader environment or to load the default environment.

Updating bootloader

Using Mfgtool

If the board is unable to boot (e.g. when bootloader was deleted or not transferred successfully), USB Booting option should be used to load the image file.

From TFTP server

Download the U-Boot image (on computer acting as TFTP server):

cd /srv/tftp/imx6/
wget http://downloads.voipac.com/files/iMX6_OpenRex_SBC/software/uboot/binaries/u-boot-imx6-openrexultra-2.4.imx

Update the bootloader in U-Boot:

setenv ipaddr 192.168.0.150
setenv serverip 192.168.0.1

mw.b 0x10800000 0xFF 0x80000;if tftp 0x10800000 imx6/u-boot-imx6-openrexultra-2.4.imx; then if sf probe 2:2; then sf erase 0x0 0x80000;sf write 0x10800000 0x400 0x7fc00; fi; fi
reset

From SD card

Creating SD card in Linux

Create VFAT partition:

sudo fdisk /dev/sdX

Unplug/plug SD card and format the partition afterwards:

sudo mkfs.vfat /dev/sdX1

Check if device was correctly mounted and copy bootloader into it:

cd /media/user/61B3-D9BF 
wget http://downloads.voipac.com/files/iMX6_OpenRex_SBC/software/uboot/binaries/u-boot-imx6-openrexultra-2.4.imx

Update the bootloader in U-Boot:

mw.b 0x10800000 0xFF 0x80000;
if fatload mmc 0:1 0x10800000 u-boot-imx6-openrexultra-2.4.imx; then if sf probe 2:2; then sf erase 0x0 0x80000;sf write 0x10800000 0x400 0x7fc00; fi; fi
reset

Erasing bootloader environment

OpenRex U-Boot > env default -f -a
## Resetting to default environment
OpenRex U-Boot > saveenv
Saving Environment to SPI Flash...
SF: Detected SST26VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiB
Erasing SPI flash...Writing to SPI flash...done

Creating bootable SD card

If a fresh SD card containing filesystem is needed, follow these steps to prepare the device.