From 2b5cc5422e044418eb4761bc60e5a94fd4132169 Mon Sep 17 00:00:00 2001 From: Leon Maurice Adam Date: Sun, 3 May 2020 12:44:24 +0200 Subject: [PATCH] lantiq: add support for AVM FRITZ!Box 7430 Hardware: - SoC: Lantiq VRX 220 - CPU: 2x MIPS 34Kc 500 MHz - RAM: 128 MiB 250 MHz - Flash: 128 MiB NAND - Ethernet: Built-in Fast Ethernet switch, 4 ports used - Wifi: Atheros AR9381-AL1A b/g/n with 2 pcb/internal and 1 external antennas - USB: 1x USB 2.0 - DSL: Built-in A/VDSL2 modem - DECT: Dialog SC14441 - LEDs: 1 two-color, 4 one-color - Buttons: 1x DECT, 1x WIFI - Telephone connectors: 1 FXS port via TAE or RJ11 connector With the exception of FXS/DECT everything works (there are no drivers for AVM's FXS or DECT implementation), DSL is yet untested. Installation: Boot up the device and wait a few seconds. Run the eva_ramboot.py script in scripts/flashing/ to load the initramfs image on the device: $ ./scripts/flashing/eva_ramboot.py 192.168.178.1 If the script fails to reach the device, maybe try 169.254.120.1. Wait until booting is complete. You should now be able to reach your device under the default ip address 192.168.1.1. Before flashing, check if linux_fs_start is not set to 1 in the tffs partition: $ fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start If linux_fs_start is 1, you will need to reset it to 0, either by FTP, upgrading FritzOS or doing a recovery. Now you should be able to flash the device using sysupgrade. Signed-off-by: Leon Maurice Adam Acked-by: Aleksander Jan Bajkowski [drop BOARD_NAME, use wpad-basic-wolfssl, drop 4.19, drop dts-v1, remove model prefix from LED names] Signed-off-by: Adrian Schmutzler --- target/linux/lantiq/image/vr9.mk | 10 ++++++++++ .../lantiq/xrx200/base-files/etc/board.d/02_network | 10 ++++++++-- .../base-files/etc/hotplug.d/firmware/12-ath9k-eeprom | 3 ++- .../lantiq/xrx200/base-files/lib/upgrade/platform.sh | 1 + 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 167c57c7c4..9264985104 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -148,6 +148,16 @@ define Device/avm_fritz7412 endef TARGET_DEVICES += avm_fritz7412 +define Device/avm_fritz7430 + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7430 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic-wolfssl fritz-tffs-nand fritz-caldata +endef +TARGET_DEVICES += avm_fritz7430 + define Device/bt_homehub-v5a $(Device/NAND) DEVICE_VENDOR := British Telecom diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index fec03965c4..aca8bd8643 100755 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -43,6 +43,10 @@ lantiq_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" ;; + avm,fritz7430) + ucidef_add_switch "switch0" \ + "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" + ;; bt,homehub-v5a) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" @@ -84,7 +88,8 @@ lantiq_setup_dsl() avm,fritz3370-rev2-micron|\ avm,fritz7360sl|\ avm,fritz7362sl|\ - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) annex="b" ;; esac @@ -134,7 +139,8 @@ lantiq_setup_macs() lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)")) ;; - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) tffsdev=$(find_mtd_chardev "nand-tffs") lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o) wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o) diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index cb91237400..0027bc3966 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -142,7 +142,8 @@ case "$FIRMWARE" in avm,fritz7360sl) ath9k_eeprom_extract "urlader" 2437 0 ;; - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") ;; bt,homehub-v5a) diff --git a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh index dcd797c30d..0770052488 100755 --- a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh @@ -13,6 +13,7 @@ platform_do_upgrade() { avm,fritz3370-rev2-micron|\ avm,fritz7362sl|\ avm,fritz7412|\ + avm,fritz7430|\ bt,homehub-v5a|\ zyxel,p-2812hnu-f1|\ zyxel,p-2812hnu-f3)