I took a look at the boot log and compared to the dts for the DIR-xx60 and it looks like it lines up but perhaps you could assist me in confirming or denying my assumption that some of the 'interspersed' partitions that the uboot log mentions (rootfs in particular as well as the All entry that exist in the middle of other partitions) won't disrupt the actual operation if not explicitly mentioned in the dts?
Unless I am looking in the wrong place?
I'll see if I can't figure out how to give the initramfs w/ RAM only via uBoot a shot.
Thanks again!
The logs I'm seeing in case its helpful in to anyone in the future:
[ 2.524000] Creating 10 MTD partitions on "MT7621-NAND":
[ 2.536000] 0x000000000000-0x000007f80000 : "ALL"
[ 2.576000] 0x000000000000-0x000000080000 : "Bootloader"
[ 2.588000] 0x000000080000-0x000000100000 : "Config"
[ 2.600000] 0x000000100000-0x000000140000 : "Factory"
[ 2.612000] 0x000000140000-0x000000180000 : "Config2"
[ 2.624000] 0x000000180000-0x000002980000 : "firmware"
[ 2.648000] 0x00000045fb99-0x000002980000 : "rootfs"
[ 2.656000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 2.704000] mtd: partition "rootfs_data" created automatically, ofs=0xee0000, len=0x1aa0000
[ 2.720000] 0x000000ee0000-0x000002980000 : "rootfs_data"
[ 2.740000] 0x000002980000-0x000004980000 : "Private"
[ 2.756000] 0x000004980000-0x000007180000 : "firmware2"
[ 2.780000] 0x000007180000-0x000007780000 : "mydlink"
[ 2.792000] 0x000007780000-0x000008080000 : "Reserved"
[ 2.800000] mtd: partition "Reserved" extends beyond the end of device "MT7621-NAND" -- size truncated to 0x800000
Thanks! I'm going to take some time to figure out how to run that. Is there anything in particular that you know would be exceptionally helpful from the fw dump once I get it downloaded?
look's the same
you should be able via the serial console in uboot
to run the initramfs image in ram for say DIR-1960-A1 via tftp
this should run and allow you to save all the MTD's
and the current unencrypted firmware
this image should mostly work as a test
but you will then have to sort out the led's & button assignments
and make a DTS with the DIR-1260's ID etc
Edit 2: I'm a big dumb dumb - ignore all below. I was loading to the wrong address (needed 0x84000000) and it all worked. Thanks again for the help.
Edit: I'm going to edit this because I almost immediately after posting spotted an error in the logs after the bootm command (sorry):
Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover
If it is clear that I did something wrong in my steps below I'd appreciate any additional guidance to get me back on path, otherwise I'll be googling my way through that error above.
Original:
Thanks for the help with this, could you assist me a little further in understanding what I should be expecting or seeing happen with the initramfs:
Here is what I have been doing:
I built openwrt-ramips-mt7621-dlink_dir-1960-a1-initramfs-kernel.bin and put it on the tftp server plugged into the router.
From this point it boots up and runs completely as it normally does. The serial console gives me the same prompt / login as before (dlinkrouter77 login:, i.e) and the usual D-Link web interface is accessible through the previously configured SSID
My question then is: is this considered a successful test and I properly loaded that initramfs and now just need to figure out the GPIO led/button situation?
Or was I supposed to see some different behavior and I have made some errors in my execution?
Thanks a million for everything so far, this has been very helpful (and fun).
you could have just used the normal per compiled initramfs image btw
it should have booted the openwrt image
and you should have been able to login to
i would have expected it to run or crash
maybe it's crashing & then booting as normal
you should have a backup of the OEM firmware unencrypted in one of the files
you can now see what works & not
radio's may just work
led's and buttons are usually mapped different tho
but you could start to make it's own firmware
Is that from a web interface or is that a console command I can run?
I am able to ping to the 192.168.1.1 from a device connected to one of the ethernet ports, and through the serial interface I can get wan connection from the router (e.g. I can ping google.com).
Not able to load 192.168.1.1 in a browser window though might not have remembered to build with that package
Thanks for the help! Everything is going well so far.
The radios work when I manually select the wireless driver kernel modules in menuconfig. When it comes to adding support files for this device, will I only need to update the mt7621.mk file with those modules for the device to be properly supported with regards to the radios?
Looks like I've got about everything working - the only thing left that is giving me grief is the LED for the 5GHz radio... it seems that both radios have the led wired direct to them and should be accessible through the firmware but I can only get the 2.4G led to cooperate.
2.4G radio chipset is MT7603 while 5G is MT7613. I thought maybe it was the driver/firmware though I've tried both kmod-m7633u & s to no avail. I can't seem to flip it on manually by running the script from the wiki to run over all the gpio pins either.
I can set mt76-phy0 manually through Luci but m76-phy1 doesn't trigger.
Thanks! The radio is working fine with those packages.
The LED appears to be a muxed pin that is controlled in some firmware specific to the device. I'd probably have to track down the address of the register used in this hardware configuration and update that patch to this device, if I'm understanding that correctly
HI SGproo
everything I have is out there
but i don't have this model myself so not much I can do
I imagine it's ll the same as the to others just ID change & new led mapping