If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.
Property:fwstream
BoxMatrix >> Shell-Commands >> fwstream | @ BoxMatrix - IRC-Chat - Translate: de es fr it nl pl |
News | Selectors | Models | Accessories | Components | Environment | Config | Commands | System | Webif | Software | Develop | Lexicon | Community | Project | Media |
Startup-Scr | Hotplug-Scr | BusyBox-Cmds | Bash-Cmds | AVM-Cmds | Chipset-Cmds | Linux-Cmds | Shared-Libs | Kernel-Mods | Research |
AVM-Command
Command: | fwstream - type Exec | Wiki | Freetz | IPPF | whmf | AVM | Web |
Location: | Shell-Commands >> AVM-Commands - Origin: AVM | ||||||
Path: | Release: /usr/bin Lab+Rel: /usr/bin | ||||||
Properties: | Size: 9.6k - 13.6k - Firmware: 7.90 - 8.00 | ||||||
Function: | Firmware tar image stream length clipper. |
Goto: Examples - Source - Dependencies - Model-Matrix - Symbols - SMW-Browser
Details
fwstream is the Firmware tar image stream length clipper.
It prevents the RAM from getting flooded by an oversized Firmware-Image by clipping to a maximum stream size.
In other context AVM uses dd for this purpose, see the Examples of webget.
But dd would do hard clipping, resulting in an invalid tar image stream when clipping.
Simplified:
cat tar.image | dd | tar x # results in broken tar when clipping cat tar.image | fwstream | tar x # results in valid tar when clipping
Firmware-Images are uncompressed tar images since the binary blobs they contain are already compressed.
A tar is a stream of headers for each file, followed by the respective data each.
By processing the header fwstream can compute if the subsequent data would fit the maximum stream length.
If it's too long then fwstream terminates, but has transfered a valid tar stream up to the clipping point.
fwstream is used by firmwarecfg and fwupdate.
fw 7.90 help:
root@fritz:/var/mod/root# fwstream -? use: fwstream <allow-lte> <max_size_kb> [<copy_file>]
LTE and 5G firmware is HUGE and can have 5 times the size of FRITZ!OS. The FRITZ!Box 6850 5G modem firmware is 150 MB!
That's why the <allow-lte>
flag exists, to not add the size of files in the lte
folder of an image to the clipping size.
If the <max_size_kb>
is 0
the system default is gathered from the boxenv_MaxUpdateFileSize
function of libboxlib.so.
The <copy_file>
option permits to create a clipped tar image file instead of using standard output.
Examples
Simplified from firmwarecfg fw 7.90:
cd / ; webget '%s' | fwstream 1 0 | tar xvf -
Simplified from fwupdate fw 7.90:
webget %s %s '%s' | fwstream 1 %u %s | tar xvf - webget %s %s '%s' | fwstream 1 0 %s | tar xvf - webget %s %s '%s' | fwstream 0 0 %s | tar xvf - cat '%s' | fwstream %d 0 %s | tar xvf -
Source
The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.90 source files:
$ strings /usr/bin/fwupdate | grep -e '\.c$' -e '\.cpp$' ar7/fwupdate/fwupdate/fwupdate.cpp
Dependencies
Daily updated index of all dependencies of this command. Last update: 2024-12-21 07:44 GMT.
A *
in the Mod
column marks info from Supportdata-Probes, which will always stay incomplete.
Relation | Typ | Object | Mod | Firmware | Info | Origin |
---|---|---|---|---|---|---|
Depends on | lib | ld.so | 7 | 7.90 - 8.00 | Dynamic linker / loader | Linux |
Depends on | lib | libar7cfg.so | 21 | 7.90 - 8.00 | TFFS-Configuration API to ar7.cfg and many more. | AVM |
Depends on | lib | libavmauth.so | 21 | 7.90 - 8.00 | Fritzbox authentification helpers | AVM |
Depends on | lib | libavmcipher.so | 21 | 7.90 - 8.00 | AES / DES / Rijndael encryption / decryption. | AVM |
Depends on | lib | libavmcsock.so | 21 | 7.90 - 8.00 | Networking, I/O and helper functions | AVM |
Depends on | lib | libavmfbstate.so | 21 | 7.90 - 8.00 | IPC fritzbox state notification | AVM |
Depends on | lib | libavmhmac.so | 21 | 7.90 - 8.00 | HMAC / SHA / MD5 hashing. | AVM |
Depends on | lib | libavmwdt.so | 21 | 7.90 - 8.00 | AVM-Watchdogs management API | AVM |
Depends on | lib | libboxenv.so | 21 | 7.90 - 8.00 | API to the rc.conf enhanced Config-Environment | AVM |
Depends on | lib | libboxlib.so | 21 | 7.90 - 8.00 | Box status, logging and statistics functions | AVM |
Depends on | lib | libc.so | 21 | 7.90 - 8.00 | Standard C library | Linux |
Depends on | lib | libcm.so | 21 | 7.90 - 8.00 | ctlmgr / cm_logic messaging API | AVM |
Depends on | lib | libcore.so | 21 | 7.90 - 8.00 | Gathers the MAC addresses of the device and maintains its device mode. | AVM |
Depends on | lib | libcrypto.so | 21 | 7.90 - 8.00 | OpenSSL general crypto and X.509 library | Linux |
Depends on | lib | libdl.so | 5 | 7.90 - 8.00 | Dynamic linking library | Linux |
Depends on | lib | libdputil.so | 21 | 7.90 - 8.00 | DataPipe / packet utilities | AVM |
Depends on | lib | libewnwjson.so | 21 | 7.90 - 8.00 | JSON helper functions | AVM |
Depends on | lib | libewnwlinux.so | 21 | 7.90 - 8.00 | Linux networking functions | AVM |
Depends on | lib | libewnwnet.so | 21 | 7.90 - 8.00 | Internet helper functions | AVM |
Depends on | lib | libfbconf.so | 21 | 7.90 - 8.00 | API to hardcoded fbconf.cfg | AVM |
Depends on | lib | libfwupdate.so | 21 | 7.90 - 8.00 | TODO | Linux |
Depends on | lib | libgcc_s.so | 21 | 7.90 - 8.00 | GCC low-level runtime library | Linux |
Depends on | lib | libjuisclient.so | 21 | 7.90 - 8.00 | Update-Search - second generation - JUIS | AVM |
Depends on | lib | liblocalize.so | 21 | 7.90 - 8.00 | Charset conversion helper functions | AVM |
Depends on | lib | libm.so | 5 | 7.90 - 8.00 | C math library | Linux |
Depends on | lib | liboauth2.so | 21 | 7.90 - 8.00 | OAuth v2.0 authentificator | Linux |
Depends on | lib | libpthread.so | 5 | 7.90 - 8.00 | POSIX threading library | Linux |
Depends on | lib | librt.so | 5 | 7.90 - 8.00 | POSIX realtime extensions library | Linux |
Depends on | lib | libslab_c++.so | 21 | 7.90 - 8.00 | C++ slab allocator | AVM |
Depends on | lib | libstdc++.so | 21 | 7.90 - 8.00 | GNU C++ library | Linux |
Depends on | lib | libsvctl.so | 21 | 7.90 - 8.00 | supervisor notification library | AVM |
Depends on | lib | libtiinterpreter.so | 21 | 7.90 - 8.00 | Preprocessor for SSI-Files by TI. | AVM |
Depends on | lib | libwebkpiclient.so | 21 | 7.90 - 8.00 | KPI sensor for system parts which use HTTP / HTTPS | AVM |
Depends on | lib | libwebsrv.so | 21 | 7.90 - 8.00 | HTTP / HTTPS webserver and tools. | AVM |
Depends on | lib | libyajl.so | 21 | 7.90 - 8.00 | Event-driven JSON parser | Linux |
Depends on | lib | libz.so | 21 | 7.90 - 8.00 | Zlib compressor / decompressor | Linux |
36 dependencies for this command |
Model-Matrix
Daily updated index of the presence, path and size of this command for each model. Last update: 2024-12-22 05:48 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom/rtl)
label in the Model
column shows which CPU is meant for Multi-Linux models.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.
Model | Firmware | Path | Size |
---|---|---|---|
FRITZ!Box 4040 | 7.90 - 8.00 | /usr/bin | 9.6k |
FRITZ!Box 4050 | 7.90 | /usr/bin | 9.6k |
FRITZ!Box 4060 | 7.90 | /usr/bin | 9.6k |
FRITZ!Box 5530 Fiber (main) | 8.00 | /usr/bin | 10.0k |
FRITZ!Box 5590 Fiber (main) | 7.90 - 8.00 | /usr/bin | 9.6k |
FRITZ!Box 6591 Cable (atom) | 7.90 - 8.00 | /usr/bin | 13.5k |
FRITZ!Box 6660 Cable (atom) | 7.90 - 8.00 | /usr/bin | 13.5k |
FRITZ!Box 6670 Cable (atom) | 7.90 | /usr/bin | 13.6k |
FRITZ!Box 6690 Cable (atom) | 7.90 | /usr/bin | 13.5k |
FRITZ!Box 6850 LTE | 7.90 | /usr/bin | 9.6k |
FRITZ!Box 6850 5G | 7.90 | /usr/bin | 9.6k |
FRITZ!Box 7510 | 7.90 - 8.00 | /usr/bin | 9.6k |
FRITZ!Box 7520 | 8.00 | /usr/bin | 9.6k |
FRITZ!Box 7520 v2 (main) | 7.90 - 8.00 | /usr/bin | 9.6k |
FRITZ!Box 7530 | 7.90 - 8.00 | /usr/bin | 9.6k |
FRITZ!Box 7530 AX | 8.00 | /usr/bin | 9.6k |
FRITZ!Box 7583 VDSL (main) | 8.00 | /usr/bin | 10.0k |
FRITZ!Box 7590 (main) | 7.90 - 8.00 | /usr/bin | 9.9k - 10.0k |
FRITZ!Box 7590 AX (main) | 8.00 | /usr/bin | 10.0k |
FRITZ!Box 7690 | 7.90 | /usr/bin | 9.6k |
20 models use this command |
Symbols
Daily updated index of all symbols of this command. Last update: 2024-12-21 07:44 GMT.
Firmware | Symbol |
---|---|
7.90 - 8.00 | main |
1 symbol for this command |