openwrt/target/linux/ipq806x/image/Makefile

474 lines
13 KiB
Makefile
Raw Normal View History

# Copyright (c) 2014 The Linux Foundation. All rights reserved.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
DEVICE_VARS += TPLINK_BOARD_ID
define Build/buffalo-rootfs-cksum
( \
echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
$(STAGING_DIR_HOST)/bin/awk '{s+=$$0}END{printf "%x", 255-s%256}')"; \
) >> $@
endef
ipq806x: add support for ASRock G10 The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router, based on Qualcomm IPQ8064. Specifications: SoC: Qualcomm IPQ8064 CPU: Dual-Core A15 @ (384 - 1,400 MHz, 2C2T) DRAM: 512 MiB (~467 MiB available) NAND: 128 MB (Micron MT29F1G08ABBEAH4) WLAN0: 4T4R 5 GHz Wlan (QCA9980) WLAN1: 4T4R 2.4 GHz Wlan (QCA9980) ETH: 5x 10/100/1000 Mbps Ethernet (QCA8337) INPUT: Reset Button, WPS 2.4G and WPS 5G Button LEDS: 1 multicolor status LED USB: 2x USB 3.0 Type-A POWER: 12VDC/3A AC Adapter + dedicated Power Switch UART: Setting is 115200-8-N-1. 1x4 .1" unpopulated header on the PCB (J6 - very tiny silkscreen next to TX). Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX WARNING: The serial port needs a TTL/RS-232 3.3v level converter! (Depending on the serial adapter RX and TX might need to be swapped). Note about the IR-Remote: There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the IR-Remote and is fed by the IR-Photodiode. The SoC can talk to the device via I2C. The vendor's GPL archive comes with the source of the interface driver for this as a (character driver), the main control software is however a blob. Installation Instructions: 1. Download factory image to disk 2. Apply factory image via stock web-gui Back to stock: 1. Login to router via ssh 2. run "asrock_g10_back_to_factory" script from /sbin Notes: - If something goes wrong durring sysupgrade, router will go back to factory image. - Asrock G10 uses partition layout from smem. So partition layout can be normal or alternate. - 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch from powerpc target. Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old OpenWrt forum (Post #50): https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [bump to 5.4, add factory image, fix sysupgrade, convert partition layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes] Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
2019-10-12 00:49:15 +02:00
define Build/edimax-header
$(eval edimax_model=$(word 1,$(1)))
$(STAGING_DIR_HOST)/bin/mkedimaximg \
-b -s CSYS -m $(edimax_model) \
-f 0x70000 -S 0x1200000 \
-i $@ -o $@.new
@mv $@.new $@
endef
define Device/Default
PROFILES := Default
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
ipq806x: add ipq4019 fritz4040 support This patch adds support for AVM FRITZ!Box 4040. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB Nanya NT5CC128M16IP FLASH: 32 MiB MXIC MX25L25635FMI ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) 1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one WLAN and one WPS button LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN. Serial: WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! The Serial setting is 115200-8-N-1. The SoC's serial port is right next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1" header for it. Use a multimeter to figure out the pinout! This board currently needs an additional u-boot image in order to boot properly. Booting with EVA isn't possible ATM. Install Procedure: 0. It's highly recommended to connect to the serial port. The serial settings are listed above. 1. install a u-boot image for AVM Fritz!Box 4040 (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>) 2. upload the initramfs.itb image via tftp (u-boot listens to 192.168.1.1 - use binary transfer mode!) 3. connect to the FB4040 and use sysupgrade sysupgrade.bin to install the image. Works: - Switch and Ethernet (99%) - Buttons (WLAN, WPS) - FLASH (1 x 32MiB NOR Chip) - WLAN2G and WLAN5G - CPUFREQ scaling - PRNG - serial - Crypto Accelerator - sysupgrade (Read the flash instructions to avoid bricking) - full LEDE Install (Read the flash instructions to avoid bricking) - LEDs (Power, WAN, Info (red and amber), LAN) The LEDs are connected to the QCA8075 LED ports. The AR40xx driver contains a gpio-controller to handle these special "GPIOs". - USB Both 3.0 and 2.0 ports - many packages from other ARMv7 boards (This does include the RaspberryPi Model 2!) - ... Not planned: - WAN<->LAN short-cut - Qualcomm Secure Execution Environment - ... Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
2017-03-14 17:04:28 +01:00
KERNEL_LOADADDR = 0x42208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
endef
define Device/LegacyImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
endef
define Device/FitImage
KERNEL_SUFFIX := -fit-uImage.itb
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_NAME := Image
endef
ipq806x: add ipq4019 fritz4040 support This patch adds support for AVM FRITZ!Box 4040. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB Nanya NT5CC128M16IP FLASH: 32 MiB MXIC MX25L25635FMI ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) 1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one WLAN and one WPS button LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN. Serial: WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! The Serial setting is 115200-8-N-1. The SoC's serial port is right next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1" header for it. Use a multimeter to figure out the pinout! This board currently needs an additional u-boot image in order to boot properly. Booting with EVA isn't possible ATM. Install Procedure: 0. It's highly recommended to connect to the serial port. The serial settings are listed above. 1. install a u-boot image for AVM Fritz!Box 4040 (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>) 2. upload the initramfs.itb image via tftp (u-boot listens to 192.168.1.1 - use binary transfer mode!) 3. connect to the FB4040 and use sysupgrade sysupgrade.bin to install the image. Works: - Switch and Ethernet (99%) - Buttons (WLAN, WPS) - FLASH (1 x 32MiB NOR Chip) - WLAN2G and WLAN5G - CPUFREQ scaling - PRNG - serial - Crypto Accelerator - sysupgrade (Read the flash instructions to avoid bricking) - full LEDE Install (Read the flash instructions to avoid bricking) - LEDs (Power, WAN, Info (red and amber), LAN) The LEDs are connected to the QCA8075 LED ports. The AR40xx driver contains a gpio-controller to handle these special "GPIOs". - USB Both 3.0 and 2.0 ports - many packages from other ARMv7 boards (This does include the RaspberryPi Model 2!) - ... Not planned: - WAN<->LAN short-cut - Qualcomm Secure Execution Environment - ... Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
2017-03-14 17:04:28 +01:00
define Device/FitImageLzma
KERNEL_SUFFIX := -fit-uImage.itb
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_NAME := Image
endef
define Device/UbiFit
KERNEL_IN_UBI := 1
ipq806x: add support for Compex WPQ864 Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-30 09:51:54 +01:00
IMAGES := nand-factory.bin nand-sysupgrade.bin
IMAGE/nand-factory.bin := append-ubi
IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/DniImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
NETGEAR_BOARD_ID :=
NETGEAR_HW_ID :=
UBINIZE_OPTS := -E 5
IMAGES += factory.img
IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata
endef
define Device/TpSafeImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
TPLINK_BOARD_ID :=
IMAGES += factory.bin
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
endef
define Device/ZyXELImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE)
KERNEL_NAME := zImage
IMAGES += factory.bin
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
endef
ipq806x: add support for Askey RT4230W REV6 This adds support for the Askey RT4230W REV6 (Branded by Spectrum/Charter as RAC2V1K) At this time, there's no way to reinstall the stock firmware so don't install this on a router that's being rented. Specifications: Qualcomm IPQ8065 1 GB of RAM (DDR3) 512 MB Flash (NAND) 2x Wave 2 WiFi cards (QCA9984) 5x 10/100/1000 Mbps Ethernet (Switch: QCA8337) 1x LED (Controlled by a microcontroller that switches it between red and blue with different patterns) 1x USB 3.0 Type-A 12V DC Power Input UART header on PCB - pinout from top to bottom is RX, TX, GND, 5V Port settings are 115200n8 More information: https://forum.openwrt.org/t/askey-rac2v1k-support/15830 https://deviwiki.com/wiki/Askey_RAC2V1K To check what revision your router is, restore one of these config backups through the stock firmware to get ssh access then run "cat /proc/device-tree/model". https://forum.openwrt.org/t/askey-rac2v1k-support/15830/17 The revision number on the board doesn't seem to be very consistent so that's why this is needed. You can also run printenv in the uboot console and if machid is set to 177d, that means your router is rev6. Note: Don't install this if the router is being rented from an ISP. The defined partition layout is different from the OEM one and even if you changed the layout to match, backing up and restoring the OEM firmware breaks /overlay so nothing will save and the router will likely enter a bootloop. How to install: Method 1: Install without opening the case using SSH and tftp You'll need: RAC2V1K-SSH.zip: https://github.com/lmore377/openwrt-rt4230w/blob/master/RAC2V1K-SSH.zip initramfs and sysupgrade images Connect to one of the router's LAN ports Download the RAC2V1K-SSH.zip file and restore the config file that corresponds to your router's firmware (If you're firmware is newer than what's in the zip file, just restore the 1.1.16 file) After a reboot, you should be able to ssh into the router with username: "4230w" and password: "linuxbox" or "admin". Run the following commannds fw_setenv ipaddr 10.42.0.10 #IP of router, can be anything as long as it's in the same subnet as the server fw_setenv serverip 10.42.0.1# #IP of tftp server that's set up in next steps fw_setenv bootdelay 8 fw_setenv bootcmd "tftpboot initramfs.bin; bootm; bootipq" Don't reboot the router yet. Install and set up a tftp server on your computer Set a static ip on the ethernet interface of your computer (use this for serverip in the above commands) Rename the initramfs image to initramfs.bin, and host it with the tftp server Reboot the router. If you set up everything right, the router led should switch over to a slow blue glow which means openwrt is booted. If for some reason the file doesn't get loaded into ram properly, it should still boot to the OEM firmware. After openwrt boots, ssh into it and run these commands: fw_setenv bootcmd "setenv mtdids nand0=nand0 && setenv mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm" fw_setenv bootdelay 2 After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted. Method 2: Install with serial access (Do this if something fails and you can't boot after using method 1) You'll need: initramfs and sysupgrade images Serial access: https://openwrt.org/inbox/toh/askey/askey_rt4230w_rev6#opening_the_case Install and set up a tftp server Set a static ip on the ethernet interface of your computer Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server Connect the wan port of the router to your computer Interrupt U-Boot and run these commands: setenv serverip 10.42.0.1 (You can use whatever ip you set for the computer) setenv ipaddr 10.42.0.10 (Can be any ip as long as it's in the same subnet) setenv bootcmd "setenv mtdids nand0=nand0 && set mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm" saveenv tftpboot initramfs.bin bootm After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted. Signed-off-by: Lauro Moreno <lmore377@gmail.com> [add entry in 5.10 patch, fix whitespace issues] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-28 21:59:47 +01:00
define Device/askey_rt4230w-rev6
$(call Device/LegacyImage)
DEVICE_VENDOR := Askey
DEVICE_MODEL := RT4230W
DEVICE_VARIANT := REV6
SOC := qcom-ipq8065
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
KERNEL_IN_UBI := 1
endef
TARGET_DEVICES += askey_rt4230w-rev6
ipq806x: add support for ASRock G10 The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router, based on Qualcomm IPQ8064. Specifications: SoC: Qualcomm IPQ8064 CPU: Dual-Core A15 @ (384 - 1,400 MHz, 2C2T) DRAM: 512 MiB (~467 MiB available) NAND: 128 MB (Micron MT29F1G08ABBEAH4) WLAN0: 4T4R 5 GHz Wlan (QCA9980) WLAN1: 4T4R 2.4 GHz Wlan (QCA9980) ETH: 5x 10/100/1000 Mbps Ethernet (QCA8337) INPUT: Reset Button, WPS 2.4G and WPS 5G Button LEDS: 1 multicolor status LED USB: 2x USB 3.0 Type-A POWER: 12VDC/3A AC Adapter + dedicated Power Switch UART: Setting is 115200-8-N-1. 1x4 .1" unpopulated header on the PCB (J6 - very tiny silkscreen next to TX). Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX WARNING: The serial port needs a TTL/RS-232 3.3v level converter! (Depending on the serial adapter RX and TX might need to be swapped). Note about the IR-Remote: There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the IR-Remote and is fed by the IR-Photodiode. The SoC can talk to the device via I2C. The vendor's GPL archive comes with the source of the interface driver for this as a (character driver), the main control software is however a blob. Installation Instructions: 1. Download factory image to disk 2. Apply factory image via stock web-gui Back to stock: 1. Login to router via ssh 2. run "asrock_g10_back_to_factory" script from /sbin Notes: - If something goes wrong durring sysupgrade, router will go back to factory image. - Asrock G10 uses partition layout from smem. So partition layout can be normal or alternate. - 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch from powerpc target. Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old OpenWrt forum (Post #50): https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [bump to 5.4, add factory image, fix sysupgrade, convert partition layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes] Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
2019-10-12 00:49:15 +02:00
define Device/asrock_g10
$(call Device/FitImage)
$(call Device/UbiFit)
SOC := qcom-ipq8064
DEVICE_VENDOR := ASRock
DEVICE_MODEL := G10
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 5332k
DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
endef
TARGET_DEVICES += asrock_g10
define Device/buffalo_wxr-2533dhp
$(call Device/LegacyImage)
SOC := qcom-ipq8064
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WXR-2533DHP
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 65536k
KERNEL_IN_UBI := 1
IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
sysupgrade-tar rootfs=$$$$@ | append-metadata
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += buffalo_wxr-2533dhp
ipq806x: add support for Compex WPQ864 Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-30 09:51:54 +01:00
define Device/compex_wpq864
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Compex
DEVICE_MODEL := WPQ864
ipq806x: add support for Compex WPQ864 Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-30 09:51:54 +01:00
BLOCKSIZE := 128k
PAGESIZE := 2048
SOC := qcom-ipq8064
ipq806x: add support for Compex WPQ864 Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-30 09:51:54 +01:00
DEVICE_PACKAGES := kmod-gpio-beeper
endef
TARGET_DEVICES += compex_wpq864
define Device/edgecore_ecw5410
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Edgecore
DEVICE_MODEL := ECW5410
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_DTS_CONFIG := config@v2.0-ap160
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
endef
TARGET_DEVICES += edgecore_ecw5410
ipq806x: add support for Linksys EA7500 V1 This patch adds support for the Linksys EA7500 V1 router. Specification: - CPU: Qualcomm IPQ8064 - RAM: 256MB - Flash: NAND 128MB - WiFi: QCA9982 an+ac + QCA9983 bgn - Ethernet: 5 GBE Ports (WAN+ 4xLAN) (QCA8337) - USB: 1x USB 3.0 1x USB2.0 - Serial console: RJ-45 115200 8n1 (1V8 Voltage level) - 2 Buttons - 1 LED Known issues: - Some devices won't flash via web gui Installation: - Newer stock images doesn't allow to install custom firmware. - Please downgrade software to 1.1.2 version. Official firmware: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.gpg.img - Do it two times to downgrade all stored images. - Apply factory image via web-gui. Serial + TFTP method: - downgrade to 1.1.2 two times - connect ehternet and serial cable - set ip address of tftp server to 192.168.1.254 - put openwrt factory image to tftp folder and rename it to macan.bin - stop device while booting in u-boot - run command: "run flashimg" - run command: "setenv boot_part 1" - run command "saveenv" - reset Back to stock: - Please use old non-gpg image like this 1.1.2: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.img - ssh to router and copy image to tmp - use sysupgrade -n -F Tested by github users: @jack338c and @grzesiczek1 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [removed i2c4_pins, mdio0_pins, nand_pins, rgmii2_pins from DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-05-26 21:14:11 +02:00
define Device/linksys_ea7500-v1
$(call Device/LegacyImage)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA7500
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
PAGESIZE := 2048
BLOCKSIZE := 128k
KERNEL_SIZE := 3072k
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
UBINIZE_OPTS := -E 5
IMAGES := factory.bin sysupgrade.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE)
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += linksys_ea7500-v1
define Device/linksys_ea8500
$(call Device/LegacyImage)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA8500
SOC := qcom-ipq8064
PAGESIZE := 2048
BLOCKSIZE := 128k
KERNEL_SIZE := 3072k
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
BOARD_NAME := ea8500
SUPPORTED_DEVICES += ea8500
UBINIZE_OPTS := -E 5
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += linksys_ea8500
ipq806x: add support for Cisco Meraki MR42/MR52 The MR42 and MR52 are two similar IPQ806x based devices from the Cisco Meraki "Cryptid" series. MR42 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9992 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 1x AR8033 PHY - PoE/AC power MR52 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9994 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 2x AR8033 PHYs - PoE/AC power (MR42 Only) Installation via diagnostic mode: If you can successfully complete step 1 then you can continue to install via this method without having to open the device. Otherwise please use the standard UART method. Please note that when booting via TFTP, some Ethernet devices, in particular those on laptops, will not connect in time, resulting in TFTP boot not succeeding. In this instance it is advised to connect via a switch. 1. Hold down reset at power on and keep holding, after around 10 seconds if the orange LED changes behaviour to begin flashing, proceed to release reset, then press reset two times. Ensure that the LED has turned blue. Note that flashing will occur on some devices, but it will not be possible to change the LED colour using the reset button. In this case it will still be possible to continue with this install method. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving mr42_u-boot.mbn and openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained from [1]. 3. Use telnet and connect to 192.168.1.1. Run the following commands to install u-boot. Note that all these commands are critical, an error will likely render the device unusable. Option 3.1: If you are sure you have set up the TFTP server correctly you can run this script on the device. This will download and flash the u-boot image immediately: `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn` Once completed successfully, power off the device. Option 3.2: If you are unsure the TFTP server is correctly set up you can obtain the image and flash manually: 3.2.1. `cd /tmp` 3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn` 3.2.3. Confirm file has downloaded correctly by comparing the md5sum: `md5sum mr42_u-boot.mbn` 3.2.4. The following are the required commands to write the image. `echo 1 > /sys/devices/platform/msm_nand/boot_layout mtd erase /dev/mtd1 nandwrite -pam /dev/mtd1 mr42_u-boot.mbn echo 0 > /sys/devices/platform/msm_nand/boot_layout` Important: You must observe the output of the `nandwrite` command. Look for the following to verify writing is occurring: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` If you do not see this then do not power off the device. Check your previous commands and that mr42_u-boot.mbn was downloaded correctly. Once you are sure the image has been written you can proceed to power off the device. 4. Hold the reset button and power on the device. This will immediately begin downloading the appropriate initramfs image and boot into it. Note: If the device does not download the initramfs, this is likely due to the interface not being brought up in time. Changing Ethernet source to a router or switch will likely resolve this. You can also try manually setting the link speed to 10Mb/s Half-Duplex. 5. Once a solid white LED is displayed on the device, continue to the UART installation method, step 6. Standard installation via UART - MR42 & MR52 1. Disassemble the device and connect a UART header. The header pinout is as follows: 1 - 3.3v 2 - TXD 3 - RXD 4 - GND Important: You should only connect TXD, RXD and GND. Connecting 3.3v may damage the device. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb. Separately obtain the respective sysupgrade image. 3. Run the following commands, preferably from a Linux host. The mentioned files, including ubootwrite.py and u-boot images, can be obtained from [1]. `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin` The default for "--serial" option is /dev/ttyUSB0. 4. Power on the device. The ubootwrite script will upload the image to the device and launch it. The second stage u-boot will in turn load the initramfs image by TFTP, provided the TFTP server is running correctly. This process will take about 13 minutes. Once a solid white LED is displayed, the image has successfully finished loading. Note: If the image does not load via TFTP, try again with the Ethernet link to 10Mb/s Half-Duplex. 5. (MR42 only) Do not connect over the network. Instead connect over the UART using minicom or similar tool. To replace u-boot with the network enabled version, please run the following commands. Note that in the provided initramfs images, the u-boot.mbn file is located in /root: If you have not used the provided initramfs, you must ensure you are using an image with "boot_layout" ECC configuration enabled in the Kernel. This will be version 5.10 or higher. If you do not do this correctly the device will be bricked. `insmod mtd-rw i_want_a_brick=1 mtd erase /dev/mtd8 nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn` After running nandwrite, ensure you observe the following output: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` 6. (Optional) If you have no further use for the Meraki OS, you can remove all other UBI volumes on ubi0 (mtd11), including diagnostic1, part.old, storage and part.safe. You must not remove the ubi1 ART partition (mtd12). `for i in diagnostic1 part.old storage part.safe ; do ubirmvol /dev/ubi0 -N $i done` 7. Proceed to flash the sysupgrade image via luci, or else download or scp the image to /tmp and use the sysupgrade command. [1] The mentioned images and ubootwrite.py script can be found in this repo: https://github.com/clayface/openwrt-cryptid [2] The modified u-boot sources for the MR42 and MR52 are available: https://github.com/clayface/U-boot-MR52-20200629 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-05-10 00:28:04 +02:00
define Device/meraki_mr42
$(call Device/FitImage)
DEVICE_VENDOR := Cisco Meraki
DEVICE_MODEL := MR42
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_LOADADDR = 0x44208000
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
-uboot-envtools ath10k-firmware-qca9887-ct \
ath10k-firmware-qca99x0-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
kmod-leds-tlc591xx
endef
TARGET_DEVICES += meraki_mr42
define Device/meraki_mr52
$(call Device/FitImage)
DEVICE_VENDOR := Cisco Meraki
DEVICE_MODEL := MR52
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_LOADADDR = 0x44208000
DEVICE_DTS_CONFIG := config@2
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
-uboot-envtools ath10k-firmware-qca9887-ct \
ath10k-firmware-qca9984-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
kmod-leds-tlc591xx
endef
TARGET_DEVICES += meraki_mr52
ipq806x: add support for NEC Aterm WG2600HP NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm IPQ8064. Specification: - IPQ8064 (384 - 1,400 MHz) - 512 MB of RAM - 32 MB of Flash (SPI) - 4T4R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 12x LEDs, 4x keys - 1x USB 3.0 Type-A - UART header on PCB - RX, TX, NC, GND, Vcc from power connector side - baudrate: 115200 bps Flash instruction using initramfs image: 1. Connect serial cable to UART header 2. Connect power cable and turn on the router 3. When the "Press the [f] key and hit [enter] to enter failsafe mode" message is displayed on the console, press the "f" key and Enter key sequentially to enter the failsafe mode 4. create fw_env.config file with following contents on failsafe mode: /dev/mtd9 0x0 0x10000 0x10000 5. Execute following commands to add and change the environment variables of U-Boot fw_setenv ipaddr "192.168.0.1" fw_setenv serverip "192.168.0.2" fw_setenv autostart "yes" fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin; bootipq" 6. Set the IP address of the computer to 192.168.0.2, connect to the LAN port of WG2600HP, and start the TFTP server on the computer 7. Rename OpenWrt initramfs image for WG2600HP to "wg2600hp-initramfs.bin" and place it in the TFTP directory 8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP 9. WG2600HP downloads initramfs image from TFTP server on the computer, loads it and boot with initramfs image 10. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with the sysupgrade image 11. Wait ~180 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-17 09:06:02 +02:00
define Device/nec_wg2600hp
$(call Device/LegacyImage)
DEVICE_VENDOR := NEC
DEVICE_MODEL := Aterm WG2600HP
SOC := qcom-ipq8064
ipq806x: add support for NEC Aterm WG2600HP NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm IPQ8064. Specification: - IPQ8064 (384 - 1,400 MHz) - 512 MB of RAM - 32 MB of Flash (SPI) - 4T4R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 12x LEDs, 4x keys - 1x USB 3.0 Type-A - UART header on PCB - RX, TX, NC, GND, Vcc from power connector side - baudrate: 115200 bps Flash instruction using initramfs image: 1. Connect serial cable to UART header 2. Connect power cable and turn on the router 3. When the "Press the [f] key and hit [enter] to enter failsafe mode" message is displayed on the console, press the "f" key and Enter key sequentially to enter the failsafe mode 4. create fw_env.config file with following contents on failsafe mode: /dev/mtd9 0x0 0x10000 0x10000 5. Execute following commands to add and change the environment variables of U-Boot fw_setenv ipaddr "192.168.0.1" fw_setenv serverip "192.168.0.2" fw_setenv autostart "yes" fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin; bootipq" 6. Set the IP address of the computer to 192.168.0.2, connect to the LAN port of WG2600HP, and start the TFTP server on the computer 7. Rename OpenWrt initramfs image for WG2600HP to "wg2600hp-initramfs.bin" and place it in the TFTP directory 8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP 9. WG2600HP downloads initramfs image from TFTP server on the computer, loads it and boot with initramfs image 10. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with the sysupgrade image 11. Wait ~180 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-17 09:06:02 +02:00
BLOCKSIZE := 64k
BOARD_NAME := wg2600hp
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
ipq806x: add support for NEC Aterm WG2600HP NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm IPQ8064. Specification: - IPQ8064 (384 - 1,400 MHz) - 512 MB of RAM - 32 MB of Flash (SPI) - 4T4R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 12x LEDs, 4x keys - 1x USB 3.0 Type-A - UART header on PCB - RX, TX, NC, GND, Vcc from power connector side - baudrate: 115200 bps Flash instruction using initramfs image: 1. Connect serial cable to UART header 2. Connect power cable and turn on the router 3. When the "Press the [f] key and hit [enter] to enter failsafe mode" message is displayed on the console, press the "f" key and Enter key sequentially to enter the failsafe mode 4. create fw_env.config file with following contents on failsafe mode: /dev/mtd9 0x0 0x10000 0x10000 5. Execute following commands to add and change the environment variables of U-Boot fw_setenv ipaddr "192.168.0.1" fw_setenv serverip "192.168.0.2" fw_setenv autostart "yes" fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin; bootipq" 6. Set the IP address of the computer to 192.168.0.2, connect to the LAN port of WG2600HP, and start the TFTP server on the computer 7. Rename OpenWrt initramfs image for WG2600HP to "wg2600hp-initramfs.bin" and place it in the TFTP directory 8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP 9. WG2600HP downloads initramfs image from TFTP server on the computer, loads it and boot with initramfs image 10. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with the sysupgrade image 11. Wait ~180 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-17 09:06:02 +02:00
endef
TARGET_DEVICES += nec_wg2600hp
define Device/nec_wg2600hp3
$(call Device/LegacyImage)
DEVICE_VENDOR := NEC Platforms
DEVICE_MODEL := Aterm WG2600HP3
SOC := qcom-ipq8062
BLOCKSIZE := 64k
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform -kmod-usb-ohci -kmod-usb2 \
-kmod-usb-ledtrig-usbport -kmod-usb-phy-qcom-dwc3 -kmod-usb3 -kmod-usb-dwc3-qcom \
ath10k-firmware-qca9984-ct ipq-wifi-nec_wg2600hp3
endef
TARGET_DEVICES += nec_wg2600hp3
define Device/netgear_d7800
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 D7800
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := D7800
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := d7800
SUPPORTED_DEVICES += d7800
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
ipq806x: add ipq4019 fritz4040 support This patch adds support for AVM FRITZ!Box 4040. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB Nanya NT5CC128M16IP FLASH: 32 MiB MXIC MX25L25635FMI ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) 1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one WLAN and one WPS button LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN. Serial: WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! The Serial setting is 115200-8-N-1. The SoC's serial port is right next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1" header for it. Use a multimeter to figure out the pinout! This board currently needs an additional u-boot image in order to boot properly. Booting with EVA isn't possible ATM. Install Procedure: 0. It's highly recommended to connect to the serial port. The serial settings are listed above. 1. install a u-boot image for AVM Fritz!Box 4040 (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>) 2. upload the initramfs.itb image via tftp (u-boot listens to 192.168.1.1 - use binary transfer mode!) 3. connect to the FB4040 and use sysupgrade sysupgrade.bin to install the image. Works: - Switch and Ethernet (99%) - Buttons (WLAN, WPS) - FLASH (1 x 32MiB NOR Chip) - WLAN2G and WLAN5G - CPUFREQ scaling - PRNG - serial - Crypto Accelerator - sysupgrade (Read the flash instructions to avoid bricking) - full LEDE Install (Read the flash instructions to avoid bricking) - LEDs (Power, WAN, Info (red and amber), LAN) The LEDs are connected to the QCA8075 LED ports. The AR40xx driver contains a gpio-controller to handle these special "GPIOs". - USB Both 3.0 and 2.0 ports - many packages from other ARMv7 boards (This does include the RaspberryPi Model 2!) - ... Not planned: - WAN<->LAN short-cut - Qualcomm Secure Execution Environment - ... Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
2017-03-14 17:04:28 +01:00
endef
TARGET_DEVICES += netgear_d7800
ipq806x: add ipq4019 fritz4040 support This patch adds support for AVM FRITZ!Box 4040. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB Nanya NT5CC128M16IP FLASH: 32 MiB MXIC MX25L25635FMI ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) 1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one WLAN and one WPS button LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN. Serial: WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! The Serial setting is 115200-8-N-1. The SoC's serial port is right next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1" header for it. Use a multimeter to figure out the pinout! This board currently needs an additional u-boot image in order to boot properly. Booting with EVA isn't possible ATM. Install Procedure: 0. It's highly recommended to connect to the serial port. The serial settings are listed above. 1. install a u-boot image for AVM Fritz!Box 4040 (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>) 2. upload the initramfs.itb image via tftp (u-boot listens to 192.168.1.1 - use binary transfer mode!) 3. connect to the FB4040 and use sysupgrade sysupgrade.bin to install the image. Works: - Switch and Ethernet (99%) - Buttons (WLAN, WPS) - FLASH (1 x 32MiB NOR Chip) - WLAN2G and WLAN5G - CPUFREQ scaling - PRNG - serial - Crypto Accelerator - sysupgrade (Read the flash instructions to avoid bricking) - full LEDE Install (Read the flash instructions to avoid bricking) - LEDs (Power, WAN, Info (red and amber), LAN) The LEDs are connected to the QCA8075 LED ports. The AR40xx driver contains a gpio-controller to handle these special "GPIOs". - USB Both 3.0 and 2.0 ports - many packages from other ARMv7 boards (This does include the RaspberryPi Model 2!) - ... Not planned: - WAN<->LAN short-cut - Qualcomm Secure Execution Environment - ... Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
2017-03-14 17:04:28 +01:00
define Device/netgear_r7500
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 R7500
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7500
NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7500
SUPPORTED_DEVICES += r7500
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += netgear_r7500
define Device/netgear_r7500v2
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 R7500
DEVICE_VARIANT := v2
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7500v2
NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7500v2
SUPPORTED_DEVICES += r7500v2
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += netgear_r7500v2
define Device/netgear_r7800
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4S R7800
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7800
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7800
SUPPORTED_DEVICES += r7800
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
endef
TARGET_DEVICES += netgear_r7800
ipq806x: add support for Netgear Nighthawk Pro Gaming XR500 This adds support for the Netgear Nighthawk Pro Gaming XR500. It is the successor to the Netgear Nighthawk R7800 and shares almost identical hardware to that device. The stock firmware is a heavily modified version of OpenWRT. Specifications: SoC: Qualcomm Atheros IPQ8065 RAM: 512 MB Storage: 256 MiB NAND Flash Wireless: 2x Qualcomm Atheros QCA9984 Ethernet: 2x 1000/100/10 dedicated interfaces Switch: 5x 1000/100/10 external ports USB: 2x 3.0 ports More information: Manufacturer page: https://www.netgear.com/gaming/xr500/ Almost identical to Netgear R7800 Differences (r7800 > xr500): Flash: 128MiB > 256MiB Removed esata swapped leds: usb1 (gpio 7 > 8) usb2 (gpio 8 > 26) guest/esata (gpio 26 > 7) MAC addresses: On the OEM firmware, the mac addresses are: WAN: *:50 art 0x6 LAN: *:4f art 0x0 (label) 2G: *:4f art 0x0 5G: *:51 art 0xc Installation: Install via Web Interface (preferred): Utilize openwrt-ipq806x-netgear_xr500-squashfs-factory.img Install via TFTP recovery: 1.Turn off the power, push and hold the reset button (in a hole on backside) with a pin 2.Turn on the power and wait till power led starts flashing white (after it first flashes orange for a while) 3.Release the reset button and tftp the factory img in binary mode. The power led will stop flashing if you succeeded in transferring the image, and the router reboots rather quickly with the new firmware. 4.Try to ping the router (ping 192.168.1.1). If does not respond, then tftp will not work either. Uploading the firmware image with a TFTP client $ tftp 192.168.1.1 bin put openwrt-ipq806x-netgear_xr500-squashfs-factory.img Note: The end of the last partition is at 0xee00000. This was chosen by the initial author, but nobody was able to tell why this particular arbitrary size was chosen. Since it's not leaving too much empty space and it's the only issue left, let's just keep it for now. Based on work by Adam Hnat <adamhnat@gmail.com> ref: https://github.com/openwrt/openwrt/pull/3215 Signed-off-by: Peter Geis <pgwipeout@gmail.com> [squash commits, move common LEDs to DTSI, remove SPDX on old files, minor whitespace cleanup, commit message facelift, add MAC address overview, add Notes, fix MAC addresses, use generic name for partition nodes in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-09-13 17:08:57 +02:00
define Device/netgear_xr500
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk XR500
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := XR500
NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
endef
TARGET_DEVICES += netgear_xr500
define Device/qcom_ipq8064-ap148
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP148
DEVICE_VARIANT := standard
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap148
KERNEL_INSTALL := 1
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap148
SUPPORTED_DEVICES += ap148
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap148
define Device/qcom_ipq8064-ap148-legacy
$(call Device/LegacyImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP148
DEVICE_VARIANT := legacy
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap148
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap148
SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap148-legacy
define Device/qcom_ipq8064-ap161
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP161
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap161
KERNEL_INSTALL := 1
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap161
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap161
define Device/qcom_ipq8064-db149
$(call Device/FitImage)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := DB149
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-db149
KERNEL_INSTALL := 1
BOARD_NAME := db149
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-db149
define Device/tplink_ad7200
$(call Device/TpSafeImage)
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := AD7200
DEVICE_VARIANT := v1/v2
DEVICE_ALT0_VENDOR := TP-Link
DEVICE_ALT0_MODEL := Talon AD7200
DEVICE_ALT0_VARIANT := v1/v2
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
TPLINK_BOARD_ID := AD7200
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210
endef
TARGET_DEVICES += tplink_ad7200
define Device/tplink_c2600
$(call Device/TpSafeImage)
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer C2600
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := c2600
SUPPORTED_DEVICES += c2600
TPLINK_BOARD_ID := C2600
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += tplink_c2600
define Device/tplink_vr2600v
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer VR2600v
DEVICE_VARIANT := v1
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
KERNEL_SIZE := 3072k
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := vr2600v
SUPPORTED_DEVICES += vr2600v
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
endef
TARGET_DEVICES += tplink_vr2600v
define Device/ubnt_unifi-ac-hd
$(call Device/FitImageLzma)
DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi AC HD
SOC := qcom-ipq8064
BLOCKSIZE := 64k
IMAGE_SIZE := 14784k
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
endef
TARGET_DEVICES += ubnt_unifi-ac-hd
define Device/zyxel_nbg6817
DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := NBG6817
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
BLOCKSIZE := 64k
BOARD_NAME := nbg6817
RAS_BOARD := NBG6817
RAS_ROOTFS_SIZE := 20934k
RAS_VERSION := "V1.99(OWRT.9999)C0"
SUPPORTED_DEVICES += nbg6817
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
$(call Device/ZyXELImage)
endef
TARGET_DEVICES += zyxel_nbg6817
$(eval $(call BuildImage))