Re: [OpenWrt-Devel] [PATCH v2 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000

2019-03-10 Thread David Bauer
Hello Christian,

On 10.03.19 20:27, Christian Lamparter wrote:
> On Saturday, March 9, 2019 12:20:54 AM CET David Bauer wrote:
>> Hardware
>> 
>> CPU:   Qualcomm IPQ4019
>> RAM:   256M (NANYA NT5CC128M16JR-EK)
>> FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI)
>> ETH:   Qualcomm QCA8072
>> WiFi2: IPQ4019 2T2R 2SS b/g/n
>> WiFi5: IPQ4019 2T2R 2SS n/ac
>> WiFi5: QCA9984 4T4R 4SS n/ac
>> LED:- Connect green/blue/red
>> - Power green
>> BTN:   WPS/Connect
>> UART:  115200n8 3.3V
>>VCC - RX - TX - GND (Square is VCC)
>>
>> Installation
>> 
>> 1. Grab the uboot for the Device from the 'u-boot-fritz3000'
>>subdirectory. Place it in the same directory as the 'eva_ramboot.py'
>>script. It is located in the 'scripts/flashing' subdirectory of the
>>OpenWRT tree.
>>
>> 2. Assign yourself the IP address 192.168.178.10/24. Connect your
>>Computer to one of the boxes LAN ports.
>>
>> 3. Connect Power to the Box. As soon as the LAN port of your computer
>>shows link, load the U-Boot to the box using following command.
>>
>>> ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin
>>
>> 4. The U-Boot will now start. Now assign yourself the IP address
>>192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP
>>server root directory and rename it to 'FRITZ3000.bin'.
>>
>> 5. The Box will now boot OpenWRT from RAM. This can take up to two
>>minutes.
>>
>> 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using
>>scp. SSH into the Box and first write the Bootloader to both previous
>>kernel partitions.
>>
>>> mtd write /path/to/uboot-fritz3000.bin uboot0
>>> mtd write /path/to/uboot-fritz3000.bin uboot1
>>
>> 7. Remove the AVM filesystem partitions to make room for our kernel +
>>rootfs + overlayfs.
>>
>>> ubirmvol /dev/ubi0 --name=avm_filesys_0
>>> ubirmvol /dev/ubi0 --name=avm_filesys_1
>>
>> 8. Flash OpenWRT peristently using sysupgrade.
>>
>>> sysupgrade -n /path/to/openwrt-sysupgrade.bin
>>
>> Signed-off-by: David Bauer 
>> ---
>> diff --git a/target/linux/ipq40xx/image/Makefile 
>> b/target/linux/ipq40xx/image/Makefile
>> index 3a7ecf39eb..49ff71c6bc 100644
>> --- a/target/linux/ipq40xx/image/Makefile
>> +++ b/target/linux/ipq40xx/image/Makefile
>> @@ -130,6 +130,15 @@ define Device/avm_fritzbox-7530
>>  endef
>>  TARGET_DEVICES += avm_fritzbox-7530
>>  
>> +define Device/avm_fritzrepeater-3000
>> +$(call Device/FitImageLzma)
>> +DEVICE_DTS := qcom-ipq4019-fritzrepeater-3000
>> +DEVICE_TITLE := AVM Fritz!Repeater 3000
>> +DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata 
>> ipq-wifi-avm_fritzrepeater-3000
> The fritz-tffs-nand was just added to openwrt. 
> 
> 
> 
> Should I add it in place? (And for the 7530 as well?)

I will submit a follow-up patch regarding tis topic as it was merged
without this issue addressed. I have already prepared a patch for this,
but will test it tomorrow on all 3 affected devices (7530, 3000 and 7412).

Best wishes
David

> 
> Cheers,
> Christian
> 
> 
> 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000

2019-03-10 Thread Christian Lamparter
On Saturday, March 9, 2019 12:20:54 AM CET David Bauer wrote:
> Hardware
> 
> CPU:   Qualcomm IPQ4019
> RAM:   256M (NANYA NT5CC128M16JR-EK)
> FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI)
> ETH:   Qualcomm QCA8072
> WiFi2: IPQ4019 2T2R 2SS b/g/n
> WiFi5: IPQ4019 2T2R 2SS n/ac
> WiFi5: QCA9984 4T4R 4SS n/ac
> LED:- Connect green/blue/red
> - Power green
> BTN:   WPS/Connect
> UART:  115200n8 3.3V
>VCC - RX - TX - GND (Square is VCC)
> 
> Installation
> 
> 1. Grab the uboot for the Device from the 'u-boot-fritz3000'
>subdirectory. Place it in the same directory as the 'eva_ramboot.py'
>script. It is located in the 'scripts/flashing' subdirectory of the
>OpenWRT tree.
> 
> 2. Assign yourself the IP address 192.168.178.10/24. Connect your
>Computer to one of the boxes LAN ports.
> 
> 3. Connect Power to the Box. As soon as the LAN port of your computer
>shows link, load the U-Boot to the box using following command.
> 
>> ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin
> 
> 4. The U-Boot will now start. Now assign yourself the IP address
>192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP
>server root directory and rename it to 'FRITZ3000.bin'.
> 
> 5. The Box will now boot OpenWRT from RAM. This can take up to two
>minutes.
> 
> 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using
>scp. SSH into the Box and first write the Bootloader to both previous
>kernel partitions.
> 
>> mtd write /path/to/uboot-fritz3000.bin uboot0
>> mtd write /path/to/uboot-fritz3000.bin uboot1
> 
> 7. Remove the AVM filesystem partitions to make room for our kernel +
>rootfs + overlayfs.
> 
>> ubirmvol /dev/ubi0 --name=avm_filesys_0
>> ubirmvol /dev/ubi0 --name=avm_filesys_1
> 
> 8. Flash OpenWRT peristently using sysupgrade.
> 
>> sysupgrade -n /path/to/openwrt-sysupgrade.bin
> 
> Signed-off-by: David Bauer 
> ---
> diff --git a/target/linux/ipq40xx/image/Makefile 
> b/target/linux/ipq40xx/image/Makefile
> index 3a7ecf39eb..49ff71c6bc 100644
> --- a/target/linux/ipq40xx/image/Makefile
> +++ b/target/linux/ipq40xx/image/Makefile
> @@ -130,6 +130,15 @@ define Device/avm_fritzbox-7530
>  endef
>  TARGET_DEVICES += avm_fritzbox-7530
>  
> +define Device/avm_fritzrepeater-3000
> + $(call Device/FitImageLzma)
> + DEVICE_DTS := qcom-ipq4019-fritzrepeater-3000
> + DEVICE_TITLE := AVM Fritz!Repeater 3000
> + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata 
> ipq-wifi-avm_fritzrepeater-3000
The fritz-tffs-nand was just added to openwrt. 



Should I add it in place? (And for the 7530 as well?)

Cheers,
Christian




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000

2019-03-08 Thread David Bauer
Hardware

CPU:   Qualcomm IPQ4019
RAM:   256M (NANYA NT5CC128M16JR-EK)
FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI)
ETH:   Qualcomm QCA8072
WiFi2: IPQ4019 2T2R 2SS b/g/n
WiFi5: IPQ4019 2T2R 2SS n/ac
WiFi5: QCA9984 4T4R 4SS n/ac
LED:- Connect green/blue/red
- Power green
BTN:   WPS/Connect
UART:  115200n8 3.3V
   VCC - RX - TX - GND (Square is VCC)

Installation

1. Grab the uboot for the Device from the 'u-boot-fritz3000'
   subdirectory. Place it in the same directory as the 'eva_ramboot.py'
   script. It is located in the 'scripts/flashing' subdirectory of the
   OpenWRT tree.

2. Assign yourself the IP address 192.168.178.10/24. Connect your
   Computer to one of the boxes LAN ports.

3. Connect Power to the Box. As soon as the LAN port of your computer
   shows link, load the U-Boot to the box using following command.

   > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin

4. The U-Boot will now start. Now assign yourself the IP address
   192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP
   server root directory and rename it to 'FRITZ3000.bin'.

5. The Box will now boot OpenWRT from RAM. This can take up to two
   minutes.

6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using
   scp. SSH into the Box and first write the Bootloader to both previous
   kernel partitions.

   > mtd write /path/to/uboot-fritz3000.bin uboot0
   > mtd write /path/to/uboot-fritz3000.bin uboot1

7. Remove the AVM filesystem partitions to make room for our kernel +
   rootfs + overlayfs.

   > ubirmvol /dev/ubi0 --name=avm_filesys_0
   > ubirmvol /dev/ubi0 --name=avm_filesys_1

8. Flash OpenWRT peristently using sysupgrade.

   > sysupgrade -n /path/to/openwrt-sysupgrade.bin

Signed-off-by: David Bauer 
---
v2:
 - remove cs-gpio property from nand node
 - add device-specific BDF package
 - add RAM and NAND chip model information

 package/boot/uboot-fritz4040/Makefile |   7 +-
 package/firmware/ipq-wifi/Makefile|   3 +-
 .../ipq-wifi/board-avm_fritzrepeater-3000.bin | Bin 0 -> 24332 bytes
 .../ipq40xx/base-files/etc/board.d/02_network |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |  10 +-
 .../base-files/lib/upgrade/platform.sh|   1 +
 .../dts/qcom-ipq4019-fritzrepeater-3000.dts   | 260 +
 .../dts/qcom-ipq4019-fritzrepeater-3000.dts   | 264 ++
 target/linux/ipq40xx/image/Makefile   |   9 +
 .../901-arm-boot-add-dts-files.patch  |   3 +-
 .../901-arm-boot-add-dts-files.patch  |   3 +-
 11 files changed, 555 insertions(+), 6 deletions(-)
 create mode 100644 package/firmware/ipq-wifi/board-avm_fritzrepeater-3000.bin
 create mode 100644 
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
 create mode 100644 
target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts

diff --git a/package/boot/uboot-fritz4040/Makefile 
b/package/boot/uboot-fritz4040/Makefile
index 3182842c89..015ca1deb9 100644
--- a/package/boot/uboot-fritz4040/Makefile
+++ b/package/boot/uboot-fritz4040/Makefile
@@ -25,6 +25,11 @@ define U-Boot/Default
   UBOOT_IMAGE:=uboot-$(1).bin
 endef
 
+define U-Boot/fritz3000
+  NAME:=FritzRepeater 3000
+  BUILD_DEVICES:=avm_fritzrepeater-3000
+endef
+
 define U-Boot/fritz4040
   NAME:=FritzBox 4040
   BUILD_DEVICES:=avm_fritzbox-4040
@@ -61,6 +66,6 @@ define Package/u-boot/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
 endef
 
-UBOOT_TARGETS := fritz4040 fritz7530
+UBOOT_TARGETS := fritz3000 fritz4040 fritz7530
 
 $(eval $(call BuildPackage/U-Boot))
diff --git a/package/firmware/ipq-wifi/Makefile 
b/package/firmware/ipq-wifi/Makefile
index 9a00832ca2..d273667f68 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -18,7 +18,7 @@ endef
 # Please send a mail with your device-specific board files upstream.
 # You can find instructions and examples on the linux-wireless wiki:
 # 
-ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 
engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac
+ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 
avm_fritzrepeater-3000 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac
 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
 
 define Package/ipq-wifi-default
@@ -57,6 +57,7 @@ $(eval $(call 
generate-ipq-wifi-package,alfa-network_ap120c-ac,board-alfa-networ
 $(eval $(call 
generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200))
 $(eval $(call 
generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius 
EAP1300))
 $(eval $(call 
generate-ipq-wifi-package,avm_fritzbox-7530,board-avm_fritzbox-7530.bin,AVM 
FRITZ!Box 7530))
+$(eval $(call