acdev from 4pda:
loven-doo @ (https://4pda.to/forum/index.php?act=findpost&pid=89612862)
After a series of experiments, I got a brick....
My problem is that I rolled OpenWRT from another device (I won't write which one yet, so that no one repeats it, it has the same percentage, wlan module and switch, there is sata) the kernel fits, but it can't find rootfs, because the NAND memory scheme is different: that device has 128 MB and other partitions (I got them from the download logs via UART). Unfortunately, I can't log in to the U-Boot console: it looks like the ability to abort booting in the config is disabled.
So it was necessary to correctly throw images into nand. I.e., the rootfs part of the OpenWRT image had to be filled at the rootfs address of the flashed image (you could look in dts for this device). Then the OpenWRT kernel would have found its own rootfs. And it is better to fill the kernel part at address 0xC00000, so that at address 0x800000 you can leave the stock kernel untouched!
And in a good way, it was necessary to build OpenWRT itself and register the correct partition addresses in dts (with bypassing the stock kernel0 and rootfs0 partitions).
RMNLRK @ (https://4pda.to/forum/index.php?act=findpost&pid=104989855)
In general, I read this - [https://forum.openwrt....miwifi-hd-r3d/32142/15](https://4pda.to/pages/go/?u=https%3A%2F%2Fforum.openwrt.%25E2%2580%25A6miwifi-hd-r3d%2F32142%2F15&e=110178006&f=https%3A%2F%2F4pda.to%2Fforum%2Findex.php%3Fshowtopic%3D827710%26st%3D1400%23entry110178006) and I understood why everything is so deaf with our ruther, in addition to the high cost.
The main problem of this router is that it does not have proper recovery functionality in U-Boot. So, you cannot make any mistake developing the kernel, rootfs etc.
Here the person is wrong. Yes, uboot for R3D is generally stripped down and does not contain any data recovery mechanisms on nand. However, for the recovery mechanism, you can use the stock kernel located in the kernel0 (0x800000) partition.
When the router starts with the reset button pressed, uboot should always load the kernel from the kernel0 section (for R3D, this should be checked, because uboot could be crooked).
When loading, the stock firmware checks for the miwifi file.bin on a USB flash drive inserted into the USB port and writes data from this image to the kernel1 and rootfs1 partitions (while uboot installs booting from the kernel1 partition in tinctures).
That is, with the reset button held down, the bootloader should load the OS from the kernel0 partition (address 0x800000). This is the most important condition that needs to be checked for R3D.
Therefore, all custom firmware kernels must be strictly written to the kernel1 section (address 0xC00000). And the rootfs partition (UBI) should be written to the rootfs1 partition (address 0x3800000). This is how the kernel0 and rootfs0 partitions that are needed to restore the system via the miwifi.bin file will remain intact.
Therefore, there would be a desire, and the rest is a matter of technology.
uboot output found on the internet
smem ram ptable found: ver: 0 len: 5
DRAM: 494 MiB
NAND: SF: Unsupported manufacturer 00
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
PCI0 Link Intialized
PCI1 Link Intialized
cdp: get part failed for 0:HLOS
cdp: get part failed for rootfs
Net: MAC1 addr:40:31:3c:d8:b1:1a
S17c init done
NAND read: device 0 offset 0xc00000, size 0x400000
4194304 bytes read: OK
Image Name: ARM OpenWrt Linux-4.14.131
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2185323 Bytes = 2.1 MiB
Load Address: 42208000
Entry Point: 42208000
Verifying Checksum ... OK
Loading Kernel Image ... OK
device nand0 nand, # parts = 9
#: name size offset mask_flags
0: Bdata 0x00080000 0x00600000 0
1: crash 0x00080000 0x00680000 0
2: crash_syslog 0x00080000 0x00700000 0
3: rsvd 0x00080000 0x00780000 0
4: kernel0 0x00400000 0x00800000 0
5: kernel1 0x00400000 0x00c00000 0
6: rootfs0 0x02800000 0x01000000 0
7: rootfs1 0x02800000 0x03800000 0
8: overlay 0x0a000000 0x06000000 0
active partition: nand0,0 - (Bdata) 0x00080000 @ 0x00600000
mtdids : none
Setting up atags for msm partition: Bdata
Setting up atags for msm partition: crash
Setting up atags for msm partition: crash_syslog
Setting up atags for msm partition: rsvd
Setting up atags for msm partition: kernel0
Setting up atags for msm partition: kernel1
Setting up atags for msm partition: rootfs0
Setting up atags for msm partition: rootfs1
Setting up atags for msm partition: overlay
Using machid 0x1260 from environment
Starting kernel ...