I managed to fix the device
I downloaded u-boot.bin from that thread
Then I ran it from uart using 2 commands:
fatload mmc 0 0x01000000 u-boot.bin
go 0x01000000
With this u-boot version, the system booted up fine.
After that, I tried to overwrite the corrupted u-boot using dd command. I failed but actually, that broke uboot on emmc which allowed the device to enter usb download mode. From that, I was able to write original ROM using amlogic burning tool