ath79: add support for D-Link DIR-842 C1#2276
ath79: add support for D-Link DIR-842 C1#2276programmingisart wants to merge 1 commit intoopenwrt:masterfrom programmingisart:master
Conversation
|
@blocktrron |
blocktrron
left a comment
There was a problem hiding this comment.
Looks good! Two remarks left 👀
|
What about 02_network? |
Oops sorry for my mistake, fixed |
|
label_mac is lan_mac as for C2? |
Yes, for both C1 and C2 |
|
@jackcolentern Your commits need to be squashed into one. |
|
@blocktrron |
|
I hate to criticize, but don't we need to disable USB for C1? |
@blocktrron |
|
Yes, please. Move the reference to the USB node to the c2 devicetree. |
I suggest having the USB node in dtsi with disabled status. We can enable it in C2 dts and leave untouched in C1 and future C3 implementation. But either looks good. |
Done, thanks! |
@blocktrron I can change to this also if you prefer this. Thanks! |
|
I have a C3, and tested it with the C2 firmware. It works fine. The C3, like the C1, has USB internally but without an interface soldered onto the board. The Forum thread is https://forum.openwrt.org/t/support-for-d-link-dir842-rev-c3-maybe-eu-version/41654 |
blocktrron
left a comment
There was a problem hiding this comment.
One (maybe last? 😄 ) improvement suggestion from my side. I will leave this open for a bit more for everyone to voice their opinion on the topic @pmelange outlined.
There was a problem hiding this comment.
Please move the aliases node to the respective boards dts.
It should work the way you have done it, but you are referencing a handle which has to be created in the DT inheriting this dtsi, which might not be obvious on first sight.
There was a problem hiding this comment.
done, thanks!
Hardware spec of DIR-842 C1: SoC: QCA9563 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR Switch: QCA8337N WiFi 5.8GHz: QCA9888 WiFi 2.4Ghz: QCA9563 USB: circuit onboard, but components are not soldered Flash instructions: 1. Upgrade the factory.bin through the factory web interface or the u-boot failsafe interface. The firmware will boot up correctly for the first time. Do not power off the device after OpenWrt has booted. Otherwise the u-boot will enter failsafe mode as the checksum of the firmware has been changed. 2. Upgrade the sysupgrade.bin in OpenWrt. After upgrading completes the u-boot won't complain about the firmware checksum and it's OK to use now. 3. If you powered off the device before upgrading the sysupgrade.bin, just upgrade the factory.bin through the u-boot failsafe interface and then goto step 2. Signed-off-by: Jackson Lim <[email protected]>
|
@blocktron |
|
@jackcolentern I would go for seperate images in this case here, like it's done for many similar cases (e.g. WDR3600/WDR4300 and some Tl-WR841N). I will merge this PR later, someone with a C3 can then open one for this device. |
|
The changes to support Rev C3 seem to be straight forward. I can do it as soon as this PR is merged. As a side note, after digging around on the German D-Link site, there are a couple FAQ's which are interesting.
Obviously, the so-called data-sheet is just marketing jargon without any specifics. Delightful. Maybe the EU firmware just has support for more languages? I guess the differences between C1 and C3 will remain a mystery. |
|
After reading a forum thread on lowyat.net I might have found a difference between C1 and C3. The C3 has a reset button on the bottom of the router. @blocktrron, can you confirm that the C1 uses the WPS button as reset? |
|
I supposed then also C3 has label_mac=$lan_mac ? |
In this specific case the user can install the C2 image on all three. |
|
Just had another look at the DTSes: |
I don't think it is vital. Shame on me that I was the one who suggested to disable it. |
If it's only that, I would not bother on a 16M device. |
|
I suggest having C1 then with enabled USB. It will work on C1-3, that can be added to wiki. |
|
I would just rename dlink_dir-842-c2 to dlink_dir-842-c and have it for all sub-variants. This will also be easily understood by a user just looking at the image names. Like TP-Link version "v1" is for "v1.3" as well as for "v1.7". |
It is reasonable, but what if C4 pops up with something really different? |
Same issue as dropping the version when we discussed that for the Kirkwood NAS. If a new version comes out how do you know it is supported or not? I would just add all versions to the name of the file to install. So the versions supported are all there.
Reducing space usage in the servers seems to be a thing, if latest mailing list discussions are anything to come by. At the very least you can have it hardlink/symlink or something so that people will download the same file but with different names, and it will only use space once. |
|
Anyway the bottom line is instead of merging this one, rename C2 some way or another. |
Is that probable with D-Link devices (to have differences between sub-versions)?
I do not like this. Having different versions in the image name will look like a different name. Besides, for my personal taste it looks ugly. Also note that my opinions expressed here are just my personal view, I'm discussing here with no authority of any kind. |
|
Well, if the LEDs are moved to the DTSI, too, this commit will effectively just copy c2 to c1 anyway. The question now is mainly whether other people (and you, obviously) see it as I do and go for the "rename", or whether separate images are desired (in which case the PR would mostly stay). |
|
I see no practical reason to have 3 images. Even the vendor seems to have one. |
|
I don't think having Cx (or C) is a good idea, it is so hard for keep track of every devices released. If we have a C4 with huge changes in the future I don't want people bricking it by installing the Cx images. However, Dlink seems to have a good track record keeping the same core components (Soc, flash, RAM, Switch, Wifi chip) on the same [Alphabet] revision, but we can't be sure sure about the coming devices. IMHO, I think we can have a C1_C3 image and a separate C2 image with enabled USB |
|
@hanipouspilot |
|
@jackcolentern |
yes but do we have rules about two different devices sharing the same led name? |
Ah, I overlooked that, since I'm used to vendor named led names like "tplink:green:usb". I'm not sure what's the best way to solve this. |
|
You can define the majority of the LED config in a common DTSI, then override just the With the caveat that I'm not a core developer by any stretch, in my personal, likely uninformed opinion, I wouldn't see a problem with shared naming, especially with devices that are so much the same that one might want to share config across them. |
Thanks very much for your opinion! So maybe we use this pull request first and @pmelange can add C3 support by combining it with C1? |
|
I think one could have either of "dir-842-c1", "dir-842-c" or "dir-842" for the shared leds ... |
|
Shared LED naming is something that should be avoided. I was told some time ago, the only exception are TP-Link boards, which use Regarding sharing of the LED definitions and adding the labels in the inheriting dts files: I think this has a big toll on readability which i would like to avoid (personally). |
Okay, noted.
I agree on this one. @jackcolentern So keep LEDs as they are. Sorry for the confusion. |
|
Thanks! Merged to my staging tree: https://git.openwrt.org/?p=openwrt/staging/blocktrron.git;a=summary |
|
support for C3 is now in PR #2307 |
|
@pmelange I'm running into the situation where I can't install openwrt for my DIR-842 C1. I tried to upgrade the firmware to 3.11. Then tried again with openwrt firmware (c1) but didn't succeed either. |
|
Never mind, I followed the instructions here: https://forum.openwrt.org/t/d-link-dir-842-c3-installation/43094/7 |
|
@minhdanh It's great news that you found those instructions. It would be really great if someone were to add them to https://openwrt.org/toh/d-link/d-link_dir-842 Unfortunately I don't have an account to update the wiki. |
It takes a couple of minutes to make an account. |
Hardware spec of DIR-842 C1:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: circuit onboard, but components are not soldered
Flash instructions:
the u-boot failsafe interface.
The firmware will boot up correctly for the first time.
Do not power off the device after OpenWrt has booted.
Otherwise the u-boot will enter failsafe mode as the checksum
of the firmware has been changed.
After upgrading completes the u-boot won't complain about the
firmware checksum and it's OK to use now.
just upgrade the factory.bin through the u-boot failsafe interface
and then goto step 2.
Signed-off-by: Jackson Lim [email protected]
Thanks for your contribution to OpenWrt!
To help keep the codebase consistent and readable,
and to help people review your contribution,
we ask you to follow the rules you find in the wiki at this link
https://openwrt.org/submitting-patches
Please remove this message before posting the pull request.