-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ar71xx: add netgear wnr2000v5 support #1256
Conversation
| @@ -1079,7 +1079,15 @@ config ATH79_MACH_WNR2000_V3 | |||
| select ATH79_DEV_LEDS_GPIO | |||
| select ATH79_DEV_M25P80 | |||
|
|
|||
| config ATH79_MACH_WNR2200 | |||
| config ATH79_MACH_WNR2000_V5 | |||
| bool "NETGEAR WNR2000 V5 board support (test kconfig.openwrt)" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the (test kconfig.openwrt) doesn't seem necessary/useful
| select ATH79_DEV_LEDS_GPIO | ||
| select ATH79_DEV_M25P80 | ||
|
|
||
| config ATH79_MACH_WNR2200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add this after _V4, not between V2,3 and original. (even if v3 appears to be in teh wrong place)
| #define WNR2000V5_SPI_GPIO_RESET 14 | ||
| #define WNR2000V5_SPI_GPIO_MOSI 15 | ||
| #define WNR2000V5_SPI_GPIO_CLK 16 | ||
| #define WNR2000V5_74X164_GPIO_BASE QCA953X_GPIO_COUNT // The 74x614 muxer adds 8 new gpio after the regular 18 QCA953X gpios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong comment style, line too long, and it seems suspicious that the GPIO_BASE is the same as the GPIO_COUNT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is right. GPIO_COUNT corresponds to the number of gpios without the 74x164 muxer. That chip adds additional gpios and those are numbered starting from GPIO_COUNT.
| } | ||
|
|
||
| static u8 wnr2000v5_ssr_initdata[] __initdata = { | ||
| 0xdf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bitfield, frankly I'm not sure why I initialized it without BIT(5) but i can't test it anymore and it worked like that, so I'm not too willing to change it.
| static struct spi_gpio_platform_data wnr2000v5_spi_gpio_data = { | ||
| .sck = WNR2000V5_SPI_GPIO_CLK, | ||
| .mosi = WNR2000V5_SPI_GPIO_MOSI, | ||
| .miso = SPI_GPIO_NO_MISO, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the whitespace here consistent or is this just a diff issue?
| .chip_select = 0, | ||
| .max_speed_hz = 400000, | ||
| .modalias = "74x164", | ||
| //.mode = SPI_CS_HIGH, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code should be dropped, and all comments should be C style anyway
target/linux/ar71xx/image/generic.mk
Outdated
| dd if=/dev/zero bs=32 count=1 >> $@ | ||
| endef | ||
|
|
||
| define Build/unappend-zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function even used?
target/linux/ar71xx/image/generic.mk
Outdated
| @@ -378,7 +414,8 @@ define Device/wndrmacv2 | |||
| DEVICE_TITLE := NETGEAR WNDRMAC v2 | |||
| NETGEAR_BOARD_ID := WNDRMACv2 | |||
| endef | |||
| TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2 | |||
|
|
|||
| TARGET_DEVICES += wnr2000v5 wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding after v2 makes more sense than before original
|
Side note: Summery:
Thanks a lot for your work 👍 |
|
For the documentation of this device: What serial parameters does the UART run on? 115200 8N1? |
|
Yes, the serial ttl is 115200 8N1 and works same like for example wnr2000v3. It also have the same design with the white dot at VCC pin like the other wnr2000 devices: |
Specifications : - Chispet : Qualcomm Atheros QCA953x - 32 MB of RAM - 4 MB of FLASH - 1x 10/100Mbps Ethernet - 1x switch with 4x 10/100Mbps port - 2.4GHz wifi - 2 Antennas on PCB - UART pads on JP2 header, default comm parameters : 115200 baud 8N1 Flash instructions: The dni image can be flashed over tftp using uboot firmware recovery mode via UART or Ethernet. Via UART, interupt the boot sequence by pressing any key, then use the 'fw_recovery' command to start the tftp server. Via ethernet, turn off the router, then power it on while pressing the reset button. When the status led starts blinking the tftp server has started. Maintain the reset button pressed until the flash has started. The recovery tftp server listens on 192.168.1.1, port 69. Alternatively you can boot the initramfs without flashing the device via the UART interface. Start a tftp server listening on 192.168.1.10. Use the 'tftpboot <img name>' command to load the initramfs uImage. Then use the 'bootm' command to start it. Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
|
Updated pull request. I haven't been able to test the updated pull request because I've given away this router a few weeks ago. It still builds fine, but if @oaaeruak, or anybody else with this hardware, could test it that would be great. |
|
I was able to build and test this with the latest changes. Everything worked fine. Thanks @rcatolino ! Is there any way I can help so that this can be merged? |
|
@chittti I've built the firmware and updated the router with the resulting |
|
@msbit How did you load the image? In my experience Netgear devices handle OpenWrt images very poorly if you use the GUI - they go into the weird state you talk about. I've never been able to flash them properly using the Web interface. I didn't even try with this device. This might be the reason for you too. Maybe @oaaeruak can offer their experience? I soldered some pins on the J2 header (I suggest on the backside) and then loaded the firmware to tftp server started using UART ( I've tried building it with various settings since the first build so my initial .config is gone. I have the .img (here) file build with no big menuconfig changes except set the target profile to wnr2000v5. Let me know if I can help with anything. |
|
Hey @chittti thanks for those instructions, they may come in very handy down the track! My initial update was via the web UI and I then managed to get back to factory firmware using TFTP (but through restarting the device with the reset button held in, etc). Since then I've:
At this point it looked like it was acting the same as my initial update, but I thought to investigate a little further and found that it was sending DHCP requests out the LAN ports. I was able to switch around the cables, and connect to the device from a static IP in 192.168.1.0/24. From here I needed to switch the logical interfaces in the web UI to get the internet up, and manually restart So for me:
|
|
@msbit I had the same problem. I didn't include luci in the first image so I had to go through the trouble of making those changes using UART command line. I'm new to this project so I don't know where this needs to be corrected before building. Also, would you mind posting the image you've built here? Is there anything else a new device addition needs to go through? |
|
@chittti me too, there are a fair few moving parts across all the projects! The image that I'd built is zipped up here. As part of the build, I'd also ran:
before @rcatolino or @oaaeruak might have a better idea about the particulars of when/why the interfaces are set up in that direction. |
|
I think those scripts pull in the sources, but including them is through menuconfig. I followed the instructions here (which are the same you did). Thanks for the image. I'll try to check if I can get it to configure the interfaces correctly, and ask for help if I can't. |
|
rcatolino: I've renamed the squashfs image extension to .img -> THANKS! msbit: I've built the firmware and updated the router with the resulting lede-ar71xx-generic-wnr2000v5-squashfs-dni.img file, but the device ended up in a weird state -> What is a "weird state"? If the device boots and you can access the logs there, then please provide them from there. Else just take a usb-ttl adapter (example one with CP2104 chip). general information: I did not had any problems flashing lede using netgear oem firmware. I used latest firmware avialble from netgear website. I just had to rename the bin to img - and thats nothing that have to be done any more. Just flash the "factory" image. Yes, you have to follow the general build process. Feeds are required to have luci and so on in the image. Dont install luci later one with packages, because then it would get too big to fit into the ROM of the router. When this change would get merged, then the stable lede releases would include luci and work just fine. |
|
@oaaeruak I should have been more specific. As noted I rebuilt with this commit rebased onto In terms of functionality beyond this, I've had that second build on my router for a couple of days now without any issues. |
|
Hi guys, I would like to know how to put this on my WNR2000v5 router, |
|
Hey @astrayal, as @chittti mentioned above, the instructions here are quite good, the only real differences being the selection of the Note that right now this build (for us at least) has an issue with the network interfaces being switched around, so if you're not too familiar with troubleshooting these kinds of issues it might be worth waiting until this gets sorted out, and this PR merged in. Once this has been done, official images should start being built as part of the main releases. |
|
Hi msbit I flashed my wnr2000v5 with the first image you uploaded here and my router is indeed in that weird state my 4 lan ports acts as wan ports and my 1 wan port acts as a lan port so I went hardwired directly to the wan port and I'm issued and IP in 192.168.1.0/24 but I can't access the Web interface I type in 192.168.1.1 and I received erros every time I also tried going static anything I could try |
|
Okay since I can't access the web interface I'm guessing I'm forced to Tftp flash the firmware is there any specific steps I should take also thanks for the help |
|
With the remerge in progress, all PRs on the lede-project organisation will be closed. Please help getting this merged or rebase/post it on the openwrt project page (https://github.com/openwrt/openwrt/pulls). All remaining PRs will be closed in 30 days. |
|
@rcatolino - I squashed your three commits into one and folded the somewhat unrelated Please find the commits in my staging tree at https://git.lede-project.org/?p=openwrt/staging/jow.git;a=commitdiff;h=e6c4a399fd8d2cadb792972953d2f4cd0149ca6a and https://git.lede-project.org/?p=openwrt/staging/jow.git;a=commitdiff;h=b1f39e1dd6de204380d143ae51013202c5a2d8c8 tell me if they work okay for you. I'll merge them to master after a positive confirmation. |
|
Cheers, |
The NXP 74HC164 GPIO expander driver uses a different config symbol
("CONFIG_GPIO_74X164") and module name since since at least Kernel
version 2.6.37.
Update the kmod package definition accordingly by adjusting kconfig
and module file names.
This unrelated, but correct change has been separated from the
WNR2000v5 support commits.
Ref: lede-project/source#1256
Suggested-by: Raphael Catolino <raphael.catolino@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
@jow- When i git clone the rcatolino source, i can buld a working image. @rcatolino
sysupgrade openwrt-ar71xx-generic-wnr2000v5-squashfs-dni.img @ALL Flashing for example the OEM firmware works and from the OEM firmware you can flash the lede/openwrt images from the web-gui. |
The NXP 74HC164 GPIO expander driver uses a different config symbol
("CONFIG_GPIO_74X164") and module name since since at least Kernel
version 2.6.37.
Update the kmod package definition accordingly by adjusting kconfig
and module file names.
This unrelated, but correct change has been separated from the
WNR2000v5 support commits.
Ref: lede-project/source#1256
Suggested-by: Raphael Catolino <raphael.catolino@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
As well as having the same problem as mentioned by @lhlpuhjf, I noticed the following commit which has moved the other wnr2000 versions to a "tiny" subtarget which I'm assuming v5 should be moved to as well... "ar71xx: create new ar71xx/tiny subtarget for 4MB flash devices" I did wonder if this has caused the current unable to mount error, but the commit appears after the post by @lhlpuhjf , so I assume not? |
|
Please tell me that this version has a full wpad and not the wpad-mini. I need to connect to a Wifispot like this:
This is for a young Lady, taking care of my grandparents. |
This device has very little flash, there isn't much space. I removed opkg from the image I provided above because it's useless (there is no space to install new packages). But I think it should be able to connect to and extend another wifi fine, people above reported that they did it. Did you follow the tutorial here (packages for it are already integrated in the image)? https://openwrt.org/docs/guide-user/network/wifi/relay_configuration |
|
Thank you so much for your answere! I'm working all day on that problem and don't have a solution. The problem is, that this Version was compiled with wpad-mini and I need a full wpad package for this encoding. I can't install it without opkg, which needs to much space. The only way I see is, to compile it again with wpad instead of wpad-mini. Inconveniently I don't have the knowhow to compile it myself :( That would help us so much and would make a young lady really really happy. Please help, If someone has the knowhow for that. |
|
I'll pull the sources down again and try to recompile it with full wpad, but as can be seen here https://openwrt.org/packages/table/start?dataflt%5BName_pkg-dependencies*%7E%5D=wpad the full wpad uses twice as much space (not counting dependencies). If it fits at all, there won't be the Luci web interface (i.e. you will be able to configure it with SSH only). |
|
Thank you, thank you, thank you! I think there are these three wpad pakages for openwrt:
I read, that the number 2 (wpad-supplicant) should work as well, but it's not testet. I'm a little scared, to loose the GUI as a beginner. You are my hero! |
|
wpad-supplicant does not exist, there is "wpa-supplicant", integrating that. As anticipated, I could not fit Luci web interface with either the full wpad and the wpa-supplicant builds, even if I went in and removed all I could (ipv6 support, the firewall, opkg). This article is about setting up a tftp server on your PC so you can use the firmware recovery procedure (as described in the first post in this thread) to install another firmware, be it LEDE or the stock firmware https://openwrt.org/docs/guide-user/troubleshooting/tftpserver So I built images with wpad + relayd, where opkg was removed (and there is no Luci web interface), this zip file contains the config I used and what packages are included, and of course the firmware image. and wpa-supplicant + wpa-cli (wpa control utility) + relayd where opkg was removed (and there is no Luci web interface), this zip file contains the config I used and what packages are included, and of course the firmware image. |
|
Thank you so much! There was no way I could do that. The configuration with SSH is very good and after lot of research I got it. Important is to connect to the second router and set the Gateway to the first router (WNR2000v5). And it works!!! Unbelievable! It was so nice to see how happy she is with this. Thank you bobafetthotmail, you are the best! |
|
@bobafetthotmail May I ask what the error is when trying to build a firmware that is "too big"? When I try to build an image I get the following: |
|
This device is getting way too much attention. Why are you all so obsessed with it? XD
Afaik it does not post errors, maybe it does print a line in the make output. The main indicator that the firmware is too big is that it will not build the firmware image, so you will not see the firmware image in the folder. It does not delete the older ones so check the dates on the file to make sure that it was created when the compile ended and not much before. Your error seems to have happened because it does not find a tool called m4, which it should have built on its own and placed in /Volumes/OpenWrt/wnr2000test/lede-source/tools/m4 see the following line from your log:
Try increasing the verbosity of the log with make -j1 V=ss and see if it says something more. I would try with make dirclean, which deletes all compiled files so you can start again from a clean slate. Or make distclean to erase all compiled stuff and configuration, and start again from a fully clean state. |
|
Well its just an old router my wife had laying around so I figured why buy a new one haha. Using your suggestion I get a new error: EDIT: Using sudo gets me farther and then stops due to error at some point to check if things can be done without root privileges (but it cant check because root privileges are active I guess). Simply running make after that starts things up again and I get the same m4 error. Idk |
|
Is anyone looking at rebasing this and making a pull request for openwrt trunk? I'm far from seasoned enough for that, but have a v5 device (no serial) and am happy to test builds, and can grab the toolchain to build from source. The openwrt device wiki claims WNR2000v5 is supported in trunk, but it looks like the device support never made it past the staging tree @jow- worked on. (I learned the hard way by flashing a tiny generic trunk build; all came back after a tftp stock flash fortunately.) Current trunk with no mention of WNR2000v5 Edit: For anyone looking at the prebuilt images, this build works without any hassles for me. Some of the other builds (wpad, etc?) seemed to have trouble remembering config changes across reboots due to limited free flash. |
|
I updated the devicepage from "trunk" to "WIP" status, linking to PR#1256. |
|
@knekkert I have the same problem: the router doesn't work as a client (same error in dmesg). |
|
Can someone please make a step by step guide? I am a bit confused with whats happening above |
|
A step guide for what? Installation? Porting to OpenWrt? |
|
Hey guys i am facing some issue over here see i made the firmware after compiling the source as directed above i installed luci i can also flash the image to my router . after my router rebooted it had lede and everything i can make all settings but i cant seem to be able to install openvpn from software section of the lede panel and apart from this all the settings that i change is reverted back to stock lede after it reboots everytime can anyone help me. |
|
@EtherealRachus can you tell me how did you fix the settings not saving issue i really need it please help me |
This device does not have enough flash storage to install that. It barely fits Luci. Read the rest of the thread where I provide pre-compiled images.
Your router's flash storage is full, there is no space to save your settings. Please do a reset to defaults to clean it up. System -> Backup/Flash firmware -> Perform Reset -> Ok |
|
Any help removing the unnecessary packages that is not necessary for the router all i need mostly is the openvpn and wifi thats it any help would be really appreciated |
|
Okay i found out that my vpn supports ppp-mod-ppto and kmod-nf-nathelper-extra for setup is there anyway that i can install and setup these if anyone can please help me remove all the unnecessary packages i just need my vpn to run and my wifi to run thas it please help me @bobafetthotmail |
|
@shanuu95 please use the forum for support requests. |
Specifications :
Flash instructions:
The dni image can be flashed over tftp using uboot firmware recovery
mode via UART or Ethernet.
Via UART, interupt the boot sequence by pressing any key, then use
the 'fw_recovery' command to start the tftp server.
Via ethernet, turn off the router, then power it on while pressing
the reset button. When the status led starts blinking the tftp server
has started. Maintain the reset button pressed until the flash has
started.
The recovery tftp server listens on 192.168.1.1, port 69.
Alternatively you can boot the initramfs without flashing the device
' command to load the initramfs uImage.
via the UART interface.
Start a tftp server listening on 192.168.1.10.
Use the 'tftpboot
Then use the 'bootm' command to start it.
Signed-off-by: Raphael Catolino raphael.catolino@gmail.com