I did manage to compile a WAX620 version based on 23.05.0-rc2. Was more like copy/paste wax218 really and changing some things. But I checked git status after compiling, and it did add this line CONFIG_FRAME_WARN=2048:
Okey, I'm stuck, and not able to successfully build the board-2.bin. I get no errors while compiling, but my package ipq-wifi-netgear_wax620...ipk is only 1 KB, compared to wax218 that is 9 KB.
If I look inside the file, my rootfs-overlay folder is empty. The folder is from the data.tar.gz file btw.
Any tips or hints are very welcome. @jmspswny , is this the same issue you have?
I feel I'm missing some steps to add a new device. I've followed the steps from wax218. But is there any commands you need to run before build to tell that there's something new?
That being said, I've not even been able to successfully build the WAX218 firmware, which does have the necessary BDF file in the repo. Without being able to successfully build a known good firmware, I wasn't going to start building beyond that.
I have now created a board-2.bin from stock file bdwlan.bin. I changed the filename to board-netgear_wax620.ipq8074 and put it in the ipq-wifi folder as described in other posts. However, I'm still unable to include this board-2.bin file in my build. No compile errors tho, but it just want fetch this file.
@kirdes Hello, do you have any hints how to include the board-2.bin file when I build a custom firmware.
Edit: My files for Netgear WAX620. If there's anything wrong please let me know. @jmspswny you may compare your files, to see if I did something wrong .
You could either fork the qca-wireless repo, commit your bdf and update the ipq-wifi makefile to point to your fork or you could omit the ipq-wifi package and simply add that as a cutom file to the build, e.g. just put that file under the target dir with the full path (target/linux/qualcommax/lib/firmware....)
Putting the bdf locally to the ipq-wifi package won't work 'cause the package source ist git. The bdf needs to exists in the git repo and you need to add 2 device specific entries to the makefile.
Thanks for helping out. I'm on RC2 btw, so no qualcommax folder...
I followed your instructions but no luck the first time. I then added my board-2.bin inside base-files folder target/linux/ipq807x/base-files/lib/firmware/ath11k/IPQ8074/hw2.0.
Don't know if that's correct. But that did work, so my board-2.bin is now in build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/base-files/ipkg-aarch64_cortex-a53/base-files/lib/firmware/ath11k/IPQ8074/hw2.0.
Did not see any errors this time.
Edit: Extracted the firmware to see if board-2.bin was included, and it was. Will try to boot initramfs later to see if it detects the changes... Thanks for helping out @kirdes .
Okey, so I managed to create an image and boot with no errors as far as I can see. But I'm not really sure how to manage the leds for LAN and WLAN. I've tried wax218 gpios numbers and some others from the extracted wax620 dts firmware. However, I only got the power leds working.
I have to use &tlmm and not gpio or it will fail. The dts shows the gpios for power, but nothing for lan and wlan. So for now I'm comparing the debug/gpio output when I enable/disable wifi. I dunno if it helps, or it's the right way to do this.
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 430-441, parent: platform/200f000.spmi:pmic@0:gpio@c000, 200f000.spmi:pmic@0:gpio@c000:
gpio1 : ---
gpio2 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio3 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio4 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio5 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio6 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio7 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio8 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio9 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio10: in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio11: out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio12: ---
gpiochip0: GPIOs 442-511, parent: platform/1000000.pinctrl, 1000000.pinctrl:
gpio0 : in low func1 2mA pull down
gpio1 : in high func1 8mA no pull
gpio2 : in high func1 2mA pull down
gpio3 : in high func1 8mA no pull
gpio4 : in high func1 8mA no pull
gpio5 : in low func1 8mA no pull
gpio6 : in low func1 8mA no pull
gpio7 : in low func1 8mA no pull
gpio8 : in low func1 8mA no pull
gpio9 : in high func1 2mA pull down
gpio10 : in high func1 8mA no pull
gpio11 : in high func1 8mA no pull
gpio12 : in low func1 8mA no pull
gpio13 : in low func1 8mA no pull
gpio14 : in low func1 8mA no pull
gpio15 : in low func1 8mA no pull
gpio16 : in low func1 8mA no pull
gpio17 : in high func1 8mA no pull
gpio18 : in low func0 2mA pull down
gpio19 : in low func0 2mA pull down
gpio20 : in low func0 2mA pull down
gpio21 : in low func0 2mA pull down
gpio22 : in high func2 2mA pull down
gpio23 : in low func2 8mA no pull
gpio24 : out low func2 8mA no pull
gpio25 : in low func0 2mA pull down
gpio26 : in low func0 2mA pull down
gpio27 : in low func0 2mA pull down
gpio28 : in high func0 2mA pull down
gpio29 : in low func0 2mA pull down
gpio30 : in low func0 2mA pull down
gpio31 : in high func0 2mA pull down
gpio32 : in low func0 2mA pull down
gpio33 : in low func0 2mA pull down
gpio34 : in low func0 2mA pull down
gpio35 : in low func0 2mA pull down
gpio36 : in high func0 2mA pull down
gpio37 : in low func0 2mA pull down
gpio38 : in low func3 2mA pull up
gpio39 : in high func3 2mA pull up
gpio40 : in high func2 2mA pull up
gpio41 : in high func2 2mA pull up
gpio42 : in low func2 2mA pull down
gpio43 : in low func2 2mA pull down
gpio44 : out high func0 2mA pull down
gpio45 : in high func1 2mA pull down
gpio46 : in low func0 2mA pull down
gpio47 : in low func0 2mA pull down
gpio48 : in low func0 2mA pull down
gpio49 : in low func0 2mA pull down
gpio50 : in low func0 2mA pull down
gpio51 : in low func0 2mA pull down
gpio52 : in high func0 2mA pull down
gpio53 : in low func0 2mA pull down
gpio54 : out low func0 8mA pull down
gpio55 : out high func0 2mA pull down
gpio56 : out low func0 2mA pull down
gpio57 : in low func0 2mA pull down
gpio58 : in low func0 2mA pull down
gpio59 : in low func0 2mA pull down
gpio60 : in low func0 2mA pull down
gpio61 : in low func0 2mA pull down
gpio62 : in low func0 2mA pull down
gpio63 : in low func0 2mA pull down
gpio64 : in low func0 2mA pull down
gpio65 : in low func0 2mA pull down
gpio66 : in low func0 2mA pull down
gpio67 : in high func0 2mA pull down
gpio68 : in high func1 8mA pull up
gpio69 : in high func1 8mA pull up
usage()
{
echo -n "Usage : /etc/netgear_leds.sh <all|colour|led> <on|off>
Valid arguments are :
2g_blue - Turn on/off 2.4G WLAN Blue colour LED
2g_green - Turn on/off 2.4G WLAN Green colour LED"
if [ ${WLAN_NUM_RADIOS} = "3" ]; then
echo -n "
5g_low_blue - Turn on/off 5G_LOW WLAN Blue colour LED
5g_low_green - Turn on/off 5G_LOW WLAN Green colour LED
5g_high_blue - Turn on/off 5G_HIGH WLAN Blue colour LED
5g_high_green - Turn on/off 5G_HIGH WLAN Green colour LED"
else echo -n "
5g_blue - Turn on/off 5G WLAN Blue colour LED
5g_green - Turn on/off 5G WLAN Green colour LED"
fi
echo "
pwr_green - Turn on/off Power Green LED
pwr_red - Turn on/off Power Red LED
pwr_blue - Turn on/off Power Blue LED"
if [ ${ETH_NUM_PORTS} = "2" ]; then
echo -n "
lan1_green - Turn on/off LAN1 Green LED
lan1_amber - Turn on/off LAN1 Orange LED
lan2_green - Turn on/off LAN2 Green LED
lan2_amber - Turn on/off LAN2 Orange LED"
else echo -n "
lan_green - Turn on/off LAN Green LED
lan_amber - Turn on/off LAN Orange LED"
fi
echo "
blue - Turn on/off all Blue LEDs
green - Turn on/off all Green LEDs
red - Turn on/off all Red LEDs
amber - Turn on/off all Amber LEDs
all - Turn on/off all LEDs
Example:
/etc/netgear_leds.sh pwr_red off
/etc/netgear_leds.sh all on"
exit 1
}
I'm sorry, but I can't find any gpio related to lan and wlan. I've posted a gist if you want to have a look.
Edit: Kernel log from stock: Machine model: Qualcomm Technologies, Inc. IPQ807x/AP-HK07, so that's the one I'm using. Some of the others dts is referring to gpios for lan and wlan. I've tried those gpios, but no luck.
Finally... working leds.
Thanks @kirdes for helping out. I was on the right track, and what you pointed out was correct about the led_gpios. I did try the same in the beginning, but it failed. However I did not have kmod-gpio-nxp-74hc164 installed. Dunno why, but as soon as that was installed, the leds started working. So I learned the hard way I guess.
I got one error on load:
kern.err kernel: [ 0.025911] OF: /soc/dp6-syn: could not find phandle 40
Maybe I did something wrong in the aliases with ethernet0 = &dp6_syn; or missing something in my dts.
One thing I'm not sure about is.
If registers-number = <2>; should be 1 or 2. The WAX218 dts use 1.
I've pushed my last changes in my repo if anyone wanna test.
Next up would be creating a valid firmware for stock UI. But that's not something I'm comfortable doing. Maybe someone else with more experience could have a look.