I compiled one OpenWRT image with "initramfs-kernel". So, I can boot this image from the bootloader using the TFTP command (from the serial console). This firmware doesn't touch the Flash, so I can experiment with it. Futhermore this firmware has all MTD tools enabled. So I figure that I can write to flash when it will be needed.
Now, I'm searching for a compatible DD-WRT firmware that I can boot/check/flash to this device. My idea it's use only the serial console and the bootloader for safe tests. Howewer, I need that someone can share with me one testing DD-WRT firmware. Can you do it?
* For the kernel header, the problem is solved. If you compile the OpenWRT fimware, then you have access to the tool “mktplinkfw2”. Then using this tool you can generate correct kernel images that can boot in the device. Great!
* I do the first boot of a DD-WRT kernel using the firmware from the similar device “D-Link DIR-810L”. The kernel boots, however as it can’t mount the root filesystem it generates a kernel panic:
Code:
VFS: Cannot open root device "ram0" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
1f00 192 mtdblock0 (driver?)
1f01 64 mtdblock1 (driver?)
1f02 128 mtdblock2 (driver?)
1f03 6656 mtdblock3 (driver?)
1f04 64 mtdblock4 (driver?)
1f05 512 mtdblock5 (driver?)
1f06 512 mtdblock6 (driver?)
1f07 64 mtdblock7 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Rebooting in 1 seconds..
I can’t continue (without flashing anything in the flash chip) as I don’t know how to force the DD-WRT firmware to use the initrd (ramdisk) squashfs as root. Any idea?
The reason for not flashing the firmware for the D-Link it’s because the flash partitions are different, and the D-Link lacks the RTL8367RB Gigabit Switch that uses the TP-Link. So this firmware will be not useable (I think).
* How to “convert” the DD-WRT firmware for the D-Link to use it with the TP-Link? Here the guide:
- Download the TRX file “dlink-dir810lc1-webflash.bin”.
- In a Linux shell execute the “binwalk -v dlink-dir810lc1-webflash-r34411.bin”.
- Use the data reported for extracting the kernel and squashfs, for example:
- Then patch the command line, as in this device it's defined for a console at 57600 and with root in mtdblock4. So, do these tasks:
Code:
#../openwrt-archer-c2/staging_dir/host/bin/lzma d linux.7z linux
#../openwrt-archer-c2/staging_dir/host/bin/patch-cmdline linux "console=ttyS0,115200 rootfstype=squashfs root=/dev/ram0"
# MANUAL HEX EDIT “linux” !!!
#../openwrt-archer-c2/staging_dir/host/bin/lzma e linux linux2.7z
You need to manual edit too the command line at the end of the file, as I see that the default it’s loaded from there!
Posted: Fri Jan 19, 2018 23:43 Post subject: Archer C2
Hi
I am a complete novice, but have an Archer C2 and want to see if I can get DD-WRT going on it before I fork out for a router that I know is supported. Happened upon this thread and gave the test a try via the WebGUI in the original firmware (post factory reset). Not sure if this was the intended delivery method (again, novice), but it failed with an error code of 4503.