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.

0
U

Property:fwstream

From BoxMatrix


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

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 maimum 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-04-27 07:31 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 3 7.90 Dynamic linker / loader Linux
Depends on lib libar7cfg.so 12 7.90 TFFS-Configuration API to ar7.cfg and many more. AVM
Depends on lib libavmauth.so 12 7.90 Fritzbox authentification helpers AVM
Depends on lib libavmcipher.so 12 7.90 AES / DES / Rijndael encryption / decryption. AVM
Depends on lib libavmcsock.so 12 7.90 Networking, I/O and helper functions AVM
Depends on lib libavmfbstate.so 12 7.90 IPC fritzbox state notification AVM
Depends on lib libavmhmac.so 12 7.90 HMAC / SHA / MD5 hashing. AVM
Depends on lib libavmwdt.so 12 7.90 AVM-Watchdogs management API AVM
Depends on lib libboxenv.so 12 7.90 API to the rc.conf enhanced Config-Environment AVM
Depends on lib libboxlib.so 12 7.90 Box status, logging and statistics functions AVM
Depends on lib libc.so 12 7.90 Standard C library Linux
Depends on lib libcm.so 12 7.90 ctlmgr / cm_logic messaging API AVM
Depends on lib libcore.so 12 7.90 Collects the MAC addresses of the device it's running on AVM
Depends on lib libcrypto.so 12 7.90 OpenSSL general crypto and X.509 library Linux
Depends on lib libdl.so 7 7.90 Dynamic linking library Linux
Depends on lib libdputil.so 12 7.90 DataPipe / packet utilities AVM
Depends on lib libewnwjson.so 12 7.90 JSON helper functions AVM
Depends on lib libewnwlinux.so 12 7.90 Linux networking functions AVM
Depends on lib libewnwnet.so 12 7.90 Internet helper functions AVM
Depends on lib libfbconf.so 12 7.90 API to hardcoded fbconf.cfg AVM
Depends on lib libfwupdate.so 12 7.90 TODO Linux
Depends on lib libgcc_s.so 12 7.90 GCC low-level runtime library Linux
Depends on lib libjuisclient.so 12 7.90 Update-Search - second generation - JUIS AVM
Depends on lib liblocalize.so 12 7.90 Charset conversion helper functions AVM
Depends on lib libm.so 7 7.90 C math library Linux
Depends on lib liboauth2.so 12 7.90 OAuth v2.0 authentificator Linux
Depends on lib libpthread.so 7 7.90 POSIX threading library Linux
Depends on lib librt.so 7 7.90 POSIX realtime extensions library Linux
Depends on lib libslab_c++.so 12 7.90 C++ slab allocator AVM
Depends on lib libstdc++.so 12 7.90 GNU C++ library Linux
Depends on lib libsvctl.so 12 7.90 supervisor notification library AVM
Depends on lib libtiinterpreter.so 12 7.90 Preprocessor for SSI-Files by TI. AVM
Depends on lib libwebkpiclient.so 12 7.90 KPI sensor for system parts which use HTTP / HTTPS AVM
Depends on lib libwebsrv.so 12 7.90 HTTP / HTTPS webserver and tools. AVM
Depends on lib libyajl.so 12 7.90 Event-driven JSON parser Linux
Depends on lib libz.so 12 7.90 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-04-27 05:16 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) label in the Model column shows which CPU is meant for models with multiple Linux instances.
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 5590 Fiber (arm) 7.90 /usr/bin 9.5k
FRITZ!Box 6591 Cable (arm) 7.90 /usr/bin 13.5k
FRITZ!Box 6591 Cable (atom) 7.90 /usr/bin 13.5k
FRITZ!Box 6660 Cable (arm) 7.90 /usr/bin 13.5k
FRITZ!Box 6660 Cable (atom) 7.90 /usr/bin 13.5k
FRITZ!Box 6690 Cable (arm) 7.90 /usr/bin 13.5k
FRITZ!Box 6690 Cable (atom) 7.90 /usr/bin 13.5k
FRITZ!Box 6850 LTE 7.90 /usr/bin 9.5k
FRITZ!Box 6850 5G 7.90 /usr/bin 9.5k
FRITZ!Box 7530 AX 7.90 /usr/bin 9.5k
FRITZ!Box 7590 7.90 /usr/bin 9.9k
FRITZ!Box 7590 AX 7.90 /usr/bin 9.9k
12 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2024-04-27 07:31 GMT.

Firmware Symbol
7.90 main
1 symbol for this command

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

f