Omnia fails to boot after changes on u-boot

Hi all,

By accident (meant for another terminal window), I run fw_setenv ipaddr 192.168.3.10 and then fw_setenv ipaddr to try to undo my change, which probably removed the existing uboot variable which wasn’t visible initially when running fw_printenv.

After a reboot Omnia is not able to start and only the power and WAN LEDs are on (when a WAN cable is connected). I’ve tried all the reset methods (reset to latest snapshot, factory reset, download from the internet, boot from usb etc) but none seem to work. The LEDs will go green for a few seconds and then reboot.

I’ve connected with serial cable and was able to see the logs when booting both from a reset and through rescue mode 7 (rescue shell).

Logs from the regular boot which eventually times out while trying to load the kernel. This seems to be caused by the bad U-Boot variable.

BootROM - 1.73
Booting from SPI flash

U-Boot SPL 2022.10-rc5-OpenWrt-r16654+122-8e5de89769 (Sep 20 2022 - 14:11:36 +0000)
High speed PHY - Version: 2.0
MiniPCIe/mSATA card detection... MiniPCIe
WWAN slot configuration... PCIe+USB2.0
Detected Device ID 6820
board SerDes lanes topology details:
 | Lane # | Speed |  Type       |
 --------------------------------
 |   0    |   5   | PCIe0       |
 |   1    |   5   | USB3 HOST0  |
 |   2    |   5   | PCIe1       |
 |   3    |   5   | USB3 HOST1  |
 |   4    |   5   | PCIe2       |
 |   5    |   0   | SGMII2      |
 --------------------------------
High speed PHY - Ended Successfully
mv_ddr: 14.0.0
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
mv_ddr: completed successfully
Initializing LAN eth switch... done
Trying to boot from SPI


U-Boot 2022.10-rc5-OpenWrt-r16654+122-8e5de89769 (Sep 20 2022 - 14:11:36 +0000), Build: jenkins-turris-os-packages-lions-omnia-2009

SoC:   MV88F6820-B0 at 1600 MHz
DRAM:  2 GiB (800 MHz, 32-bit, 2T, ECC not enabled)
Core:  71 devices, 24 uclasses, devicetree: separate
WDT:   Started watchdog@20300 with servicing (60s timeout)
MMC:   mv_sdh: 0
Loading Environment from SPIFlash... SF: Detected s25fl164k with page size 256 Bytes, erase size 4 KiB, total 8 MiB
OK
Model: Turris Omnia
  MCU type: GD32 (with peripheral resets)
  MCU version: 07eba1fb7d186f285f3194a86fedcfa85aa4568b/67eddc9540526d0a9d9660f7a7867af9a28a68d6
  RAM size: 2048 MiB
  Serial Number: <REDACTED>
Disabling MCU watchdog... disabled
Regdomain set to **
pcie0.0: Link up
pcie1.0: Link up
pcie2.0: Link down
Net:   eth0: ethernet@70000, eth1: ethernet@30000, eth2: ethernet@34000
Hit any key to stop autoboot:  0
BOOTP broadcast 1
BOOTP broadcast 2
...
BOOTP broadcast 129
Retry time exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Logs from Mode 7 (rescue shell) - This is the same for the other rescue modes as well.

BootROM - 1.73
Booting from SPI flash

U-Boot SPL 2022.10-rc5-OpenWrt-r16654+122-8e5de89769 (Sep 20 2022 - 14:11:36 +0000)
High speed PHY - Version: 2.0
MiniPCIe/mSATA card detection... MiniPCIe
WWAN slot configuration... PCIe+USB2.0
Detected Device ID 6820
board SerDes lanes topology details:
 | Lane # | Speed |  Type       |
 --------------------------------
 |   0    |   5   | PCIe0       |
 |   1    |   5   | USB3 HOST0  |
 |   2    |   5   | PCIe1       |
 |   3    |   5   | USB3 HOST1  |
 |   4    |   5   | PCIe2       |
 |   5    |   0   | SGMII2      |
 --------------------------------
High speed PHY - Ended Successfully
mv_ddr: 14.0.0
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
mv_ddr: completed successfully
Initializing LAN eth switch... done
Trying to boot from SPI


U-Boot 2022.10-rc5-OpenWrt-r16654+122-8e5de89769 (Sep 20 2022 - 14:11:36 +0000), Build: jenkins-turris-os-packages-lions-omnia-2009

SoC:   MV88F6820-B0 at 1600 MHz
DRAM:  2 GiB (800 MHz, 32-bit, 2T, ECC not enabled)
Core:  71 devices, 24 uclasses, devicetree: separate
WDT:   Started watchdog@20300 with servicing (60s timeout)
MMC:   mv_sdh: 0
Loading Environment from SPIFlash... SF: Detected s25fl164k with page size 256 Bytes, erase size 4 KiB, total 8 MiB
OK
Model: Turris Omnia
  MCU type: GD32 (with peripheral resets)
  MCU version: 07eba1fb7d186f285f3194a86fedcfa85aa4568b/67eddc9540526d0a9d9660f7a7867af9a28a68d6
  RAM size: 2048 MiB
  Serial Number: REDACTED
Disabling MCU watchdog... disabled
Regdomain set to **
RESET button was pressed, overwriting boot_targets!
pcie0.0: Link up
pcie1.0: Link up
pcie2.0: Link down
Net:   eth0: ethernet@70000, eth1: ethernet@30000, eth2: ethernet@34000
Hit any key to stop autoboot:  0
Setting bus to 2
SF: Detected s25fl164k with page size 256 Bytes, erase size 4 KiB, total 8 MiB
device 0 offset 0x100000, size 0x700000
SF: 7340032 bytes @ 0x100000 Read: OK
Uncompressed size: 10916816 = 0XA693D0
gpio: pin gpio@71_4 (gpio 68) value is 1
## Loading kernel from FIT Image at 01700000 ...
   Using 'def' configuration
   Trying 'kernel' kernel subimage
     Description:  Linux kernel
     Created:      2019-10-16  23:24:21 UTC
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x017000e0
     Data Size:    3524488 Bytes = 3.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00800000
     Entry Point:  0x00800000
     Hash algo:    crc32
     Hash value:   959a9435
     Hash algo:    sha1
     Hash value:   4b14d6353eb27863f4d55fea09be8fe792e61360
   Verifying Hash Integrity ... crc32+ sha1+ OK
# Loading ramdisk from FIT Image at 01700000 ...
   Using 'def' configuration
   Trying 'ramdisk' ramdisk subimage
     Description:  Initial Ramdisk
     Created:      2019-10-16  23:24:21 UTC
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x01a5c984
     Data Size:    7352320 Bytes = 7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    crc32
     Hash value:   bb02b1c7
     Hash algo:    sha1
     Hash value:   2a8750402360f42041b9e8e1583b7192ef5fede8
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 01700000 ...
   Using 'def' configuration
   Trying 'phy-dtb' fdt subimage
     Description:  Flattened Device Tree blob (metalic WAN)
     Created:      2019-10-16  23:24:21 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x0215fa9c
     Data Size:    18773 Bytes = 18.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   390c5e47
     Hash algo:    sha1
     Hash value:   e39a04b4b096f876f3e8a54724472392bb1a873f
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x215fa9c
   Loading Kernel Image
   Loading Ramdisk to 7f412000, end 7fb15000 ... OK
   Loading Device Tree to 7f40a000, end 7f411954 ... OK
Can't find node with compatible "cznic,turris-omnia-mcu": FDT_ERR_NOTFOUND

Starting kernel ...

I’m not sure how to proceed from here. Should I try to follow the guide from Omnia - Turris Documentation in order to restore u-boot, or is there something else to be done?

Thank you very much, I got to the previous state after resetting the u-boot env.

One thing to note is that I had some issues with sending data over serial so I could drop into the shell. After a bit of research turns out I had to turn off the serial flow control. Not sure if anyone else has experienced this or it was just my TTL cable (PL2303HX chip).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.