Guidance for onboarding new hardware? Jumping in with the DSR-500ac

Hello, folks.

I recently bought a used dual-WAN router, the D-link DSR-500ac. This thing first came out in 2015, but it has WAN ports that support 1Gbps, which is sufficient for my needs.

I set it up on my LAN, and felt like the software is good, but not great. I couldn't shake the feeling that I could implement a better WAN failover strategy with a BASH script :wink:

I was poking around with the serial console and stumbled across its recovery menu. I see it can boot a Linux kernel off of a USB stick, so now I HAVE to try!

I've done the requisite Google searches, searched this forum for past posts, and I cloned the code from GitHub and searched the codebase for references to the DSR-500 or its cousin the DSR-1000.

It doesn't look as though much has been said/done with this router model. However, the underlying hardware is the Cavium CN5020, same as the Ubiquiti Edge Router Lite.
So, I'm ready to give this a shot. I understand how to load new firmware on the D-link as well as how to unbrick it just in case. :slight_smile:

I plan on using an 8GB memory stick as my persistent storage. I am pretty sure that'll be plenty although I could go bigger if it mattered.

If anybody has suggestions or guidance about onboarding new hardware to OpenWRT, I'd love to hear your input. Otherwise, I'll jump in by trying to flash the firmware for the Edge Router Lite and see what happens! If I'm successful, I'll be sure to communicate my findings.

Please don't flash random other firmwares. There is always an initramfs kernel that does not touch the flash, this can usually be tested safely.

Please check the Wiki on the developer documentation, there is a lot of guidance how to set it up and how to add new device support (I'm on the phone right now and thus not providing the links).

1 Like

Thank you for the reply. After I posted, I thought some more about it and realized that another firmware is not likely to work just because rhe CPU is the same.

I will sit down and read everything in the wiki about adding new support.

I've gone through some of this before on the PC side - building a kernel from source, configuring the bootloader, building the initial image that'll get unzipped into RAM, and start everything else.

I've never dealt with firmware but I understand it at a high level. I understand the process, I'm just a bit rusty. I probably haven't opened up the gory details of the Linux boot sequence in at least 10 years.

Would there be any value in trying to extract/inspect the firmware that is provided by dlink? I feel like that could be helpful to know what the system wants. Unfortunately, I don't know how to go about doing that. I've already inspected a firmware file and determined it's not tar, cpio, zip, or bzip/gzip. I see some readable text but no indication of the file format.

I'll check the wiki to see if this is addressed as well. Thanks.

openwrt usually doesn't touch the boot loader, except for some parameter changes.
if you can get into the boot loader, you can probably boot the initramfs @andyboeh wrote about.

the d-link fw won't do you much good if you have the initramfs running, but if you still want to check out the content, start by using binwalk, and if it manages to extract anything, see if the rootfs is squashfs:ed.

1 Like