ER-X-SFP failed to attach mtd5 after upgrading stock to OpenWRT

Tried upgrading brand new out-of-box ER-X-SFP to OpenWRT.
Went into a boot loop after the upgrade got stuck for like some time (15 min) and I forcibly had to cold boot the device.

Here's console output where it goes wrong, apparantly rootfs partition does not get formatted properly it seems:

[ 3.471352] UBI: auto-attach mtd5
[ 3.478029] ubi0: attaching mtd5
[ 5.284693] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[ 5.800831] mtk_nand: UnCorrectable at PageAddr=127937
[ 5.811338] ubi0 warning: 0x802efa94: error -5 while reading 64 bytes from PEB 1939:2048, read only 0 bytes, retry
[ 5.832292] mtk_nand: UnCorrectable at PageAddr=127937
[ 5.842795] ubi0 warning: 0x802efa94: error -5 while reading 64 bytes from PEB 1939:2048, read only 0 bytes, retry
[ 5.863746] mtk_nand: UnCorrectable at PageAddr=127937
[ 5.874253] ubi0 warning: 0x802efa94: error -5 while reading 64 bytes from PEB 1939:2048, read only 0 bytes, retry
[ 5.895204] mtk_nand: UnCorrectable at PageAddr=127937
[ 5.905707] ubi0 error: 0x802efab0: error -5 while reading 64 bytes from PEB 1939:2048, read 0 bytes
[ 5.923892] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.131 #0
[ 5.936006] Stack : 00000000 00000000 00000000 00000793 00000000 00000000 00000000 00000000
[ 5.952635] 00000000 00000000 00000000 00000000 00000000 00000001 8fc2dba8 53261662
[ 5.969260] 8fc2dc40 00000000 00000000 00002658 00000038 804835d8 00000007 00000000
[ 5.985886] 00000000 80530000 000e18f4 00000000 8fc2db88 00000000 80550000 00000000
[ 6.002512] 0f260800 00000000 00000800 00000793 00000000 8029b5a8 00000000 80590000
[ 6.019136] ...
[ 6.023989] Call Trace:
[ 6.024002] [<804835d8>] 0x804835d8
[ 6.035771] [<8029b5a8>] 0x8029b5a8
[ 6.042696] [<80010090>] 0x80010090
[ 6.049621] [<80010098>] 0x80010098
[ 6.056545] [<8046c57c>] 0x8046c57c
[ 6.063469] [<802efab0>] 0x802efab0
[ 6.070394] [<802efab8>] 0x802efab8
[ 6.077322] [<802f0088>] 0x802f0088
[ 6.084246] [<802ef7bc>] 0x802ef7bc
[ 6.091172] [<802f5770>] 0x802f5770
[ 6.098099] [<802f6b6c>] 0x802f6b6c
[ 6.105025] [<802e9590>] 0x802e9590
[ 6.111950] [<8007033c>] 0x8007033c
[ 6.118876] [<8056f454>] 0x8056f454
[ 6.125801] [<8056f110>] 0x8056f110
[ 6.132725] [<80557248>] 0x80557248
[ 6.139650] [<80005560>] 0x80005560
[ 6.146575] [<8004b600>] 0x8004b600
[ 6.153502] [<80557cc8>] 0x80557cc8
[ 6.160428] [<80557248>] 0x80557248
[ 6.167352] [<8048390c>] 0x8048390c
[ 6.174277] [<8048391c>] 0x8048391c
[ 6.181202] [<8048390c>] 0x8048390c
[ 6.188126] [<8000afd8>] 0x8000afd8
[ 6.195056]
[ 6.198756] ubi0 error: 0x802e95b0: failed to attach mtd5, error -5
[ 6.211281] UBI error: cannot attach mtd5
[ 6.219293] hctosys: unable to open rtc device (rtc0)
[ 6.230224] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 6.245145] Please append a correct "root=" boot option; here are the available partitions:
[ 6.261779] 1f00 512 mtdblock0
[ 6.261785] (driver?)
[ 6.274780] 1f01 384 mtdblock1
[ 6.274785] (driver?)
[ 6.287794] 1f02 384 mtdblock2
[ 6.287799] (driver?)
[ 6.300794] 1f03 3072 mtdblock3
[ 6.300799] (driver?)
[ 6.313794] 1f04 3072 mtdblock4
[ 6.313799] (driver?)
[ 6.326794] 1f05 253696 mtdblock5
[ 6.326799] (driver?)
[ 6.339805] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 6.357910] Rebooting in 1 seconds..

ER-X-SFP has u-boot version 1.1.3 (Aug 30 2017).

Tried several times to boot load an initramfs image through TFTP, format ubi again but it does not correct the problem.

Anybody have an idea how to fix this?