Adding OpenWrt support for D-Link Dir 2150 R1

As recommended in A1 Topic, opening new one for R1 version of this model, so i have zero experience on porting firmware and not experienced with linux. So wanted to know is anyone currently working on porting OpenWRT onto our device and if not as far as i know biggest difference is boot sector and absence of recovery mode and having FailSafe mode instead. So to the point, any manuals or help to port it to this model and is it better to build whole new Openwrt build or to port existing one?

do you have and have experience with USB to TTL serial adapters ?

I'm aware if the differences between the DIR-878-A1 & the DIR-878-R1
but with the change in flash chip that's where the work needs done
but most of it is reading the boot logs getting the memory layout
and finding the leds & button layouts

I kinda have experience, only thing i worked similar to this is Arduino and esp8266. Is it possible to use windows machine to read these data, according to guides I'll need raspberry to make these readings

in a development environment you would dump the contented of the flash chip
but you don't have to but it all comes at risk
if you have a serial adapter for you computer
you can make an image to test in ram
and copy the continence of flash from it
as long as everything you do is none distinctive

So first thing i need is to take dump of flash?

Well, can't really find anything to connect ttl, but at least we have board pics

Oh, wait, im a dumbass, didn't see thise pins

Got it, Boot log in this file

since you've opened it, post full PCB pics.

when you see this on the console, try to interrupt the boot loader

Please choose the operation: 
08:47:23.680 -> 
   1: Load system code to SDRAM via TFTP. 
08:47:23.680 -> 
   2: Load system code then write to Flash via TFTP. 
08:47:23.680 -> 
   3: Boot system code via Flash (default).
08:47:23.680 -> 
   4: Entr boot command line interface.
08:47:23.680 -> 
   7: Load Boot Loader code then write to Flash via Serial. 
08:47:23.727 -> 
   9: Load Boot Loader code then write to Flash via TFTP. 
08:47:23.727 ->

That's a reasonably common collection of components. Here's a list of similar supported devices:
[OpenWrt Wiki] Table of Hardware: Full details
I'd suggest a good starting point for creating your OpenWRT image is reviewing the commit, initramfs image and DTS for the Netgear R6850. Looks to be basically the same as your unit. initramfs image could boot unmodified.
Commit info for the Netgear is here; Git - openwrt/openwrt.git/commit

To load an initramfs use the 'option 1' in the uBoot menu 1: Load system code to SDRAM via TFTP

As i said i have zero exprience building new images, so this doesn't really helps me, sorry if i'm not helpfull here, but loading does get interrupted and i think i can enter flash mode

unless any of the devices jdwl1o1 links to, needs an initramfs for converting to openwrt, you don't really have a choice, but to build one yourself.

Checked manuals, and atm those out of my reach, i'm afraid to brick router so peronally i'll stop here while i can

Btw as you asked for full board photos

1 Like

Initramfs is perfectly safe to load, since it's stored in RAM only, nothing's written to the device's
flash, when you restart the router, it's gone.

Only mistake you can make, using initramfs, is if you accidently write it to flash, instead of SDRAM
But even if you do, the TFTP recovery is a very safe and reliable way of getting the router back,
making it close to unkillable, as long as the bootloaders's intact, and you got serial port access.

But if this is your only router, you should probably stop here, until you have temp a replacement,
just in case :wink:

Thnx for posting the PCB photos.

Just to make it clear i may get ANY insramfs or it should be build for router specifically, also, should i setup basic tftp server like with tftp64? At least i may try it before giving up completely

You need an initramfs for the same SoC as your devices.

tftp64 works very well, just make sure you disable the Windows firewall, it'll block the TFTP requests coming from the router.