U-boot: Unknown image type after flashing Linksys EA7500

After following the guide for my router I can't get it to boot, all I get is
Loading from nand0, offset 0xf80000 ** Unknown image type. I tried to flash back my original firmware but that gives me this error:
Automatic boot of image at addr 0x42000000 ... Wrong Image Format for tftp command ERROR: can't get kernel image!
Here is my serial log, starting with flashing the openwrt image, and then trying to flash the original firmware after that fails:https://gist.github.com/ZachAR3/04d7259b4243763e7649476ac2209d57

which image was this, specifically ?

22.03.5

It could be related to the kernel partition size issue, with recent openwrt versions, try installing an older release 1st.

Ok, I'm assuming the squasfs factory and not the initramfs-uiimage

yes, the factory.

A bit of different issue now. It get's hung at ipq_nand failed to allocate memory and if I reboot it in this state it goes back to either read errors or unbootable kernel:

Bytes transferred = 7995392 (7a0000 hex)
Automatic boot of image at addr 0x42000000 ...
   Image Name:   ARM OpenWrt Linux-5.4.143
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2747423 Bytes = 2.6 MiB
   Load Address: 42208000
   Entry Point:  42208000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
mtdids not defined, no default present
info: "mtdparts" not set
Using machid 0x1260 from environment

Starting kernel ...



U-Boot .07 [Standard IPQ806X.LN,r40331] (Nov 05 2015 - 14:44:22)

CBT U-Boot ver: 1.1.4

smem ram ptable found: ver: 0 len: 5
DRAM:  235 MiB
NAND:  ipq_nand: failed to allocate memory

Any ideas?