Необходимое ПО

Download link esr2x.recovery-xm_1.14.uboot

Download link esr2x.recovery-xm_1.28.uboot

Link to download the archive of the intermediate version of the software ПО 1.20.4 build 6

Link to download the archive of the software version 1.28.1 build7

Problem description

The instructions for updating the software to version 1.23.6 and higher for the ESR-20/21 models contain a warning about the need to update through the interim software version 1.20.4:

If the router's software version is 1.18.11 or 1.23 and higher, then esr2x.recovery-xm_1.28.uboot and 1.28.1 software must be used for recovery!


If you ignore this step, after updating the main software to version 1.23.6 and higher, the router will reboot cyclically with the following log:

BL1:1.14.0.18 (30/08/2021 - 19:09:05)

INFO:    BL1: RAM 0x6517a800 - 0x65180000
INFO:    Using crypto library 'mbed TLS'
INFO:    BL1: Loading BL2
INFO:    BL1: Watchdog Enabled
INFO:    memmap_block_open 0x68000000
WARNING: Firmware Image Package header check failed.
WARNING: Failed to obtain reference to image id=6 (-2)
INFO:    memmap_block_open 0x68020000
WARNING: Firmware Image Package header check failed.
WARNING: Failed to obtain reference to image id=6 (-2)
INFO:    memmap_block_open 0x68040000
WARNING: Firmware Image Package header check failed.
WARNING: Failed to obtain reference to image id=6 (-2)
INFO:    memmap_block_open 0x68060000
WARNING: Firmware Image Package header check failed.
WARNING: Failed to obtain reference to image id=6 (-2)
INFO:    memmap_block_open 0x68080000
INFO:    Loading image id=6 at address 0x65196000
INFO:    Skip reserving region [base = 0x65196000, size = 0x37f]
INFO:    Image id=6 loaded at address 0x65196000, size = 0x37f
INFO:    Authenticating image id=6 0x65196000, 0x37f
INFO:    AUTH_METHOD_SIG
INFO:    readKeys (DAUTH) from BL1
INFO:    AB
INFO:    AUTH_METHOD_NVCTR
INFO:    AUTH_METHOD_NONE
INFO:    AUTH_METHOD_NONE
INFO:    Loading image id=1 at address 0x65196000
INFO:    Free_base: 0x6517ca40, Free_size: 0x6517ca48, addr: 0x65196000, size: 0x2b4f8
INFO:    Image id=1 loaded at address 0x65196000, size = 0x2b4f8
INFO:    Authenticating image id=1 0x65196000, 0x2b4f8
INFO:    AUTH_METHOD_HASH
INFO:    AUTH_METHOD_NONE
INFO:    AUTH_METHOD_NONE
INFO:    AUTH_METHOD_NONE
NOTICE:  BL1: Booting BL2
INFO:    Entry point address = 0x65196000
INFO:    SPSR = 0x3c5
INFO:    Free_base: 0x6517ca40, Free_size: 0x6517ca48, addr: 0x6517a800, size: 0x5800
INFO:    Scan and configure IDM slave wrappers
INFO:    IDM slave wrapper scan and config complete
INFO:    Scan and configure IDM master wrappers
INFO:    IDMM 0         AXI_PCIE_M0: 0000000021000408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 0         AXI_PCIE_M0: 0000000021000408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 1         AXI_PCIE_M1: 0000000021001408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 1         AXI_PCIE_M1: 0000000021001408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 2         AXI_PCIE_M2: 0000000021002408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 2         AXI_PCIE_M2: 0000000021002408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 3         AXI_PCIE_M3: 0000000021003408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 3         AXI_PCIE_M3: 0000000021003408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 4         AXI_PCIE_M4: 0000000051000408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 4         AXI_PCIE_M4: 0000000051000408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 5         AXI_PCIE_M5: 0000000051001408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 5         AXI_PCIE_M5: 0000000051001408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 6         AXI_PCIE_M6: 0000000051002408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 6         AXI_PCIE_M6: 0000000051002408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 7         AXI_PCIE_M7: 0000000051003408 current ARCACHE=1 AWCACHE=1 (40008223)
INFO:    IDMM 7         AXI_PCIE_M7: 0000000051003408 updated ARCACHE=f AWCACHE=f (400083FF)
INFO:    IDMM 29                AMAC: 0000000061090408 current ARCACHE=3 AWCACHE=3 (00030185)
INFO:    IDMM 29                AMAC: 0000000061090408 updated ARCACHE=f AWCACHE=f (000F0785)
INFO:    IDMM 32                DMAC: 0000000067002408 current ARCACHE=0 AWCACHE=0 (3C001E01)
INFO:    IDMM 32                DMAC: 0000000067002408 updated ARCACHE=f AWCACHE=f (3CFF1E01)
INFO:    IDMM 35            USB2H_M0: 0000000067010408 current ARCACHE=0 AWCACHE=0 (03DE0000)
INFO:    IDMM 35            USB2H_M0: 0000000067010408 updated ARCACHE=f AWCACHE=f (03DE03FC)
INFO:    IDMM 36            USB2H_M1: 0000000067011408 current ARCACHE=0 AWCACHE=0 (03DE0000)
INFO:    IDMM 36            USB2H_M1: 0000000067011408 updated ARCACHE=f AWCACHE=f (03DE03FC)
INFO:    IDMM 37            USB2_DRD: 0000000067012408 current ARCACHE=0 AWCACHE=0 (03DE0000)
INFO:    IDMM 37            USB2_DRD: 0000000067012408 updated ARCACHE=f AWCACHE=f (03DE03FC)
INFO:    IDMM 38             SDIO_M0: 0000000067013408 current ARCACHE=0 AWCACHE=0 (00000001)
INFO:    IDMM 38             SDIO_M0: 0000000067013408 updated ARCACHE=f AWCACHE=f (7F800001)
INFO:    IDMM 39             SDIO_M1: 0000000067014408 current ARCACHE=0 AWCACHE=0 (00000001)
INFO:    IDMM 39             SDIO_M1: 0000000067014408 updated ARCACHE=f AWCACHE=f (7F800001)
INFO:    IDM master wrapper scan and config complete
NOTICE:  IHOST: Broadcom BCM58712 B0
INFO:    mdio_update: phy_id 3, addr 0, value 0x808
INFO:    mdio_update: phy_id 3, addr 1, value 0x1804
INFO:    mdio_update: phy_id 3, addr 2, value 0x4e8a
INFO:    mdio_update: phy_id 3, addr 3, value 0x601
INFO:    mdio_update: phy_id 3, addr 4, value 0xcce0
INFO:    mdio_update: phy_id 3, addr 5, value 0x580
INFO:    mdio_update: phy_id 3, addr 6, value 0xb000
INFO:    mdio_update: phy_id 3, addr 7, value 0x5fff
INFO:    mdio_update: phy_id 3, addr 8, value 0x0
INFO:    mdio_update: phy_id 3, addr 9, value 0x120c
INFO:    mdio_update: phy_id 4, addr 0, value 0x808
INFO:    mdio_update: phy_id 4, addr 1, value 0x1804
INFO:    mdio_update: phy_id 4, addr 2, value 0x4e8a
INFO:    mdio_update: phy_id 4, addr 3, value 0x601
INFO:    mdio_update: phy_id 4, addr 4, value 0xcce0
INFO:    mdio_update: phy_id 4, addr 5, value 0x580
INFO:    mdio_update: phy_id 4, addr 6, value 0xb000
INFO:    mdio_update: phy_id 4, addr 7, value 0x5fff
INFO:    mdio_update: phy_id 4, addr 8, value 0x0
INFO:    mdio_update: phy_id 4, addr 9, value 0x120c
INFO:    mdio_update: phy_id 2, addr 0, value 0x808

This log informs about an unsuccessful attempt to start the system using a secondary bootloader (u-boot). 

This guide describes how to restore a successful boot of the secondary bootloader (u-boot) and update the software to an intermediate version.

Preparation

  1. Download the esr2x.recovery-xm_1.14.uboot file and place it on your PC in an easy-to-select section and send it to the router.
  2.  Download the archive with the interim software version 1.20.4 build 6
  3. Prepare an SD card with a capacity of up to 8 GB or USB FLASH, create an MBR partition table, one partition and format it to FAT32.
  4. Extract the following files from the archive and copy them to the root partition of the SD/USB media (links to download the archive of the interim version of 1.20.4 are given at the beginning of the article):
    esr2x-1.20.4-build6.uboot - secondary loader 1.20.4
    esr2x-1.20.4-build6.firmware - basic SOFTWARE 1.20.4
  5. Before starting the software recovery work on the service router, the prepared media must be installed in the appropriate slot of the router.


Software recovery using minicom on Linux

To restore the u-boot boot, follow these steps:

  1. Turn off the power to the router.
  2. Press and hold the F button.
  3. Apply power to the device and wait for the suggestion to send data via X-modem.
  4. Release the F button.
download mode via xmodem
L1:1.14.0.18 (30/08/2021 - 19:09:05)

INFO:    BL1: RAM 0x6517a800 - 0x65180000
INFO:    Using crypto library 'mbed TLS'
INFO:    BL1: Start recovery process ...
INFO:    
Send data using the xmodem from your terminal now ...
CINFO: ... No Response 
CINFO: ... No Response 
CINFO: ... No Response 
CINFO: ... No Response 

An example of recovery is given based on the use of the minicom console terminal on Linux. For Windows, you can use the Tera Term v5.0 program. (An example is given at the end of the article).

       5. In the terminal, press the key combination "Ctrl"+"A"+"Z" and then press the "S" key to transfer the file.

       6. Select "xmodem" (transfer the file via the x modem)

      7. Select the location of the desired esr2x.recovery-xm_1.14.uboot file 

      8. Wait about 10 minutes for the file to be uploaded to the router.



     9. At the end of the download, press any key. The router will reboot:


     10. After restarting, the router will display a prompt prompt for u-boot recovery:

RECOVERY.u-boot>


Please note that the network will not work for ESR-21 in this mode. (You won't be able to use tftp_update).

     11. Run the update command sequence shown below. The commands are given for the case of using USB FLASH.

RECOVERY.u-boot> usb_update_uboot esr2x-1.20.4-build6.uboot


resetting USB...
USB0:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
reading esr2x-1.20.4-build6.uboot
1723838 bytes read in 140 ms (11.7 MiB/s)

Download file 'esr2x-1.20.4-build6.uboot': OK

Check U-Boot image ... OK
SF: Detected MX25L12805 with page size 256 Bytes, erase size 64 KiB, total 16 MB
................................
SF: 2097152 bytes @ 0x80000 Erased: OK
device 0 offset 0x80000, size 0x1a4dbe
SF: 1723838 bytes @ 0x80000 Written: OK

U-Boot update: OK


RECOVERY.u-boot> usb_update_firmware esr2x-1.20.4-build6.firmware image1
resetting USB...
USB0:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
reading esr2x-1.20.4-build6.firmware
71816544 bytes read in 3718 ms (18.4 MiB/s)

Download file 'esr2x-1.20.4-build6.firmware': OK


Firmware update: OK
RECOVERY.u-boot> boot_system image1
SF: Detected MX25L12805 with page size 256 Bytes, erase size 64 KiB, total 16 MB
..
SF: 131072 bytes @ 0x2c0000 Erased: OK
device 0 offset 0x2c0000, size 0x5
SF: 5 bytes @ 0x2c0000 Written: OK

Set active image: OK
RECOVERY.u-boot> reset


12. As a result of the above actions, the router will be restored using software version 1.20.4.

To upgrade to the current software version, you must use the update instructions that are archived with the current software version.


Software recovery using Tera Term v5.0 on Windows

1. You need to configure the connection to the router via the serial port.

Launching the Tera Term program. Go to the Settings menu ==>>> COM-port and set the necessary parameters. 

The COM port number can be found through the Windows Device Manager:


Next, save the settings (menu item Settings == >>> Save settings).

Setting up a new connection File ==>>> New connection and select the COM-port:

2. Turn off the power to the router.

3. Press and hold the F button.

4. Apply power to the device and wait for the suggestion to send data via X-modem.

5. Release the F button.

download mode via xmodem
L1:1.14.0.18 (30/08/2021 - 19:09:05)

INFO:    BL1: RAM 0x6517a800 - 0x65180000
INFO:    Using crypto library 'mbed TLS'
INFO:    BL1: Start recovery process ...
INFO:    
Send data using the xmodem from your terminal now ...
CINFO: ... No Response 
CINFO: ... No Response 
CINFO: ... No Response 
CINFO: ... No Response 

6. Transfer the recovery file to uboot. Go to the File menu ==>>> Transfer ==>>>XMODEM ==>>> Transfer. And select the file to transfer:

7. We wait about 10 minutes while the file is being transferred:

8. After the file transfer is complete, the ESR will reboot on its own. After downloading, the recovery uboot prompt appears:

Please note that the network will not work for ESR-21 in this mode. (You won't be able to use tftp_update).

9. Run the update command sequence shown below. The commands are given for the case of using USB FLASH.

RECOVERY.u-boot> usb_update_uboot esr2x-1.20.4-build6.uboot
resetting USB...
USB0:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
reading esr2x-1.20.4-build6.uboot
1723838 bytes read in 140 ms (11.7 MiB/s)

Download file 'esr2x-1.20.4-build6.uboot': OK

Check U-Boot image ... OK
SF: Detected MX25L12805 with page size 256 Bytes, erase size 64 KiB, total 16 MB
................................
SF: 2097152 bytes @ 0x80000 Erased: OK
device 0 offset 0x80000, size 0x1a4dbe
SF: 1723838 bytes @ 0x80000 Written: OK

U-Boot update: OK
RECOVERY.u-boot> usb_update_firmware esr2x-1.20.4-build6.firmware image1
resetting USB...
USB0:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
USB1:
Initializing USB2 Host
USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
reading esr2x-1.20.4-build6.firmware
71816544 bytes read in 3718 ms (18.4 MiB/s)

Download file 'esr2x-1.20.4-build6.firmware': OK


Firmware update: OK
RECOVERY.u-boot> boot_system image1
SF: Detected MX25L12805 with page size 256 Bytes, erase size 64 KiB, total 16 MB
..
SF: 131072 bytes @ 0x2c0000 Erased: OK
device 0 offset 0x2c0000, size 0x5
SF: 5 bytes @ 0x2c0000 Written: OK

Set active image: OK
RECOVERY.u-boot> reset

10. As a result of the above actions, the router will be restored using software version 1.20.4.

To upgrade to the current software version, you must use the update instructions that are archived with the current software version.