aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/image
diff options
context:
space:
mode:
authorFredrik Olofsson <fredrik.olofsson@anyfinetworks.com>2019-09-10 11:25:53 +0200
committerChristian Lamparter <chunkeey@gmail.com>2020-01-26 01:20:45 +0100
commit52b8c7a8928ccdc80436c76955f237960ea3bf1f (patch)
tree24a4bd67fd44b5c316fb05aad8aa7870ea39d76b /target/linux/ipq40xx/image
parentb77ce0c7209ee26aed271f894ac1580dce45db0c (diff)
downloadupstream-52b8c7a8928ccdc80436c76955f237960ea3bf1f.tar.gz
upstream-52b8c7a8928ccdc80436c76955f237960ea3bf1f.tar.bz2
upstream-52b8c7a8928ccdc80436c76955f237960ea3bf1f.zip
ipq40xx: Add support for D-Link DAP-2610
Specifications ============== - SOC: IPQ4018 - RAM: DDR3 256MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: IPQ4018, 2x2, front end SKY85303-11 - 5GHz: IPQ4018, 2x2, front end SKY85717-21 - Ethernet: 1x 10/100/1000Mbps, POE 802.3af - PHY: QCA8072 - UART: GND, blocked, 3.3V, RX, TX / 115200 8N1 - LED: 1x red / green - Button: 1x reset / factory default - U-Boot bootloader with tftp and "emergency web server" accessible using serial port. Installation ============ Flash factory image from D-Link web UI. Constraints in the D-Link web UI makes the factory image unnecessarily large. Flash again using sysupgrade from inside OpenWrt to reclaim some flash space. Return to stock D-Link firmware =============================== Partition layout is preserved, and it is possible to return to the stock firmware simply by downloading it from D-Link and writing it to the firmware partition. # mtd -r write dap2610-firmware.bin firmware Quirks ====== To be flashable from the D-Link http server, the firmware must be larger then 6MB, and the size in the firmware header must match the actual file size. Also, the boot loader verifies the checksum of the firmware before each boot, thus the jffs2 must be after the checksum covered part. This is solved in the factory image by having the rootfs at the very end of the image (without pad-rootfs). The sysupgrade image which does not have to be flashable from the D-Link web UI may be smaller, and the checksum in the firmware header only covers the kernel part of the image. Signed-off-by: Fredrik Olofsson <fredrik.olofsson@anyfinetworks.com> [added WRGG Variables to DEVICE_VARS, squashed spi pinconf/mux, added emd1's gmac0 config,fix dtc warnings] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/ipq40xx/image')
-rw-r--r--target/linux/ipq40xx/image/Makefile39
1 files changed, 38 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 588a24c2fe..41a65280c3 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -1,7 +1,8 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
+DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION \
+ WRGG_DEVNAME WRGG_SIGNATURE
define Device/Default
PROFILES := Default
@@ -61,6 +62,15 @@ define Build/SenaoFW
@cp $@.new $@
endef
+define Build/wrgg-image
+ mkwrggimg -i $@ \
+ -o $@.new \
+ -d "$(WRGG_DEVNAME)" \
+ -s "$(WRGG_SIGNATURE)" \
+ -v "" -m "" -B ""
+ mv $@.new $@
+endef
+
define Device/8dev_jalapeno-common
$(call Device/FitImage)
$(call Device/UbiFit)
@@ -227,6 +237,33 @@ define Device/compex_wpj428
endef
TARGET_DEVICES += compex_wpj428
+define Device/dlink_dap-2610
+ $(call Device/FitImageLzma)
+ DEVICE_VENDOR := D-Link
+ DEVICE_MODEL := DAP-2610
+ SOC := qcom-ipq4018
+ DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
+ BLOCKSIZE := 64k
+ WRGG_DEVNAME := /dev/mtdblock/8
+ WRGG_SIGNATURE := wapac30_dkbs_dap2610
+ IMAGE_SIZE := 14080k
+ IMAGES := sysupgrade.bin factory.bin
+ # Bootloader expects a special 160 byte header which is added by
+ # wrgg-image.
+ # Factory image size must be larger than 6MB, and size in wrgg header must
+ # match actual factory image size to be flashable from D-Link http server.
+ # Bootloader verifies checksum of wrgg image before booting, thus jffs2
+ # cannot be part of the wrgg image. This is solved in the factory image by
+ # having the rootfs at the end of the image (without pad-rootfs). And in
+ # the sysupgrade image only the kernel is included in the wrgg checksum,
+ # but this is not flashable from the D-link http server.
+ # append-rootfs must start on an erase block boundary.
+ IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size $$$$(IMAGE_SIZE)
+ IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | append-metadata
+ DEVICE_PACKAGES := ipq-wifi-dlink_dap2610
+endef
+TARGET_DEVICES += dlink_dap-2610
+
define Device/engenius_eap1300
$(call Device/FitImage)
DEVICE_VENDOR := EnGenius