OK, got some info from this file (from #73):
- HWRevision 205
- HWSubrevision 2
- FRITZ!OS version (for this support data file) 07.01
-
/dev/debug
output starts too late
Code:
##### BEGIN SECTION debug Kernel output
/dev/debug
----------
[ 0.084800] devtmpfs: initialized
[ 0.089088] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.098920] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.105712] NET: Registered protocol family 16
, even if it shows the same message regarding
mtdsplit
:
Code:
[ 0.932758] Creating 6 MTD partitions on "ath-nor":
[ 0.937694] 0x000000198200-0x000000f00000 : "rootfs"
[ 0.943757] mtd: device 0 (rootfs) set to be root filesystem
[ 0.949481] mtdsplit: no squashfs found in "rootfs"
[ 0.954369] 0x000000020000-0x000000198200 : "kernel"
[ 0.960358] 0x000000000000-0x000000020000 : "urlader"
[ 0.966404] 0x000000f00000-0x000000f80000 : "tffs (1)"
[ 0.972532] 0x000000f80000-0x000001000000 : "tffs (2)"
[ 0.978637] 0x000000000000-0x000001000000 : "reserved-kernel"
[ 0.985416] Atheros on-chip NAND FLash Controller Driver, Version 1.0 (c) 2014 AVM GmbH, 2010 Atheros Communications, Ltd.
-
dmesg
output of the very first lines was overwritten already:
Code:
##### BEGIN SECTION dmesg
[ 29.259455] ol_vdev_start_resp_ev for vap 0 (83d06000)
[ 29.259471] ol_if_dfs_configure: called
[ 29.259473] ol_if_dfs_configure: ETSI domain
[ 29.259477] ol_if_dfs_disable: called
[ 29.259767] ol_if_dfs_enable: called
[ 29.259781] [SM] vap-0(ath1):ieee80211_state_event: VAP state event 1, cur_state=10, vap_deleted_is_set=0
- suddenly it turns out, that the DVB-C model uses a NMI vector gap, we didn't notice yet and (therefore) we didn't take into account yet:
Code:
[ 0.330062] no support for hwid 205
[ 0.333511] [avmnet] [avmnet_cfg_init] Driver version: 6.299-maca_jz52433Wed Oct 31 11:51:39 CET 2018
[ 0.343050] [find_nmi_vector] nmi vector found. Firmware length 0xbcef5e bytes (erase block align 0xbd0000) vector gap size 0x1000 bytes.
[ 0.355498] [find_nmi_vector] add 'urlader' size 0x20000 to length
[ 0.361736] [ath_flash] NMI GAP start=0x00c00000 size=0x00001000 end=0x00bf0000
- looking at the 1750E image for 07.27, it exists for this model, too:
Rich (BBCode):
vidar:/tmp/YourFritz $ unsquashfs4-avm -s -k kernel_1750E_07.27.image
Found a valid superblock at offset 0x0017E500 while scanning kernel_1750E_07.27.image.
NMI vector found at 0x00BE0000, size=4096
#
# It took the --scan option (-k for short) to reveal this vector ... this is from an older patch of mine for the squashfs-tools package.
#
Found TI checksum (0xD015B9E2) at the end of the image.
Found a valid big endian SQUASHFS 4:0 superblock on kernel_1750E_07.27.image.
Creation or last append time is not available because of modified AVM-format (mkfs_time == bytes_used)
Filesystem size 12666.28 Kbytes (12.37 Mbytes)
Compression xz
Block size 65536
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always-use-fragments option is not specified
Xattrs are not stored
Duplicates are removed
Number of fragments 157
Number of inodes 3611
Number of ids 1
- as a result, we have to copy this area, too, and we have to take its size into account, while creating a new image - that's possibly the origin of problems, when kernel size changes and the NMI vector gap gets moved
Please don't get me wrong - even if those info may be extracted from the attached support data, I would like to insist on something - I want to get a "complete" boot log (starting with the very first line) and this in one continuous file (without other garbage). It makes it simpler to find the right places while switching between different logs ... if you have to gather it up from different places, it gets annoying rapidly.
Addendum: Meanwhile (it takes some time to present any commands run, esp. with some color as eye-catcher) your file for 1750E firmware version 07.27 (with a HWRevision mismatch) arrived - this reduces the open requests to a DVB-C 07.08 boot log (it could be nearer to the 07.27 firmware, even if it looks like all versions use the same Linux kernel 4.4.60) and a 07.27 log with a HWRevision value set to 205.
It doesn't mean, that other info from support data is useless ... but it's easier to read or to handle, when it gets dismantled first. Because that's true for other/further readers, too, it's better to do this for the attachments to a post already. Keep the complete file elsehow - but please add (at least one) more (only) with the requested info.
I would wait now for the answer (or some tries) regarding the persistently changed HWRevision value ... and its consequences.
Meanwhile the
avmnet
initialization seems really to be the next problem ... the mount process runs in parallel or immediately after this initialization:
Rich (BBCode):
[ 1.171548] {avmnet_cfg_netinit}
[ 1.174745] [avmnet] No config found for HWRev 205, HWSubRev 2, Profile-ID 0, trying base config for HWSubRev
[ 1.184793] [avmnet] No config found for HWRev 205, HWSubRev 2, trying base config for HWRev
[ 2.619859] [avmnet] [avmnet_ar8033_powerdown] Called for module ar8033
[ 2.626545] [avmnet_set_macaddr] Setup Mac Addr for Device(eth0): 5c:49:79:4f:a8:8e
[ 2.639164] VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
[ 2.651016] devtmpfs: mounted
[ 2.655371] Freeing unused kernel memory: 268K (804cd000 - 80510000)
[ 3.318467] [TFFS_Cache] Allocate segement buffer cache (size=32784)
[ 3.325502] TFFS Name Table M
But it looks like, whether the two green lines are "normal" even with the proper firmware for the DVB-C repeater - it seems to be a fallback mechanism, which's intervening here, and the next question would be, why/whether it may find the hardware with the 1750E configuration, but not with the patched FDT for the DVB-C repeater. Maybe we've to look further into the FDT data ... but firstly we should solve the problem with any changes to the filesystem image. It has to be possible, to get shell access via telnet protocol - this should be one of the importants tasks at the moment.
This leads us back to the other problem ... some MIPS devices by AVM (the affected models are part of it) are using a 1:1 flash mapping during boot - either from a hardware mapping of addresses to a used NOR flash memory or for a SPI chip (your repeater uses 16 MB of this flash memory), which got its content copied to RAM before it gets called.
To handle NMI (non-maskable interrupt) exceptions from the very early initialization of a MIPS processor (which was done by EVA already, but is repeated by kernel again), a special address (0xBFC0000) is used to get "vectors" (they're simply addresses of code to branch to, depending on the condition, that has thrown the exception) for exception handling. This area gets relocated later (by loading a special register with the right address) and I'm not really sure, whether it's necessary for these models either - it's moreover a special case for those devices, where the kernel and filesystem image are stored as a continuous data stream in flash memory (means: models with a combined firmware image).
Both models have only a RAM size of 16 MB (0x01000000) and the vectors are looked up at 0x3FC00000 (after the "access type" flags from the upper two bits have been masked out) - that's far behind the available memory and it would only matter, if AVM wouldn't use/connect of some (upper) address lines ... and an access attempt on 0x3FC00000 therefore gets mapped to
0x00C00000 0x03C00000 (edited: the device has 64 MB of RAM).
But let's assume, it does matter really (even if Freetz images are built without it either, as far as I know/remember) ... the repeater models are unique here, too, because their NMI vector gap is (usually) located behind the whole SquashFS image - simply due to their limited flash memory size. If we take the firmware partition offset from flash (0x20000, after the urlader part) into account, a NMI vector gap will be found at offset 0x00C00000 - 0x00020000 = 0x00BE0000 of a (complete) firmware image and the NMI vector table (it has a size of 4K for these models) may be located in-between the SquashFS image data (and has to be skipped while accessing data from filesystem) or after the firmware image, if the sum of (packed) kernel size and the size of our filesystem image is below this value (it's 12.451.840 in decimal). Here it's obviously in the middle of filesystem data and we don't need to append it after padding to 0xBE0000 size.
Let's have a look at the original file from AVM's firmware version 07.27 for 1750E:
Rich (BBCode):
peh@vidar:/tmp/YourFritz> hexdump -C -s $(( 0xBE0000 - 64 )) -n $(( 4096 + 128 )) kernel_1750E_07.27.image
00bdffc0 2b 0d 9a f4 ea 2e 8c db 4a d2 aa 8d 71 46 ac ef |+.......J...qF..|
00bdffd0 25 40 33 48 91 f5 19 26 14 f4 c4 85 db a9 40 62 |%@3H...&......@b|
00bdffe0 fb 02 5d e3 7a 61 7f b5 ab cf 92 7d 2b bc 1c db |..].za.....}+...|
00bdfff0 6c c0 0f f6 57 1d dd 05 ac 12 7c 15 45 a8 6d 8f |l...W.....|.E.m.|
00be0000 40 9a e8 05 40 9b e0 04 3c 1a 80 00 37 5a 03 80 |@...@...<...7Z..|
00be0010 8f 5b 00 0c 3b 7b de ad 14 1b 00 19 00 00 00 00 |.[..;{..........|
00be0020 40 1b e0 04 03 40 00 08 00 00 00 00 00 00 00 00 |@....@..........|
00be0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00be0040 00 dd d5 00 00 00 10 00 4e 4d 49 20 42 6f 6f 74 |........NMI Boot|
00be0050 20 56 65 63 74 6f 72 00 00 00 00 00 00 00 00 00 | Vector.........|
00be0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be0080 3c 1a b8 06 8f 5b 00 08 33 7b 00 03 24 1a 00 02 |<....[..3{..$...|
00be0090 13 7a 00 03 00 00 00 00 10 00 00 0c 00 00 00 00 |.z..............|
00be00a0 3c 1b 10 00 3c 1a b8 06 af 5b 00 0c 00 00 00 0f |<...<....[......|
00be00b0 8f 5b 00 0c 13 60 ff fa 24 1b 00 03 af 5b 00 08 |.[...`..$....[..|
00be00c0 00 00 00 0f 10 00 00 f2 00 00 00 00 3c 1a 80 00 |............<...|
00be00d0 37 5a 03 80 8f 5b 00 0c 3b 7b de ad 14 1b 00 02 |7Z...[..;{......|
00be00e0 00 00 00 00 27 5a 00 10 40 1b e0 04 03 40 00 08 |....'Z..@....@..|
00be00f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be0200 40 9a e8 05 40 9b e0 04 10 00 ff 9d 00 00 00 00 |@...@...........|
00be0210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be0380 40 9a e8 05 40 9b e0 04 10 00 ff 3d 00 00 00 00 |@...@......=....|
00be0390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be0400 40 9a e8 05 40 9b e0 04 10 00 ff 1d 00 00 00 00 |@...@...........|
00be0410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be0480 40 9a e8 05 40 9b e0 04 10 00 fe fd 00 00 00 00 |@...@...........|
00be0490 3c 1a bd 00 37 5a 05 00 27 5a 00 0c af 41 00 00 |<...7Z..'Z...A..|
00be04a0 af 42 00 04 af 43 00 08 af 44 00 0c af 45 00 10 |.B...C...D...E..|
00be04b0 af 46 00 14 af 47 00 18 af 48 00 1c af 49 00 20 |.F...G...H...I. |
00be04c0 af 4a 00 24 af 4b 00 28 af 4c 00 2c af 4d 00 30 |.J.$.K.(.L.,.M.0|
00be04d0 af 4e 00 34 af 4f 00 38 af 50 00 3c af 51 00 40 |.N.4.O.8.P.<.Q.@|
00be04e0 af 52 00 44 af 53 00 48 af 54 00 4c af 55 00 50 |.R.D.S.H.T.L.U.P|
00be04f0 af 56 00 54 af 57 00 58 af 58 00 5c af 59 00 60 |.V.T.W.X.X.\.Y.`|
00be0500 40 1b e8 05 af 5b 00 64 40 1b e0 04 af 5b 00 68 |@....[.d@....[.h|
00be0510 af 5c 00 6c af 5d 00 70 af 5e 00 74 af 5f 00 78 |.\.l.].p.^.t._.x|
00be0520 40 1b 60 00 af 5b 00 7c 40 1b 68 00 af 5b 00 80 |@.`..[.|@.h..[..|
00be0530 40 1b 70 00 af 5b 00 84 40 1b f0 00 af 5b 00 88 |@.p..[..@....[..|
00be0540 40 1b 40 00 af 5b 00 8c 33 bb 00 03 17 60 00 5b |@.@..[..3....`.[|
00be0550 00 00 d8 25 3c 1b 80 01 03 7d d8 2b 13 60 00 57 |...%<....}.+.`.W|
00be0560 00 00 d8 25 3c 1b 84 00 03 7d d8 2b 17 60 00 53 |...%<....}.+.`.S|
00be0570 00 00 d8 25 27 5a 00 90 8f bb 00 00 af 5b 00 00 |...%'Z.......[..|
00be0580 8f bb 00 04 af 5b 00 04 8f bb 00 08 af 5b 00 08 |.....[.......[..|
00be0590 8f bb 00 0c af 5b 00 0c 8f bb 00 10 af 5b 00 10 |.....[.......[..|
00be05a0 8f bb 00 14 af 5b 00 14 8f bb 00 18 af 5b 00 18 |.....[.......[..|
00be05b0 8f bb 00 1c af 5b 00 1c 8f bb 00 20 af 5b 00 20 |.....[..... .[. |
00be05c0 8f bb 00 24 af 5b 00 24 8f bb 00 28 af 5b 00 28 |...$.[.$...(.[.(|
00be05d0 8f bb 00 2c af 5b 00 2c 8f bb 00 30 af 5b 00 30 |...,.[.,...0.[.0|
00be05e0 8f bb 00 34 af 5b 00 34 8f bb 00 38 af 5b 00 38 |...4.[.4...8.[.8|
00be05f0 8f bb 00 3c af 5b 00 3c 8f bb 00 40 af 5b 00 40 |...<.[.<...@.[.@|
00be0600 8f bb 00 44 af 5b 00 44 8f bb 00 48 af 5b 00 48 |...D.[.D...H.[.H|
00be0610 8f bb 00 4c af 5b 00 4c 8f bb 00 50 af 5b 00 50 |...L.[.L...P.[.P|
00be0620 8f bb 00 54 af 5b 00 54 8f bb 00 58 af 5b 00 58 |...T.[.T...X.[.X|
00be0630 8f bb 00 5c af 5b 00 5c 8f bb 00 60 af 5b 00 60 |...\.[.\...`.[.`|
00be0640 8f bb 00 64 af 5b 00 64 8f bb 00 68 af 5b 00 68 |...d.[.d...h.[.h|
00be0650 8f bb 00 6c af 5b 00 6c 8f bb 00 70 af 5b 00 70 |...l.[.l...p.[.p|
00be0660 8f bb 00 74 af 5b 00 74 8f bb 00 78 af 5b 00 78 |...t.[.t...x.[.x|
00be0670 8f bb 00 7c af 5b 00 7c 8f bb 00 80 af 5b 00 80 |...|.[.|.....[..|
00be0680 8f bb 00 84 af 5b 00 84 8f bb 00 88 af 5b 00 88 |.....[.......[..|
00be0690 8f bb 00 8c af 5b 00 8c 8f bb 00 90 af 5b 00 90 |.....[.......[..|
00be06a0 8f bb 00 94 af 5b 00 94 8f bb 00 98 af 5b 00 98 |.....[.......[..|
00be06b0 8f bb 00 9c af 5b 00 9c 3c 1b 00 a0 3c 1a bd 00 |.....[..<...<...|
00be06c0 37 5a 05 00 37 7b 00 90 af 5b 00 08 3c 1b 53 54 |7Z..7{...[..<.ST|
00be06d0 37 7b 41 31 af 5b 00 00 3c 1b 44 55 37 7b 4d 50 |7{A1.[..<.DU7{MP|
00be06e0 af 5b 00 04 10 00 fe 79 00 00 00 00 00 00 00 00 |.[.....y........|
00be06f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be1000 a4 3e f0 8a b7 9b 42 d4 41 e8 8a 85 e3 a6 45 04 |.>....B.A.....E.|
00be1010 3a 5d 59 4d 22 9a 2d 7d 64 2b 6f b4 75 40 4d 57 |:]YM".-}d+o.u@MW|
00be1020 d1 5a c4 c5 f3 6e 4e 40 8d fd e9 11 10 a0 32 25 |[email protected]%|
00be1030 94 27 33 6a 29 a4 57 3b 04 99 38 d1 79 f5 6b 7b |.'3j).W;..8.y.k{|
00be1040
peh@vidar:/tmp/YourFritz>
The whole data between 0x00be0000 and 0xbe1000 have to be copied from the original image to the "alien image" ... but at the same offset and the remaining data of the alien image (starting at 0x00be0000 before any further action) have to be appended after this copy.
But let's verify first, whether the older findings are still valid for newer versions ... there has to be some code (anywhere) to ensure, that this gap is skipped properly - or AVM has made it's own version of SquashFS utilities (it's an ever-lasting riddle to me, why AVM doesn't publish the source code for the changed squashfs-tools project, too ... my only guess is it, that these changes are so creepy, wild and weird, that noone in the public should get a look at), where this area is taken into account for each pointer, which belongs to an address behind it. Earlier versions by AVM (for other models) had some code in their flash driver to assure, that this area was skipped while reading.
The easiest approach to verify, whether this area was taken into account by the used
mksquashfs
tool (or however it's called by AVM), is to unpack the (already splitted) filesystem - once containing the NMI boot vector table and once without it:
Rich (BBCode):
peh@vidar:/tmp/YourFritz> dd if=kernel_1750E_07.27.image of=filesystem.image bs=256 skip=$(( 1565952 / 256 ))
50688+1 records in
50688+1 records out
12976136 bytes (13 MB, 12 MiB) copied, 0.366917 s, 35.4 MB/s
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -s -k filesystem.image
Found a valid superblock at offset 0x00000000 while scanning filesystem.image.
NMI vector found at 0x00A61B00, size=4096
Found TI checksum (0xD015B9E2) at the end of the image.
Found a valid big endian SQUASHFS 4:0 superblock on filesystem.image.
Creation or last append time is not available because of modified AVM-format (mkfs_time == bytes_used)
Filesystem size 12666.28 Kbytes (12.37 Mbytes)
Compression xz
Block size 65536
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always-use-fragments option is not specified
Xattrs are not stored
Duplicates are removed
Number of fragments 157
Number of inodes 3611
Number of ids 1
#
# OK, -stat looks fine (the NMI gap was moved as expected due to the now missing kernel image at the beginning),
# but what's while really unpacking this image?
#
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -k filesystem.image
Found a valid superblock at offset 0x00000000 while scanning filesystem.image.
NMI vector found at 0x00A61B00, size=4096
Found TI checksum (0xD015B9E2) at the end of the image.
Filesystem on filesystem.image is xz compressed (4:0)
Parallel unsquashfs: Using 2 processors
3344 inodes (3819 blocks) to write
[=========[...]=========|] 3819/3819 100%
created 2965 files
created 267 directories
created 379 symlinks
created 0 devices
created 0 fifos
#
# seems to be fine, too
# now let's remove the NMI vector before we try to unpack again
#
peh@vidar:/tmp/YourFritz> ( dd if=filesystem.image bs=256 count=$(( 0xA61B )); dd if=filesystem.image bs=256 skip=$(( 0xA61B + ( 4096 / 256 ) )) ) > filesystem_without_nmi_vector.image
42523+0 records in
42523+0 records out
10885888 bytes (11 MB, 10 MiB) copied, 0.298477 s, 36.5 MB/s
8149+1 records in
8149+1 records out
2086152 bytes (2.1 MB, 2.0 MiB) copied, 0.0563451 s, 37.0 MB/s
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -s -k filesystem_without_nmi_vector.image
Found a valid superblock at offset 0x00000000 while scanning filesystem_without_nmi_vector.image.
Found TI checksum (0xD015B9E2) at the end of the image.
Found a valid big endian SQUASHFS 4:0 superblock on filesystem_without_nmi_vector.image.
Creation or last append time is not available because of modified AVM-format (mkfs_time == bytes_used)
Filesystem size 12666.28 Kbytes (12.37 Mbytes)
Compression xz
Block size 65536
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always-use-fragments option is not specified
Xattrs are not stored
Duplicates are removed
Number of fragments 157
Number of inodes 3611
Number of ids 1
peh@vidar:/tmp/YourFritz> sudo rm -r squashfs-root/
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -k filesystem.image
Found a valid superblock at offset 0x00000000 while scanning filesystem_without_nmi_vector.image.
Found TI checksum (0xD015B9E2) at the end of the image.
Filesystem on filesystem_without_nmi_vector.image is xz compressed (4:0)
Parallel unsquashfs: Using 2 processors
3344 inodes (3819 blocks) to write
[=========[...]=========|] 3819/3819 100%
created 2965 files
created 267 directories
created 379 symlinks
created 0 devices
created 0 fifos
#
# unpacking is possible, no more NMI vector found
#
peh@vidar:/tmp/YourFritz>
Looks like there's really some code elsewhere - I'd bet, it's still anywhere in the flash (chip) driver (this gap is known to
ath_flash
, according to some boot log lines). But that means at the same time, that we can use the NMI vector table from AVM's firmware image and insert it (at the right place naturally) - but it should be the one for the same kernel, because it's highly presumable, it contains any absolute addresses and will be valid for a special kernel only.
(This could be another problem while using an own kernel - if the entry points get moved, an absolute address (if any) has to be recomputed. Luckily this vector table is only needed, if any NMI exception occurs while the table wasn't relocated already.)
Let's try this again using
dd
:
Rich (BBCode):
peh@vidar:/tmp/YourFritz> dd if=kernel_1750E_07.27.image of=nmi_vector bs=4096 skip=$(( 0xBE0000 / 4096 )) count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.0164954 s, 248 kB/s
#
# verify contents
#
peh@vidar:/tmp/YourFritz> hexdump -C nmi_vector
00000000 40 9a e8 05 40 9b e0 04 3c 1a 80 00 37 5a 03 80 |@...@...<...7Z..|
00000010 8f 5b 00 0c 3b 7b de ad 14 1b 00 19 00 00 00 00 |.[..;{..........|
00000020 40 1b e0 04 03 40 00 08 00 00 00 00 00 00 00 00 |@....@..........|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 dd d5 00 00 00 10 00 4e 4d 49 20 42 6f 6f 74 |........NMI Boot|
00000050 20 56 65 63 74 6f 72 00 00 00 00 00 00 00 00 00 | Vector.........|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 3c 1a b8 06 8f 5b 00 08 33 7b 00 03 24 1a 00 02 |<....[..3{..$...|
00000090 13 7a 00 03 00 00 00 00 10 00 00 0c 00 00 00 00 |.z..............|
000000a0 3c 1b 10 00 3c 1a b8 06 af 5b 00 0c 00 00 00 0f |<...<....[......|
000000b0 8f 5b 00 0c 13 60 ff fa 24 1b 00 03 af 5b 00 08 |.[...`..$....[..|
000000c0 00 00 00 0f 10 00 00 f2 00 00 00 00 3c 1a 80 00 |............<...|
000000d0 37 5a 03 80 8f 5b 00 0c 3b 7b de ad 14 1b 00 02 |7Z...[..;{......|
000000e0 00 00 00 00 27 5a 00 10 40 1b e0 04 03 40 00 08 |....'Z..@....@..|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200 40 9a e8 05 40 9b e0 04 10 00 ff 9d 00 00 00 00 |@...@...........|
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000380 40 9a e8 05 40 9b e0 04 10 00 ff 3d 00 00 00 00 |@...@......=....|
00000390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000400 40 9a e8 05 40 9b e0 04 10 00 ff 1d 00 00 00 00 |@...@...........|
00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000480 40 9a e8 05 40 9b e0 04 10 00 fe fd 00 00 00 00 |@...@...........|
00000490 3c 1a bd 00 37 5a 05 00 27 5a 00 0c af 41 00 00 |<...7Z..'Z...A..|
000004a0 af 42 00 04 af 43 00 08 af 44 00 0c af 45 00 10 |.B...C...D...E..|
000004b0 af 46 00 14 af 47 00 18 af 48 00 1c af 49 00 20 |.F...G...H...I. |
000004c0 af 4a 00 24 af 4b 00 28 af 4c 00 2c af 4d 00 30 |.J.$.K.(.L.,.M.0|
000004d0 af 4e 00 34 af 4f 00 38 af 50 00 3c af 51 00 40 |.N.4.O.8.P.<.Q.@|
000004e0 af 52 00 44 af 53 00 48 af 54 00 4c af 55 00 50 |.R.D.S.H.T.L.U.P|
000004f0 af 56 00 54 af 57 00 58 af 58 00 5c af 59 00 60 |.V.T.W.X.X.\.Y.`|
00000500 40 1b e8 05 af 5b 00 64 40 1b e0 04 af 5b 00 68 |@....[.d@....[.h|
00000510 af 5c 00 6c af 5d 00 70 af 5e 00 74 af 5f 00 78 |.\.l.].p.^.t._.x|
00000520 40 1b 60 00 af 5b 00 7c 40 1b 68 00 af 5b 00 80 |@.`..[.|@.h..[..|
00000530 40 1b 70 00 af 5b 00 84 40 1b f0 00 af 5b 00 88 |@.p..[..@....[..|
00000540 40 1b 40 00 af 5b 00 8c 33 bb 00 03 17 60 00 5b |@.@..[..3....`.[|
00000550 00 00 d8 25 3c 1b 80 01 03 7d d8 2b 13 60 00 57 |...%<....}.+.`.W|
00000560 00 00 d8 25 3c 1b 84 00 03 7d d8 2b 17 60 00 53 |...%<....}.+.`.S|
00000570 00 00 d8 25 27 5a 00 90 8f bb 00 00 af 5b 00 00 |...%'Z.......[..|
00000580 8f bb 00 04 af 5b 00 04 8f bb 00 08 af 5b 00 08 |.....[.......[..|
00000590 8f bb 00 0c af 5b 00 0c 8f bb 00 10 af 5b 00 10 |.....[.......[..|
000005a0 8f bb 00 14 af 5b 00 14 8f bb 00 18 af 5b 00 18 |.....[.......[..|
000005b0 8f bb 00 1c af 5b 00 1c 8f bb 00 20 af 5b 00 20 |.....[..... .[. |
000005c0 8f bb 00 24 af 5b 00 24 8f bb 00 28 af 5b 00 28 |...$.[.$...(.[.(|
000005d0 8f bb 00 2c af 5b 00 2c 8f bb 00 30 af 5b 00 30 |...,.[.,...0.[.0|
000005e0 8f bb 00 34 af 5b 00 34 8f bb 00 38 af 5b 00 38 |...4.[.4...8.[.8|
000005f0 8f bb 00 3c af 5b 00 3c 8f bb 00 40 af 5b 00 40 |...<.[.<...@.[.@|
00000600 8f bb 00 44 af 5b 00 44 8f bb 00 48 af 5b 00 48 |...D.[.D...H.[.H|
00000610 8f bb 00 4c af 5b 00 4c 8f bb 00 50 af 5b 00 50 |...L.[.L...P.[.P|
00000620 8f bb 00 54 af 5b 00 54 8f bb 00 58 af 5b 00 58 |...T.[.T...X.[.X|
00000630 8f bb 00 5c af 5b 00 5c 8f bb 00 60 af 5b 00 60 |...\.[.\...`.[.`|
00000640 8f bb 00 64 af 5b 00 64 8f bb 00 68 af 5b 00 68 |...d.[.d...h.[.h|
00000650 8f bb 00 6c af 5b 00 6c 8f bb 00 70 af 5b 00 70 |...l.[.l...p.[.p|
00000660 8f bb 00 74 af 5b 00 74 8f bb 00 78 af 5b 00 78 |...t.[.t...x.[.x|
00000670 8f bb 00 7c af 5b 00 7c 8f bb 00 80 af 5b 00 80 |...|.[.|.....[..|
00000680 8f bb 00 84 af 5b 00 84 8f bb 00 88 af 5b 00 88 |.....[.......[..|
00000690 8f bb 00 8c af 5b 00 8c 8f bb 00 90 af 5b 00 90 |.....[.......[..|
000006a0 8f bb 00 94 af 5b 00 94 8f bb 00 98 af 5b 00 98 |.....[.......[..|
000006b0 8f bb 00 9c af 5b 00 9c 3c 1b 00 a0 3c 1a bd 00 |.....[..<...<...|
000006c0 37 5a 05 00 37 7b 00 90 af 5b 00 08 3c 1b 53 54 |7Z..7{...[..<.ST|
000006d0 37 7b 41 31 af 5b 00 00 3c 1b 44 55 37 7b 4d 50 |7{A1.[..<.DU7{MP|
000006e0 af 5b 00 04 10 00 fe 79 00 00 00 00 00 00 00 00 |.[.....y........|
000006f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00001000
peh@vidar:/tmp/YourFritz> printf "%08X\n" "$(stat -c %s kernel.padded)"
0017E600
peh@vidar:/tmp/YourFritz> printf "%08X\n" "$(stat -c %s filesystem_without_nmi_vector.image)"
00C5F008
peh@vidar:/tmp/YourFritz> printf "%08X\n" $(( "$(stat -c %s filesystem_without_nmi_vector.image)" + "$(stat -c %s kernel.padded)" ))
00DDD608
peh@vidar:/tmp/YourFritz> printf "%u\n" $(( "$(stat -c %s filesystem_without_nmi_vector.image)" + "$(stat -c %s kernel.padded)" ))
14538248
peh@vidar:/tmp/YourFritz> printf "%u\n" $(( "$(stat -c %s filesystem_without_nmi_vector.image)" + "$(stat -c %s kernel.padded)" + "$(stat -c %s nmi_vector)" ))
14542344
#
# It's the expected file size of the final image, for a first quick check.
#
peh@vidar:/tmp/YourFritz> cat kernel.padded filesystem_without_nmi_vector.image > alien_without_nmi_vector.image
peh@vidar:/tmp/YourFritz> ls -l alien_without_nmi_vector.image
-rw-r--r-- 1 peh users 14538248 Aug 13 17:51 alien_without_nmi_vector.image
#
# expected size after 1st step
#
peh@vidar:/tmp/YourFritz> hexdump -C -s $(( 0xBE0000 - 64 )) -n 128 alien_without_nmi_vector.image
00bdffc0 57 f3 b0 e1 e7 e8 d7 cd 32 5b 77 bf 40 b1 1e 83 |W.......2[w.@...|
00bdffd0 77 74 9d ea 08 f4 4a c4 4c 39 d7 01 e0 be 8d 65 |wt....J.L9.....e|
00bdffe0 8f c8 cf 0a 7c 6b 7e 2a cd 27 5b 73 58 e0 e5 39 |....|k~*.'[sX..9|
00bdfff0 49 9a 41 f4 16 d4 84 7a bb 9a 89 ff 02 7f 1a 23 |I.A....z.......#|
00be0000 47 1c a6 31 94 3a c0 cb c6 a3 16 05 07 39 0c 6f |G..1.:.......9.o|
00be0010 ad df 70 7b d3 7d 0a 59 87 3f 90 2f 28 94 46 e3 |..p{.}.Y.?./(.F.|
00be0020 af 4c 35 48 b6 01 5c d7 b1 55 9c 28 1b d1 f6 b3 |.L5H..\..U.(....|
00be0030 6c a7 e6 d7 94 cb 35 4c f2 b1 5f cb ba 8c 0e 2e |l.....5L.._.....|
00be0040
#
# The expected data before and after the inserted NMI vector table.
#
peh@vidar:/tmp/YourFritz> ( dd if=alien_without_nmi_vector.image bs=$(( 0x10000 )) count=$(( 0xBE )); \
> cat nmi_vector; dd if=alien_without_nmi_vector.image bs=$(( 0x10000 )) skip=$(( 0xBE )) ) > alien_with_nmi_vector.image
190+0 records in
190+0 records out
12451840 bytes (12 MB, 12 MiB) copied, 0.0154672 s, 805 MB/s
31+1 records in
31+1 records out
2086408 bytes (2.1 MB, 2.0 MiB) copied, 0.00233252 s, 894 MB/s
peh@vidar:/tmp/YourFritz> ls -l alien*.image
-rw-r--r-- 1 peh users 14542344 Aug 13 18:01 alien_with_nmi_vector.image
-rw-r--r-- 1 peh users 14538248 Aug 13 17:51 alien_without_nmi_vector.image
#
# Size looks fine, too.
#
peh@vidar:/tmp/YourFritz> hexdump -C -s $(( 0xBE0000 - 64 )) -n 128 alien_with_nmi_vector.image
00bdffc0 57 f3 b0 e1 e7 e8 d7 cd 32 5b 77 bf 40 b1 1e 83 |W.......2[w.@...|
00bdffd0 77 74 9d ea 08 f4 4a c4 4c 39 d7 01 e0 be 8d 65 |wt....J.L9.....e|
00bdffe0 8f c8 cf 0a 7c 6b 7e 2a cd 27 5b 73 58 e0 e5 39 |....|k~*.'[sX..9|
00bdfff0 49 9a 41 f4 16 d4 84 7a bb 9a 89 ff 02 7f 1a 23 |I.A....z.......#|
00be0000 40 9a e8 05 40 9b e0 04 3c 1a 80 00 37 5a 03 80 |@...@...<...7Z..|
00be0010 8f 5b 00 0c 3b 7b de ad 14 1b 00 19 00 00 00 00 |.[..;{..........|
00be0020 40 1b e0 04 03 40 00 08 00 00 00 00 00 00 00 00 |@....@..........|
00be0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00be0040
peh@vidar:/tmp/YourFritz> hexdump -C -s $(( 0xBE1000 - 64 )) -n 128 alien_with_nmi_vector.image
00be0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00be1000 47 1c a6 31 94 3a c0 cb c6 a3 16 05 07 39 0c 6f |G..1.:.......9.o|
00be1010 ad df 70 7b d3 7d 0a 59 87 3f 90 2f 28 94 46 e3 |..p{.}.Y.?./(.F.|
00be1020 af 4c 35 48 b6 01 5c d7 b1 55 9c 28 1b d1 f6 b3 |.L5H..\..U.(....|
00be1030 6c a7 e6 d7 94 cb 35 4c f2 b1 5f cb ba 8c 0e 2e |l.....5L.._.....|
00be1040
#
# Everything seems to be fine up to this step - now let's try to unpack it again.
#
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -s -k alien_with_nmi_vector.image
Found a valid superblock at offset 0x0017E600 while scanning alien_with_nmi_vector.image.
NMI vector found at 0x00BE0000, size=4096
Found TI checksum (0xD015B9E2) at the end of the image.
Found a valid big endian SQUASHFS 4:0 superblock on alien_with_nmi_vector.image.
Creation or last append time is not available because of modified AVM-format (mkfs_time == bytes_used)
Filesystem size 12666.28 Kbytes (12.37 Mbytes)
Compression xz
Block size 65536
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are compressed
Always-use-fragments option is not specified
Xattrs are not stored
Duplicates are removed
Number of fragments 157
Number of inodes 3611
Number of ids 1
peh@vidar:/tmp/YourFritz> sudo rm -r squashfs-root/
peh@vidar:/tmp/YourFritz> unsquashfs4-avm -k alien_with_nmi_vector.image
Found a valid superblock at offset 0x0017E600 while scanning alien_with_nmi_vector.image.
NMI vector found at 0x00BE0000, size=4096
Found TI checksum (0xD015B9E2) at the end of the image.
Filesystem on alien_with_nmi_vector.image is xz compressed (4:0)
Parallel unsquashfs: Using 2 processors
3344 inodes (3819 blocks) to write
[=========[...]=========|] 3819/3819 100%
created 2965 files
created 267 directories
created 379 symlinks
created 0 devices
created 0 fifos
peh@vidar:/tmp/YourFritz>
Everything looks perfect - while "replaying" the commands, it's naturally not necessary to verify each step as excessive, as I did it above.
But that was one problem only ... let's try now to find, why you do not get a telnet daemon running - it's absolutely necessary later, too, while doing further research.
Please restart your modifications of the filesystem image once more (best from a freshly extracted one) ... but this time provide the whole log, starting with
unsquashfs
(or even
grep
and
dd
) and ending with
mksquashfs
(and best an immediate attempt to unpack the image just once again). Some times anyone may be blind for own failures ... this could be the same for my examples, but while reading this from someone else, a problem can be found better (at least this is true for myself).