From 9b6f89c37fc9c2e23cc123bd7b5cf9a1f8dc301a Mon Sep 17 00:00:00 2001 From: Michal Cieslakiewicz Date: Thu, 31 Oct 2019 21:18:10 +0100 Subject: ath79: add support for Netgear WNDR4300 This patch adds ath79 support for Netgear WNDR4300. Router was previously supported by ar71xx target only. Note: device requires 'ar934x-nand' driver in kernel. Specification ============= * Description: Netgear WNDR4300 * Loader: U-boot * SOC: Atheros AR9344 (560 MHz) * RAM: 128 MiB * Flash: 128 MiB (NAND) - U-boot binary: 256 KiB - U-boot environment: 256 KiB - ART: 256 KiB - POT: 512 KiB - Language: 2 MiB - Config: 512 KiB - Traffic Meter: 3 MiB - Firmware: 25 MiB - ART Backup: 256 KiB - Reserved: 96 MiB * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8327) * Wireless: - 2.4 GHz b/g/n (internal) - 5 GHz a/n (AR9580) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN 2G (green) - WLAN 5G (blue) - 4 x LAN (amber/green) - USB (green) - WPS (amber/green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 2.5A * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Note about partitioning: firmware partition offset (0x6c0000) is hardcoded into vendor's u-boot, so this partition cannot be moved and resized to include Netgear-specific flash areas (pot, language, config, traffic_meter) not used by OpenWrt. Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_nand=y CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y Signed-off-by: Michal Cieslakiewicz --- target/linux/ath79/image/nand.mk | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'target/linux/ath79/image') diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index c11ff6a257..0f7514060e 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,3 +1,5 @@ +include ./common-netgear.mk # for netgear-uImage + # attention: only zlib compression is allowed for the boot fs define Build/zyxel-buildkerneljffs rm -rf $(KDIR_TMP)/zyxelnbg6716 @@ -59,6 +61,36 @@ define Device/glinet_gl-ar300m-nand endef TARGET_DEVICES += glinet_gl-ar300m-nand +# fake rootfs is mandatory, pad-offset 129 equals (2 * uimage_header + 0xff) +define Device/netgear_ath79_nand + DEVICE_VENDOR := NETGEAR + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport + KERNEL_SIZE := 2048k + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 25600k + KERNEL := kernel-bin | append-dtb | lzma -d20 | \ + pad-offset $$(KERNEL_SIZE) 129 | \ + netgear-uImage lzma | append-string -e '\xff' | \ + append-uImage-fakehdr filesystem $$(NETGEAR_KERNEL_MAGIC) + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma + IMAGES := sysupgrade.bin factory.img + IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size $$$$(IMAGE_SIZE) + UBINIZE_OPTS := -E 5 +endef + +define Device/netgear_wndr4300 + ATH_SOC := ar9344 + DEVICE_MODEL := WNDR4300 + NETGEAR_KERNEL_MAGIC := 0x33373033 + NETGEAR_BOARD_ID := WNDR4300 + NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3 + SUPPORTED_DEVICES += wndr4300 + $(Device/netgear_ath79_nand) +endef +TARGET_DEVICES += netgear_wndr4300 + define Device/zyxel_nbg6716 ATH_SOC := qca9558 DEVICE_VENDOR := ZyXEL -- cgit v1.2.3