Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more fritz devices and tftp #29

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8362bb7
add support for uboot devices
maurerle Apr 11, 2023
b21fa75
add shell fritz script
maurerle Apr 11, 2023
16b16a5
update filenames
maurerle Apr 12, 2023
c1c6765
Remove duplicate files
May 30, 2023
2612f43
Added verbosity in messages
May 30, 2023
4b189b3
add fritz tftp script
maurerle May 30, 2023
cad0e50
Implemented TFTP spec for serving files
Jun 7, 2023
b2ab45f
Implemented full flash capability for FB7530/FB7520
Jun 11, 2023
ef2a29b
minor fixes
Jun 12, 2023
2f1a9a2
Add FreeBSD as Posix compliant platform
JayBraker Jun 14, 2023
2a42aef
better flow control, fail early
maurerle Jun 16, 2023
11a48ab
various fixes for flashing a FB7530/7520
maurerle Jul 17, 2023
0523bcc
docs improvements
maurerle Jul 17, 2023
f8943a7
fixes for windows support
maurerle Jul 18, 2023
40263cc
check openssh major version correctly
maurerle Jul 18, 2023
7ed24a6
add docs about windows usage
maurerle Jul 18, 2023
56a9b4c
improve flow
maurerle Jul 30, 2023
9616a6b
create standalone version to stay compatible with old docs
maurerle Jul 30, 2023
441995f
minor fixes
maurerle Sep 27, 2023
7be5ce7
fix error when doing sysupgrade
maurerle Oct 27, 2023
8d2dded
catch ssh sysupgrade returncode
maurerle Oct 28, 2023
e11410c
add flash timing suggestion to readme
maurerle Oct 28, 2023
5a5ae46
add support for FB repeater 3000 and 1750e
maurerle Nov 2, 2023
07d0bef
adjust tftp flashing for serve_name
maurerle Nov 3, 2023
466bba7
uboot has different ftp size
maurerle Nov 3, 2023
355cba1
clarify what any key means
maurerle Nov 3, 2023
6457d29
update fritzflash script
maurerle Nov 10, 2023
cc82921
minor logging usability fixes
maurerle Nov 16, 2023
70887ea
add example commands for tested devices
maurerle Nov 16, 2023
f18e7fa
set device as not required
maurerle Nov 24, 2023
b1bb781
Clarify readme usage
maurerle Nov 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.bin
*.img
*.pyc
*.itb
*.img
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,60 @@ We recommend Freifunk-Communities to link to the following documentation instead
- [English](https://fritz-tools.readthedocs.io/en/latest/)
- [German](https://fritz-tools.readthedocs.io/de/latest/)

## Basic Usage:

Download the needed images for your device and put them beside this script.

Remember to eventually turn of NetworkManager or place a dumb switch in between so that the link stays up during repowering the FritzBox.
For the 7520 I had good experience plugging the device in, waiting until all LEDs are lit during boot, and start the script directly after this.

Using network autoconfiguration with privileges (uboot images must be in the same folder too):

```
wget https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/openwrt-ipq40xx-generic-avm_fritzbox-7530-initramfs-uImage.itb
wget $GLUON_URL_avm-fritz-box-7530-sysupgrade.bin
wget https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/u-boot-fritz7530/uboot-fritz7530.bin
sudo python3 fritzflash.py --dev eno2 --initramfs ./openwrt-ipq40xx-generic-avm_fritzbox-7530-initramfs-uImage.itb --sysupgrade ./gluon-ffac-v2022.1.14-1-avm-fritz-box-7530-sysupgrade.bin

sudo./fritzflash.py --dev eno2 --initramfs ./openwrt-22.03.0-ipq40xx-generic-avm_fritzrepeater-1200-initramfs-fit-uImage.itb --sysupgrade ./openwrt-22.03.3-ipq40xx-generic-avm_fritzrepeater-1200-squashfs-sysupgrade.bin
```

Using self configuration for other devices:

```
wget https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/openwrt-22.03.5-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
wget https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/openwrt-22.03.5-ipq40xx-generic-avm_fritzbox-4040-squashfs-sysupgrade.bin
sudo ip a a 192.168.178.2/24 dev eno2
./fritzflash.py --dev eno2 --sysupgrade ./openwrt-22.03.5-ipq40xx-generic-avm_fritzbox-4040-squashfs-sysupgrade.bin
```

## Installation Commands (Linux)

Make sure to replace `eno2` with the correct name of your ethernet adapter

Device | Install command
---|---
FB3000 | sudo python3 fritzflash.py --dev eno2 --initramfs ./openwrt-22.03.2-ipq40xx-generic-avm_fritzbox-7530-initramfs-fit-uImage.itb --sysupgrade ./gluon-ffac-v2023.1.0-4-avm-fritz-box-7530-sysupgrade.bin
FB7520 | sudo python3 fritzflash.py --dev eno2 --initramfs ./openwrt-22.03.2-ipq40xx-generic-avm_fritzbox-7530-initramfs-fit-uImage.itb --sysupgrade ./gluon-ffac-v2023.1.0-4-avm-fritz-box-7530-sysupgrade.bin
FB7530 | sudo python3 fritzflash.py --dev eno2 --initramfs ./openwrt-22.03.2-ipq40xx-generic-avm_fritzbox-7530-initramfs-fit-uImage.itb --sysupgrade ./gluon-ffac-v2023.1.0-4-avm-fritz-box-7530-sysupgrade.bin
FB1200 | sudo./fritzflash.py --dev eno2 --initramfs ./openwrt-22.03.0-ipq40xx-generic-avm_fritzrepeater-1200-initramfs-fit-uImage.itb --sysupgrade ./openwrt-22.03.3-ipq40xx-generic-avm_fritzrepeater-1200-squashfs-sysupgrade.bin
FB7362 SL | sudo ./fritzflash.py -dev eno2 --sysupgrade ./gluon-ffac-v2023.1.1-1-avm-fritz-box-7362-sl-sysupgrade.bin
FB7412 | sudo ./fritzflash.py -dev eno2 --sysupgrade ./gluon-ffac-v2023.1.1-1-avm-fritz-box-7412-sysupgrade.bin
FB7430 | sudo ./fritzflash.py -dev eno2 --sysupgrade ./gluon-ffac-v2023.1.1-1-avm-fritz-box-7430-sysupgrade.bin
FB7360 SL | sudo ./fritzflash.py -dev eno2
FR450e | sudo ./fritzflash.py -dev eno2
FR4040 | sudo ./fritzflash.py -dev eno2
FR4020 | sudo ./fritzflash.py -dev eno2
FR1750e | sudo ./fritzflash.py -dev eno2



## Windows Usage

1. disable Wifi
2. allow incoming port 69/UDP or disable Firewall
3. run script as administrator, so that it can change the current ip address and open Port 69/UDP
4. enable Firewall
5. enable Wifi again

For other devices than the 7520/7530/1200, less privileges are needed (no TFTP) if the initial ip address is set manually in the network adapter configs.
2 changes: 2 additions & 0 deletions docs/flashing/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ Gluon builds by default factory and sysupgrade images. AVM devices don't need sp

Exceptions apply for the FRITZ!Box 4040. This device needs a special bootloader-image for use with the flash-script. Flashing with a sysupgrade image won't work.

More exceptions are the FRITZ!Box 7520/7530 and FRITZ!Repeater 1200, which use a two step TFTP flashing procedure which includes an additional uboot image.

Loading