Adding Device to Makefile? (WNDAP360 from ar71xx to ath79)

Could someone help me? I try to convert the Netgear WNDAP360 to OpenWrt. It was a already added in ar71xx:

Device tree seems now okay, the device boots the initramfs. However, the image after flashing does not work.

### main_loop: bootcmd="bootm 0xbf050000"
Enter SPACE to drop into boot loader:  0 
## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-5.10.109
   Created:      2022-04-09   6:04:57 UTC
   Image Type:   MIPS Linux Unknown Image (uncompressed)
   Data Size:    2241536 Bytes =  2.1 MB
   Load Address: bf070000
   Entry Point:  bf070000
   Verifying Checksum ... OK
Wrong Image Type for bootm command

Can someone help me? I have no idea how the makefile works.

If I boot from tftp it looks like this:

done
Bytes transferred = 16994731 (10351ab hex)
ar7100> bootm 0x81000000
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-5.10.109
   Created:      2022-04-09   6:04:57 UTC
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    16994667 Bytes = 16.2 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728

Edit:
I tried now different format like the other netgear devices, but now it results in:

### main_loop: bootcmd="bootm 0xbf050000"
Enter SPACE to drop into boot loader:  0 
## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-5.10.109
   Created:      2022-04-09   6:04:57 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2266349 Bytes =  2.2 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
Unimplemented compression type 3
ar7100> 

with

define Device/netgear_wndap360
  $(Device/netgear_generic)
  SOC := ar7161
  DEVICE_MODEL := WNDAP360
  IMAGE_SIZE := 14336k
  BLOCKSIZE := 256k
  IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
	netgear-rootfs | pad-rootfs
  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
  IMAGE/factory.img := $$(IMAGE/default) | check-size | netgear-dni
endef
TARGET_DEVICES += netgear_wndap360

Edit:
Ah okay, maybe:

file openwrt-19.07.9-ar71xx-generic-wndap360-squashfs-sysupgrade.bin 
openwrt-19.07.9-ar71xx-generic-wndap360-squashfs-sysupgrade.bin: u-boot legacy uImage, MIPS OpenWrt Linux-4.14.267, Linux/MIPS, OS Kernel Image (gzip), 2272692 bytes, Wed Feb 16 20:47:59 2022, Load Address: 0X80060000, Entry Point: 0X80060000, Header CRC: 0XDFB4E6EA, Data CRC: 0XC20A61F4

This seems to work:


define Device/netgear_wndap360
  $(Device/netgear_generic)
  SOC := ar7161
  DEVICE_MODEL := WNDAP360
  IMAGE_SIZE := 14336k
  BLOCKSIZE := 256k
  KERNEL := kernel-bin | append-dtb | gzip | uImage gzip
  KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip
  IMAGES := sysupgrade.bin
  IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \
	check-size | append-metadata
endef
TARGET_DEVICES += netgear_wndap360

:smiley:

1 Like

Great progress, soon I will have access to two of these devices to test your code including POE 802.11af.

For me it is ready to be merged:

1 Like

How long did it take to port ar72xx to ath79 for this device and was it your first?

It was not my first device support, but the first with a lot of changes needed. And further, it was the first port from ar71xx to ath79. I think overall it took two or three days of work. However, I did a lot of mistakes. Now I think I would be faster.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.