elsterkrug
Neuer User
- Mitglied seit
- 23 Mrz 2014
- Beiträge
- 64
- Punkte für Reaktionen
- 1
- Punkte
- 8
nur die richtige Kombination von "FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n" und "FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEM E=y" würde wohl im Moment ein gültiges Image erzeugen
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]cp -p .config .config._save_[/COLOR]
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]sed -i 's/.* FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .*/FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n/' .config[/COLOR]
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]sed -i 's/.* FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .*/FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y/' .config[/COLOR]
Kontrolle:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]grep FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .config[/COLOR]
FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]grep FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .config[/COLOR]
FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y
freetz@freetz-vm:~/freetz-trunk$
dann paßt der Name der Variablen mit dem "ext2" nicht mehr so ganz richtig ... und das sind dann umfangreichere Änderungen
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]cp -p fwmod fwmod._save_[/COLOR]
Download Patch [URL]http://www.FastShare.org/download/fwmod.p.tch[/URL] und als Datei [COLOR=#0000ff]fwmod.patch[/COLOR] speichern;
Kontrolle:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]cat fwmod.patch[/COLOR]
--- fwmod 2016-03-28 15:47:45.000000000 +0200
+++ fwmod 2016-05-14 16:32:46.362848601 +0200
@@ -237,7 +237,7 @@
fi
MKSQUASHFS_OPTIONS+=" -no-progress -no-exports -no-sparse"
- if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" != "y" ]; then
+ if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE[B][COLOR=#dda0dd]_RH1[/COLOR][/B]}" [B][COLOR=#ee82ee]=[/COLOR][/B]= "y" ]; then
MKSQUASHFS_OPTIONS+=" -lzma1"
fi
fi
@@ -339,7 +339,7 @@
RAW_KERNEL="${KERNEL_DIR}/${RAW_KERNEL_FILE}"
RAW_FILESYSTEM="${KERNEL_DIR}/${RAW_HIDDEN_FILE}"
KERNEL="${FIRMWARE_DIR}/${KERNEL_IMAGE}"
-if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
+if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE[B][COLOR=#dda0dd]_RH1[/COLOR][/B]}" == "y" ]; then
FILESYSTEM="$FILESYSTEM_CORE_DIR/$FILESYSTEM_CORE_IMAGE"
else
FILESYSTEM="${RAW_FILESYSTEM}"
@@ -1481,7 +1481,7 @@
if [ ! -d "$MOD_DIR" ]; then
# Copy the unpacked directory
- cp -r "$ORG_DIR" "$MOD_DIR"
+ cp -r[B][COLOR=#dda0dd]p[/COLOR][/B] "$ORG_DIR" "$MOD_DIR"
fi
fi
@@ -1630,7 +1630,7 @@
if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
- if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME}" == "y" ]; then
+ if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME[B][COLOR=#dda0dd]_RH2[/COLOR][/B]}" == "y" ]; then
PATH="$TOOLS_DIR:$PATH" $TOOLS_DIR/mke2img -G 2 -R 0 -d "$FILESYSTEM_CORE_MOD_DIR" -o "$ABS_BASE_DIR/$RAW_FILESYSTEM_MOD.ext2" >> $MOD_DIR/filesystem.log 2>&1
[ $? -ne 0 -o ! -s "$RAW_FILESYSTEM_MOD.ext2" ] && error 1 "creation of ext2 image failed"
Patch installieren:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]patch -p0 < fwmod.patch[/COLOR]
patching file fwmod
Kontrolle:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]diff fwmod._save_ fwmod[/COLOR]
240c240
< if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" != "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
342c342
< if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
1484c1484
< cp -r "$ORG_DIR" "$MOD_DIR"
---
> cp -rp "$ORG_DIR" "$MOD_DIR"
1633c1633
< if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME}" == "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME_RH2}" == "y" ]; then
freetz@freetz-vm:~/freetz-trunk$
ggf. Staging-Area bereinigen:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]sudo rm -r unpacked_firmware[/COLOR]
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]sudo rm -r test_unpack_2 [/COLOR]
los geht's
Firmware-Image entpacken:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]./fwmod -u -d unpacked_firmware FRITZ.Box_Fon_WLAN_7360.124.06.50.image[/COLOR]
STEP 1: UNPACK
unpacking firmware image
Skipping 0 Bytes garbage...splitting kernel image
unpacking filesystem image
Filesystem on unpacked_firmware/original/kernel/kernelsquashfs.raw is xz compressed (4:0)
Parallel unsquashfs: Using 1 processor
2487 inodes (2993 blocks) to write
created 1915 files
created 172 directories
created 485 symlinks
created 87 devices
created 0 fifos
unpacking var.tar
done.
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
FINISHED
freetz@freetz-vm:~/freetz-trunk$
Debug.cfg reaktivieren:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]sed -i '/echo 1 > \/proc\/sys\/kernel\/panic_on_oops/ a\
if [ -z "$CPU_NR" ] || [ "$CPU_NR" = "1" ] ; then\
mknod /var/flash/debug.cfg c $tffs_major $((0x62))\
if ! /usr/bin/checkempty /var/flash/debug.cfg 2>/dev/null; then\
. /var/flash/debug.cfg\
fi\
fi' "unpacked_firmware/original/filesystem/etc/init.d/rc.tail.sh"[/COLOR]
freetz@freetz-vm:~/freetz-trunk$
Telnet-Daemon verfuegbar machen:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff][ -x unpacked_firmware/original/filesystem/usr/sbin/telnetd ] || ln -s ../../bin/busybox unpacked_firmware/original/filesystem/usr/sbin/telnetd[/COLOR]
freetz@freetz-vm:~/freetz-trunk$
Freetz-Firmware-Image packen:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]./fwmod -p -d unpacked_firmware FRITZ.Box_Fon_WLAN_7360.124.06.50.image[/COLOR]
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
STEP 3: PACK
WARNING: Modifications (STEP 2) and this step should never
ever be run with different configurations!
This can result in invalid images!!!
WARNING: firmware does not seem to be modified by the script
checking for left over Subversion directories
packing var.tar
creating filesystem image
SquashFS block size: 64 kB (65536 bytes)
merging kernel image
kernel image size: 17.7 MB, max 31.4 MB, free 13.6 MB (14308096 bytes)
Aproximately maximal time for the answering machine: 115 min, 31 sec (6931 sec)
packing unpacked_firmware/7360_v2_-.de_20160514-164838.image
image file size: 18.4 MB
done.
FINISHED
freetz@freetz-vm:~/freetz-trunk$
Prüfen, ob Image mit richtigem SquashFS-Type gepackt wurde:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]./fwmod -u -d test_unpack_2 unpacked_firmware/7360_v2*.image[/COLOR]
STEP 1: UNPACK
unpacking firmware image
Skipping 0 Bytes garbage...splitting kernel image
unpacking filesystem image
Filesystem on test_unpack_2/original/kernel/kernelsquashfs.raw is [COLOR=#00ff00]xz compressed (4:0)[/COLOR]
Parallel unsquashfs: Using 1 processor
2487 inodes (2993 blocks) to write
created 1915 files
created 172 directories
created 485 symlinks
created 87 devices
created 0 fifos
unpacking var.tar
done.
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
FINISHED
freetz@freetz-vm:~/freetz-trunk$
Prüfen, ob Telnetd-Reaktivierung erfolgreich eingepflegt ist:
freetz@freetz-vm:~/freetz-trunk$[COLOR=#0000ff] ls -la unpacked_firmware/original/filesystem/usr/sbin/telnetd[/COLOR]
[COLOR=#00ff00] lrwxrwxrwx 1 freetz freetz 17 Mai 14 17:13 unpacked_firmware/original/filesystem/usr/sbin/telnetd -> ../../bin/busybox[/COLOR]
freetz@freetz-vm:~/freetz-trunk$
Prüfen, ob debug.cfg-Reaktivierung erfolgreich eingepflegt ist:
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]grep debug.cfg unpacked_firmware/original/filesystem/etc/init.d/rc.tail.sh[/COLOR]
[COLOR=#00ff00]mknod /var/flash/debug.cfg c $tffs_major $((0x62))
if ! /usr/bin/checkempty /var/flash/debug.cfg 2>/dev/null; then
. /var/flash/debug.cfg[/COLOR]
freetz@freetz-vm:~/freetz-trunk$
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]ls -la unpacked_firmware/original/kernel/ test_unpack_2/original/kernel/[/COLOR]
test_unpack_2/original/kernel/:
insgesamt 18168
drwxr-xr-x 3 freetz freetz 4096 Mai 14 17:14 .
drwxr-xr-x 5 freetz freetz 4096 Mai 14 17:14 ..
-rw-r--r-- 1 freetz freetz 2505984 Mai 14 17:14 kernel.raw
-rw-r--r-- 1 freetz freetz 16084992 Mai 14 17:14 kernelsquashfs.raw
drwxr-xr-x 3 freetz freetz 4096 Mai 14 17:12 var.tar
unpacked_firmware/original/kernel/:
insgesamt 18176
drwxr-xr-x 3 freetz freetz 4096 Mai 14 17:12 .
drwxr-xr-x 5 freetz freetz 4096 Mai 14 17:12 ..
-rw-r--r-- 1 freetz freetz 2505984 Mai 14 17:12 kernel.raw
-rw-r--r-- 1 freetz freetz 16091024 Mai 14 17:12 kernelsquashfs.raw
drwxr-xr-x 3 freetz freetz 4096 Mai 14 17:12 var.tar
freetz@freetz-vm:~/freetz-trunk$
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]ls -la unpacked_firmware/original/firmware/var/install test_unpack_2/original/firmware/var/install[/COLOR]
-rwxr-x--- 1 freetz freetz 39356 Feb 25 10:46 test_unpack_2/original/firmware/var/install
-rwxr-x--- 1 freetz freetz 39356 Feb 25 10:46 unpacked_firmware/original/firmware/var/install
freetz@freetz-vm:~/freetz-trunk$
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]diff unpacked_firmware/original/firmware/var/install test_unpack_2/original/firmware/var/install[/COLOR]
freetz@freetz-vm:~/freetz-trunk$
frank@frank-ThinkPad-X121e:~$ cd freetz-trunk
frank@frank-ThinkPad-X121e:~/freetz-trunk$ cp -p .config .config._save_frank@frank-ThinkPad-X121e:~/freetz-trunk$ sed -i 's/.* FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .*/FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n/' .configfrank@frank-ThinkPad-X121e:~/freetz-trunk$ sed -i 's/.* FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .*/FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y/' .config
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff .config._FB7360v2_ .configdiff: .config._FB7360v2_: Datei oder Verzeichnis nicht gefunden
frank@frank-ThinkPad-X121e:~/freetz-trunk$
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff .config._save_ .config
frank@frank-ThinkPad-X121e:~/freetz-trunk$
frank@frank-ThinkPad-X121e:~/freetz-trunk$ cp -p .config .config._save_
frank@frank-ThinkPad-X121e:~/freetz-trunk$ sed -i 's/.* FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .*/FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n/' .config
frank@frank-ThinkPad-X121e:~/freetz-trunk$ sed -i 's/.* FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .*/FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y/' .config
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff .config._save_ .config
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff ._save_ .config
diff: ._save_: Datei oder Verzeichnis nicht gefunden
frank@frank-ThinkPad-X121e:~/freetz-trunk$
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]ls -la .config._save_ .config[/COLOR]
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]grep FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .config[/COLOR]
FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n
freetz@freetz-vm:~/freetz-trunk$ [COLOR=#0000ff]grep FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .config[/COLOR]
FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y
freetz@freetz-vm:~/freetz-trunk$
frank@frank-ThinkPad-X121e:~$ cd freetz-trunk
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ls -la .config._save_ .config
-rw-r--r-- 1 frank frank 63595 Mai 16 16:42 .config
-rw-r--r-- 1 frank frank 63595 Mai 16 16:40 .config._save_
frank@frank-ThinkPad-X121e:~/freetz-trunk$ grep FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE .config
FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE=n
frank@frank-ThinkPad-X121e:~/freetz-trunk$ grep FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME .config
FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME=y
frank@frank-ThinkPad-X121e:~/freetz-trunk$ cp -p fwmod fwmod._save_
frank@frank-ThinkPad-X121e:~/freetz-trunk$ cat fwmod.patch
--- fwmod._save_ 2016-03-28 15:47:45.000000000 +0200
+++ fwmod 2016-05-14 16:32:46.362848601 +0200
@@ -237,7 +237,7 @@
fi
MKSQUASHFS_OPTIONS+=" -no-progress -no-exports -no-sparse"
- if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" != "y" ]; then
+ if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
MKSQUASHFS_OPTIONS+=" -lzma1"
fi
fi
@@ -339,7 +339,7 @@
RAW_KERNEL="${KERNEL_DIR}/${RAW_KERNEL_FILE}"
RAW_FILESYSTEM="${KERNEL_DIR}/${RAW_HIDDEN_FILE}"
KERNEL="${FIRMWARE_DIR}/${KERNEL_IMAGE}"
-if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
+if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
FILESYSTEM="$FILESYSTEM_CORE_DIR/$FILESYSTEM_CORE_IMAGE"
else
FILESYSTEM="${RAW_FILESYSTEM}"
@@ -1481,7 +1481,7 @@
if [ ! -d "$MOD_DIR" ]; then
# Copy the unpacked directory
- cp -r "$ORG_DIR" "$MOD_DIR"
+ cp -rp "$ORG_DIR" "$MOD_DIR"
fi
fi
@@ -1630,7 +1630,7 @@
if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
- if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME}" == "y" ]; then
+ if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME_RH2}" == "y" ]; then
PATH="$TOOLS_DIR:$PATH" $TOOLS_DIR/mke2img -G 2 -R 0 -d "$FILESYSTEM_CORE_MOD_DIR" -o "$ABS_BASE_DIR/$RAW_FILESYSTEM_MOD.ext2" >> $MOD_DIR/filesystem.log 2>&1
[ $? -ne 0 -o ! -s "$RAW_FILESYSTEM_MOD.ext2" ] && error 1 "creation of ext2 image failed"
frank@frank-ThinkPad-X121e:~/freetz-trunk$ patch -p0 < fwmod.patch
patching file fwmod
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff fwmod._save_ fwmod
240c240
< if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" != "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
342c342
< if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE}" == "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_UPDATE_FILESYSTEM_IMAGE_RH1}" == "y" ]; then
1484c1484
< cp -r "$ORG_DIR" "$MOD_DIR"
---
> cp -rp "$ORG_DIR" "$MOD_DIR"
1633c1633
< if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME}" == "y" ]; then
---
> if [ "${FREETZ_AVM_HAS_EXT2_SQUASHFS4_PACKAGING_SCHEME_RH2}" == "y" ]; then
frank@frank-ThinkPad-X121e:~/freetz-trunk$ sudo rm -r unpacked_firmware
[sudo] password for frank:
frank@frank-ThinkPad-X121e:~/freetz-trunk$ sudo rm -r test_unpack_2
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ./fwmod -u -d unpacked_firmware FRITZ.Box_Fon_WLAN_7360.124.06.50.image
STEP 1: UNPACK
unpacking firmware image
Skipping 0 Bytes garbage...splitting kernel image
unpacking filesystem image
Filesystem on unpacked_firmware/original/kernel/kernelsquashfs.raw is xz compressed (4:0)
Parallel unsquashfs: Using 1 processor
2487 inodes (2993 blocks) to write
created 1915 files
created 172 directories
created 485 symlinks
created 87 devices
created 0 fifos
unpacking var.tar
done.
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
FINISHED
frank@frank-ThinkPad-X121e:~/freetz-trunk$ sed -i '/echo 1 > \/proc\/sys\/kernel\/panic_on_oops/ a\
> if [ -z "$CPU_NR" ] || [ "$CPU_NR" = "1" ] ; then\
> mknod /var/flash/debug.cfg c $tffs_major $((0x62))\
> if ! /usr/bin/checkempty /var/flash/debug.cfg 2>/dev/null; then\
> . /var/flash/debug.cfg\
> fi\
> fi' "unpacked_firmware/original/filesystem/etc/init.d/rc.tail.sh"
frank@frank-ThinkPad-X121e:~/freetz-trunk$ [ -x unpacked_firmware/original/filesystem/usr/sbin/telnetd ] || ln -s ../../bin/busybox unpacked_firmware/original/filesystem/usr/sbin/telnetd
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ./fwmod -p -d unpacked_firmware FRITZ.Box_Fon_WLAN_7360.124.06.50.image
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
STEP 3: PACK
WARNING: Modifications (STEP 2) and this step should never
ever be run with different configurations!
This can result in invalid images!!!
WARNING: firmware does not seem to be modified by the script
cp: »unpacked_firmware/original/filesystem/usr/sbin/telnetd“ kann nicht zum Lesen geöffnet werden: Zu viele Ebenen aus symbolischen Links
checking for left over Subversion directories
packing var.tar
creating filesystem image
SquashFS block size: 64 kB (65536 bytes)
merging kernel image
kernel image size: 17.7 MB, max 31.4 MB, free 13.6 MB (14308096 bytes)
Aproximately maximal time for the answering machine: 115 min, 31 sec (6931 sec)
packing unpacked_firmware/7360_v2_-.de_20160516-201359.image
image file size: 18.4 MB
done.
FINISHED
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ./fwmod -u -d test_unpack_2 unpacked_firmware/7360_v2*.image
STEP 1: UNPACK
unpacking firmware image
Skipping 0 Bytes garbage...splitting kernel image
unpacking filesystem image
Filesystem on test_unpack_2/original/kernel/kernelsquashfs.raw is xz compressed (4:0)
Parallel unsquashfs: Using 1 processor
2487 inodes (2993 blocks) to write
created 1915 files
created 172 directories
created 485 symlinks
created 87 devices
created 0 fifos
unpacking var.tar
done.
detected firmware 7360_de 124.06.50 rev32505 (25.02.2016 10:46:29)
FINISHED
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ls -la unpacked_firmware/original/filesystem/usr/sbin/telnetd
lrwxrwxrwx 1 frank frank 17 Mai 16 20:13 unpacked_firmware/original/filesystem/usr/sbin/telnetd -> ../../bin/busybox
frank@frank-ThinkPad-X121e:~/freetz-trunk$ grep debug.cfg unpacked_firmware/original/filesystem/etc/init.d/rc.tail.sh
mknod /var/flash/debug.cfg c $tffs_major $((0x62))
if ! /usr/bin/checkempty /var/flash/debug.cfg 2>/dev/null; then
. /var/flash/debug.cfg
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ls -la unpacked_firmware/original/kernel/ test_unpack_2/original/kernel/
test_unpack_2/original/kernel/:
insgesamt 18168
drwxr-xr-x 3 frank frank 4096 Mai 16 20:14 .
drwxr-xr-x 5 frank frank 4096 Mai 16 20:14 ..
-rw-r--r-- 1 frank frank 2505984 Mai 16 20:14 kernel.raw
-rw-r--r-- 1 frank frank 16084992 Mai 16 20:14 kernelsquashfs.raw
drwxr-xr-x 3 frank frank 4096 Mai 16 20:12 var.tar
unpacked_firmware/original/kernel/:
insgesamt 18176
drwxr-xr-x 3 frank frank 4096 Mai 16 20:12 .
drwxr-xr-x 5 frank frank 4096 Mai 16 20:12 ..
-rw-r--r-- 1 frank frank 2505984 Mai 16 20:12 kernel.raw
-rw-r--r-- 1 frank frank 16091024 Mai 16 20:12 kernelsquashfs.raw
drwxr-xr-x 3 frank frank 4096 Mai 16 20:12 var.tar
frank@frank-ThinkPad-X121e:~/freetz-trunk$ ls -la unpacked_firmware/original/firmware/var/install test_unpack_2/original/firmware/var/install
-rwxr-x--- 1 frank frank 39356 Feb 25 10:46 test_unpack_2/original/firmware/var/install
-rwxr-x--- 1 frank frank 39356 Feb 25 10:46 unpacked_firmware/original/firmware/var/install
frank@frank-ThinkPad-X121e:~/freetz-trunk$ diff unpacked_firmware/original/firmware/var/install test_unpack_2/original/firmware/var/install
frank@frank-ThinkPad-X121e:~/freetz-trunk$
Hallo elsterkrug,Ich habe jetzt alles so eingegeben und poste noch mal die Ausgaben zur Kontrolle. Beim letzten Befehl kam irgendwie keinerlei Rückmeldung?
freetz@freetz-vm:~/freetz-trunk$ tar tvpf unpacked_firmware._save_/7360_v2_-.de_20160516-201359.image
freetz@freetz-vm:~/freetz-trunk$
WLAN stoppen
# [COLOR=#0000ff]/init.d/rc.wlan stop[/COLOR]
Kontrollbefehle:
# [COLOR=#0000ff]df[/COLOR]
# [COLOR=#0000ff]mount[/COLOR]
# [COLOR=#0000ff]ls -la /var/media/ftp[/COLOR]
Ermitteln des absoluten Pfades zu Freetz-Datei:
# [COLOR=#0000ff]find /var/media/ftp -name 7360_v2_-.de_20160516-201359.image[/COLOR]
Im nachfolgenden wird vom Beispiel von Elsterkrug /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160514-164838.image ausgegangen, ander User müssen dies ggf. anpassen
# [COLOR=#0000ff]ls -la /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160516-201359.image[/COLOR]
-rwxrwxrwx 1 boxusr13 root 19296256 May 14 16:53 /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160514-164838.image
Tar-File auspacken:
# [COLOR=#0000ff]cd /[/COLOR]
# [COLOR=#0000ff]pwd[/COLOR]
/
# [COLOR=#0000ff]tar tvpf /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160514-164838.image[/COLOR]
drwxr-xr-x root/root 0 2016-05-14 16:47:52 ./
drwxr-x--- root/root 0 2016-02-25 10:46:58 ./var/
-r--r----- root/root 35208 2015-09-15 16:01:17 ./var/flash_update_2.6.28.ko
-r--r----- root/root 55992 2016-01-26 15:10:24 ./var/flash_update_3.10.ko
-rw-r----- root/root 128 2016-02-25 10:46:58 ./var/signature
-rwxr-x--- root/root 2795 2016-02-25 10:46:58 ./var/info.txt
-r-xr-x--- root/root 278552 2015-10-20 16:19:38 ./var/chksum
-rwxr-x--- root/root 39356 2016-02-25 10:46:58 ./var/install
drwxr-x--- root/root 0 2016-05-14 16:53:09 ./var/tmp/
-rw-r--r-- root/root 18590984 2016-05-14 16:53:10 ./var/tmp/kernel.image
-rw-r--r-- root/root 0 2016-05-14 16:53:09 ./var/tmp/filesystem.image
-r-xr-x--- root/root 283844 2015-10-20 16:19:38 ./var/regelex
# [COLOR=#0000ff]tar xvpf /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160514-164838.image[/COLOR]
./
./var/
./var/flash_update_2.6.28.ko
./var/flash_update_3.10.ko
./var/signature
./var/info.txt
./var/chksum
./var/install
./var/tmp/
./var/tmp/kernel.image
./var/tmp/filesystem.image
./var/regelex
#
Datei /var/post_install sichern:
# [COLOR=#0000ff]cp -p /var/post_install /var/post_install._save_[/COLOR]
Installationskript ausführen:
# [COLOR=#0000ff]sh -x /var/install[/COLOR]
Inhalt der Datei post_install anzeigen
# [COLOR=#0000ff]cat /var/post_install[/COLOR]
#! /bin/sh
echo $0: start
sleep 1
killall run_clock
[COLOR=#000000]if ps | grep -v grep | grep -q telefon ; then killall telefon ; fi[/COLOR][COLOR=#dda0dd]
if ps | grep -v grep | grep -q telnetd ; then killall telnetd ; fi
[/COLOR]echo skip deleting language from env
echo MODE=update > /dev/avm_power
echo "disable" > /dev/watchdog
echo still running:
ps
lsmod
sleep 1
# [COLOR=#0000ff]ls -la /var/post_install /var/post_install._save_[/COLOR]
-rwxrwxrwx 1 root root 325 May 21 12:49 /var/post_install
-rwxrwxrwx 1 root root 325 May 21 12:49 /var/post_install._save_
Anpassen der post_install Datei (Stoppen von telnetd verhindern)
# [COLOR=#0000ff]sed -i 's/^\(if ps .* killall telnetd \; fi\)$/# \1/' /var/post_install[/COLOR]
#
# [COLOR=#0000ff]ls -la /var/post_install /var/post_install._save_[/COLOR]
-rwxrwxrwx 1 root root 329 May 21 12:50 /var/post_install
-rwxrwxrwx 1 root root 325 May 21 12:49 /var/post_install._save_
#
# [COLOR=#0000ff]cat /var/post_install[/COLOR]
#! /bin/sh
echo $0: start
sleep 1
killall run_clock
[COLOR=#000000]if ps | grep -v grep | grep -q telefon ; then killall telefon ; fi
[/COLOR][COLOR=#00ff00]# if ps | grep -v grep | grep -q telnetd ; then killall telnetd ; fi
[/COLOR]echo skip deleting language from env
echo MODE=update > /dev/avm_power
echo "disable" > /dev/watchdog
echo still running:
ps
lsmod
sleep 1
#
Datei /var/post_install ausführen:
# [COLOR=#0000ff]sh -x /var/post_install[/COLOR]
+ echo /var/post_install: start
/var/post_install: start
+ sleep 1
+ killall run_clock
+ ps
+ + grep -q -v telefon grep
+ killall telefon
+ echo skip deleting language from env
skip deleting language from env
Datei /var/post_install zurücksichern:
# [COLOR=#0000ff]cp -p /var/post_install._save_ /var/post_install[/COLOR]
Nein, es geht natürlich auch von LINUX Rechner, Wichtig ist nur, dass der Consolen-Output vollständig erfasst und geposted wird.Über Putty einloggen heißt, ich muss es von einem Windows Rechner machen oder?
das ist ja super!Telnet ist bei mir schon aktiviert, weil ich ja den LCR aktuell draufhabe.
telnet fritz.box
Dies geht auch; hier sind dann aber die Pfad in Schritt 4 anzupassen.Ich habe allerdings einen USB Stick und eine Festplatte dran, kann das auch verwendet werden?
Alt:
# [COLOR=#0000ff]cd /; tar xvpf /var/media/ftp/7360_v2_-.de_20160514-164838.image
[/COLOR]Neu:
# [COLOR=#0000ff]find /var/media/ftp -name 7360_v2_-.de_20160516-201359.image[/COLOR]
# [COLOR=#0000ff]cd /; tar xvpf /var/media/ftp/ASMT-2115-01/7360_v2_-.de_20160514-164838.image
[/COLOR]
nach meinem Stand erlaubt die Fritzbox neuerdings 2 Anmelde-Methoden:Aber was heißt Fritz Box User admin, den habe ich nicht.
telnet fritz.box
Entering character mode
Escape character is '^]'.
Fritz!Box user: admin
password:
ermittle die aktuelle TTY
tty is "/dev/pts/1"
weitere telnet Verbindung aufgebaut
disable start/stop characters and flowcontrol
#