[LEDE-DEV] Fritzbox 4040 notes
Ben Greear
greearb at candelatech.com
Tue Apr 24 18:05:09 PDT 2018
Hopefully this will save someone some time.
The serial port is next to the MXIC chip. It needs a TTL to USB converter.
Counting from the pin near the MXIC chip, as seen from the top, my addapter needed to be
connected as follows:
pin 0: Disconnected
pin 1: green lead (TX or RX, dunno which)
pin 2: white lead (TX or RX, dunno which)
pin 3: black (ground)
When updating the u-boot, I cloned the repo:
git at github.com:chunkeey/FritzBox-4040-UBOOT.git
The upload-tof4040.sh seems to want the fritzbox booted into it's
boot loader (not all the way into its OS).
And, the -4 option to ping and ftp doesn't work on Fedora 22.
Even once I removed the -4 options, the script does not work.
The upload script fails, but this below worked on an Ubuntu based
system:
greearb at odroid-b64:~/git/FritzBox-4040-UBOOT/fritz$ ftp -n 192.168.178.1
Connected to 192.168.178.1.
220 ADAM2 FTP Server ready
ftp> quote USER adam2
331 Password required for adam2
ftp> quote PASS adam2
230 User adam2 successfully logged in
ftp> quote MEDIA FLSH
200 Media set to MEDIA_FLASH
ftp> binary
200 Type set to BINARY
ftp> passive
Passive mode on.
ftp> quote PASV
227 Entering Passive Mode (192,168,178,1,12,0)
ftp> put uboot-fritz4040.bin mtd1
local: uboot-fritz4040.bin remote: mtd1
227 Entering Passive Mode (192,168,178,1,12,0)
150 Opening BINARY data connection
226 Transfer complete
524288 bytes sent in 1.96 secs (260.9572 kB/s)
ftp> quit
221 Thank you for using the FTP service on ADAM2
Reboot the fritzbox at this point, wait a bit, and the boot loader will launch tftpd
and wait for you to send it a file.
Compile your OpenWRT image...select the Fritzbox in menuconfig after
using this as your initial .config:
https://downloads.lede-project.org/snapshots/targets/ipq40xx/generic/config.seed
make -j8
# wait a while
Copy the .itb image to your tftp server directory and then load it from uboot on the fritzbox:
You probably need to run: setenv serverip [your-tftp-server-ip]
# Tell the fritzbox to boot over tftp:
(FRITZ4040) # tftpboot openwrt-ipq40xx-avm_fritzbox-4040-initramfs-fit-uImage.itb
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 up Speed :1000 Full duplex
eth0 PHY4 Down Speed :10 Half duplex
Using eth0 device
TFTP from server 192.168.1.234; our IP address is 192.168.1.1
Filename 'openwrt-ipq40xx-avm_fritzbox-4040-initramfs-fit-uImage.itb'.
Load address: 0x85000000
Loading: Got ARP REPLY, set eth addr (80:ee:73:36:fd:10)
#################################################################
#################################################################
#################################################################
#################################################################
###################################################
done
Bytes transferred = 4555248 (4581f0 hex)
NetBootFileXferSize= 004581f0
(FRITZ4040) # bootm 0x85000000
## Booting kernel from FIT Image at 85000000 ...
Log into OpenWRT on the Fritzbox, and copy over the sysupgrade image:
scp greearb at 192.168.1.234:git/lede-acrh13-ct/bin/targets/ipq40xx
/generic/openwrt-ipq40xx-avm_fritzbox-4040-squashfs-sysupgrade.bin /tmp/
And run it:
sysupgrade /tmp/openwrt-ipq40xx-avm_fritzbox-4040-squashfs-sysupgrade.bin
After this, it seems the system boots into uboot which then waits for TFTP transfer.
If I ctrl-C that, and then type 'bootm', it seems to boot.
I assume this should work automatically, but not sure how to make that happen
yet. Maybe I just need to wait a long time?
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Lede-dev
mailing list