gluon/patches/lede/0083-build-move-lzma2eva-build-step-to-image-commands.mk.patch
David Bauer 22d45448fd ar71xx: add support for Fritz!Box 4020
This commit adds support for the AVM Fritz!Box 4020 WiFi-router.

SoC:   Qualcomm Atheros QCA9561 (Dragonfly) 750MHz
RAM:   Winbond W971GG6KB-25
FLASH: Macronix MX25L12835F
WiFi:  QCA9561 b/g/n 3x3 450Mbit/s
USB:   1x USB 2.0
IN:    WPS button, WiFi button
OUT:   Power LED green, Internet LED green, WLAN LED green,
       LAN LED green, INFO LED green, INFO LED red
UART:  Header Next to Black metal shield
       Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
       The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet (LAN + WAN)
 - WiFi (correct MAC)
 - Installation via EVA bootloader
 - OpenWRT sysupgrade
 - Buttons
 - LEDs

Not working:
 - USB port

Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded
like following:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote MEDIA FLSH
  ftp> put openwrt-sysupgrade.bin mtd1

Note that this procedure might take up to two minutes. After transfer is
complete you need to powercycle the device to boot OpenWRT.

Signed-off-by: David Bauer <mail@david-bauer.net>
2018-05-08 15:20:02 +02:00

51 lines
1.6 KiB
Diff

From: Mathias Kresin <dev@kresin.me>
Date: Sat, 25 Mar 2017 19:18:37 +0100
Subject: build: move lzma2eva build step to image-commands.mk
Move it to image-commands.mk so that it can used by other targets with
eva based boards as well.
Signed-off-by: Mathias Kresin <dev@kresin.me>
diff --git a/include/image-commands.mk b/include/image-commands.mk
index ec35e0fcfe97d9d98c731459d1f1681d2bcfe5ad..19d98feefe02b6deb43735ccd436aac39fc0a8ab 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -11,6 +11,11 @@ define Build/uImage
mv $@.new $@
endef
+define Build/eva-image
+ $(STAGING_DIR_HOST)/bin/lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
+ mv $@.new $@
+endef
+
define Build/netgear-chk
$(STAGING_DIR_HOST)/bin/mkchkimg \
-o $@.new \
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index a96e528aab2c5c5c95f01b087f589cecc57c6e51..2cac925bfd95fedd5f76f30e72300cc0fd7d37a9 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -20,9 +20,8 @@ else
UBIFS_OPTS := -m 2048 -e 126KiB -c 4096
endif
-define Build/eva-image
- lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
- ( dd if=$@.new bs=64k conv=sync; cat ./eva.dummy.squashfs; ) > $@
+define Build/append-avm-fakeroot
+ cat ./eva.dummy.squashfs >> $@
endef
define Build/dgn3500-sercom-footer
@@ -104,6 +103,8 @@ endef
define Device/AVM
KERNEL := kernel-bin | append-dtb | lzma | eva-image
+ IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \
+ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
endef
ifeq ($(SUBTARGET),xway_legacy)