Step 1, untar original image
Use nice tool ./tools/dumpsquashfs to unpack box image
Step 3 split kernel from hidden squashfs
Step 4 unpack hidden squashfs
Step 5 Modification
Step 6 Modification
[7m
[27m
patching file etc/init.d/rc.voip
Hunk #1 succeeded at 4 with fuzz 1.
patche vpn nachladen in firmware
patche bftpd in firmware
patche nfs in firmware
patche dropbear in firmware
patche web interface international
patche web interface push
patching file usr/www/all/html/de/menus/menu2_system.html
patche web interface wds
patching file usr/www/all/html/de/menus/menu2_wlan.html
Hunk #1 succeeded at 37 with fuzz 1.
entferne einrichtungsassistent
installiere ipv6
patche erweitertes wget in firmware
patching file etc/init.d/rc.conf
Hunk #1 succeeded at 84 (offset -156 lines).
patching file etc/init.d/rc.S
Hunk #1 succeeded at 8 with fuzz 1.
Hunk #2 succeeded at 69 with fuzz 2.
Hunk #3 succeeded at 142 with fuzz 2.
Hunk #4 succeeded at 276 with fuzz 2 (offset 33 lines).
Step 7 Modification
mkdir 1.fritz.box_fon_wlan_7050.14.03.86.image
+ tar xf fritz.box_fon_wlan_7050.14.03.86.image -C 1.fritz.box_fon_wlan_7050.14.03.86.image
+ echo 'Step 1, untar original image'
+ '[' '!' -r 1.fritz.box_fon_wlan_7050.14.03.86.image/var/tmp/filesystem.image ']'
+ continue
+ '[' 1 -lt 5 -a 0 -lt 5 ']'
+ '[' 0 -ne 0 -a 1 -eq 0 ']'
+ let STEP=STEP+1
+ '[' 0 -ne 0 -a 2 -ne 0 ']'
+ case $STEP in
+ '[' -d 2.fritz.box_fon_wlan_7050.14.03.86.image/etc ']'
+ mkdir 2.fritz.box_fon_wlan_7050.14.03.86.image
+ FILESYSTEM=1.fritz.box_fon_wlan_7050.14.03.86.image/var/tmp/filesystem.image
+ '[' '!' -x ./tools/dumpsquashfs ']'
+ echo 'Use nice tool ./tools/dumpsquashfs to unpack box image'
+ ./tools/dumpsquashfs -x -C 2.fritz.box_fon_wlan_7050.14.03.86.image -f 1.fritz.box_fon_wlan_7050.14.03.86.image/var/tmp/filesystem.image
+ '[' '!' -r 2.fritz.box_fon_wlan_7050.14.03.86.image/var ']'
+ cd 2.fritz.box_fon_wlan_7050.14.03.86.image
+ chmod -R +w .
+ continue
+ '[' 2 -lt 5 -a 0 -lt 5 ']'
+ '[' 0 -ne 0 -a 2 -eq 0 ']'
+ let STEP=STEP+1
+ '[' 0 -ne 0 -a 3 -ne 0 ']'
+ case $STEP in
+ echo 'Step 3 split kernel from hidden squashfs'
+ rm -rf 3.fritz.box_fon_wlan_7050.14.03.86.image
+ mkdir 3.fritz.box_fon_wlan_7050.14.03.86.image
+ cd 3.fritz.box_fon_wlan_7050.14.03.86.image
+ ../tools/find-squashfs/find-squashfs ../1.fritz.box_fon_wlan_7050.14.03.86.image/var/tmp/kernel.image
The size of <../1.fritz.box_fon_wlan_7050.14.03.86.image/var/tmp/kernel.image> is 711432
Squashfs signature found at 572160
kernel.raw created
kernelsquashfs.raw created
+ '[' '!' -r 3.fritz.box_fon_wlan_7050.14.03.86.image/kernel.raw ']'
+ '[' '!' -r 3.fritz.box_fon_wlan_7050.14.03.86.image/kernelsquashfs.raw ']'
+ continue
+ '[' 3 -lt 5 -a 0 -lt 5 ']'
+ '[' 0 -ne 0 -a 3 -eq 0 ']'
+ let STEP=STEP+1
+ '[' 0 -ne 0 -a 4 -ne 0 ']'
+ case $STEP in
+ echo 'Step 4 unpack hidden squashfs'
+ '[' -d 4.fritz.box_fon_wlan_7050.14.03.86.image ']'
+ mkdir 4.fritz.box_fon_wlan_7050.14.03.86.image
+ mkdir 4.fritz.box_fon_wlan_7050.14.03.86.image/squashfs
+ mkdir 4.fritz.box_fon_wlan_7050.14.03.86.image/var.tar
+ ./tools/dumpsquashfs -x -C 4.fritz.box_fon_wlan_7050.14.03.86.image/squashfs -f 3.fritz.box_fon_wlan_7050.14.03.86.image/kernelsquashfs.raw
+ VARTAR=4.fritz.box_fon_wlan_7050.14.03.86.image/squashfs/var.tar
+ '[' '!' -r 4.fritz.box_fon_wlan_7050.14.03.86.image/squashfs/var.tar ']'
+ tar xf 4.fritz.box_fon_wlan_7050.14.03.86.image/squashfs/var.tar -C 4.fritz.box_fon_wlan_7050.14.03.86.image/var.tar
+ '[' 4 -lt 5 -a 0 -lt 5 ']'
+ '[' 0 -ne 0 -a 4 -eq 0 ']'
+ let STEP=STEP+1
+ '[' 0 -ne 0 -a 5 -ne 0 ']'
+ case $STEP in
+ '[' 5 -lt 5 -a 0 -lt 5 ']'
+ for STEP in 5 6 7
+ '[' 0 '!=' 0 -a 0 '!=' 5 ']'
+ MOD=fritzbox_mod.5
+ mod_find 'Modification Step 5' fritzbox_mod.5
+ TASK='Modification Step 5'
+ TOCHECK=fritzbox_mod.5
+ '[' '!' -r fritzbox_mod.5 ']'
+ echo 'Step 5 Modification'
+ mod_check fritzbox_mod.5
+ TOCHECK=fritzbox_mod.5
+ '[' '!' -r fritzbox_mod.5 ']'
+ TOCHECK=fritzbox_mod.5
+ bash -n fritzbox_mod.5
+ '[' 0 -ne 0 ']'
+ prepare_mod 5
+ STEP=5
+ '[' -d 5.mod.image ']'
+ mkdir 5.mod.image
+ case $STEP in
+ tar cf - -C 4.fritz.box_fon_wlan_7050.14.03.86.image .
+ tar xf - -C 5.mod.image
+ cp add_on/kernel 5.mod.image/kernel.raw
+ chmod -R +w 5.mod.image
+ cd 5.mod.image
+ mod_act fritzbox_mod.5
++ pwd
+ hereiam=/home/oliver/m4.27/5.mod.image
+ TODO=../fritzbox_mod.5
+ '[' '!' -r ../fritzbox_mod.5 ']'
+ trap 'echo got lost in ../fritzbox_mod.5' 0
+ . ../fritzbox_mod.5
++ cp -p var.tar/var/tmp/shadow var.tar/var/tmp/shadow.old
++ cp -p var.tar/var/tmp/passwd var.tar/var/tmp/passwd.old
++ awk -F: ' { OFS=":" ; $2="36d6NYYMch85U" ; print }' var.tar/var/tmp/shadow.old
++ awk -F: ' { OFS=":" ; $6="/var/tmp" ; print }' var.tar/var/tmp/passwd.old
++ rm -f var.tar/var/tmp/passwd.old var.tar/var/tmp/shadow.old
++ set +x
Achtung: Dein Boxtyp ist auf Fritz_Box_WLAN gesetzt !
Bitte bei Bedarf in ./fritzbox_mod.6 anpassen !
set FIRMWARE_SUBVERSION=m4.27