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:adam2 env.ko

From BoxMatrix
(Redirected from adam2 env.ko)


BoxMatrix >> Shell-Commands >> adam2_env.ko @ 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

Kernel-Module

Note that Kernel 2.4 and builtin *.o modules have been renamed to *.ko for an easier comparison.

Goto:   GPL-Browser  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

This is not used in FRITZ!OS but it's relevant to understand its history.

adam2_env.ko is the original direct MTD driver for accessing the Bootloader-Environment from the TI AR7 SDK (NSP).
It used a single partition splitted into fixed size portions for the environment and the config (the later TFFS-Configuration).

Excerpt from ticfg.h explaining the partition:

#define TICFG_MTD_OFFSET     (0)
#define TICFG_MTD_SIZE       (64*1024)

#define ENV_VAR_MTD          (3)
#define ENV_VAR_MTD_OFFSET   (0)
#define ENV_VAR_MTD_SIZE     (FLASH_ENV_ENTRY_SIZE * MAX_ENV_ENTRY)

#define CFGMAN_MTD           (3)
#define CFGMAN_MTD_OFFSET    (ENV_VAR_MTD_SIZE)
#define CFGMAN_MTD_SIZE      (TICFG_MTD_SIZE - ENV_VAR_MTD_SIZE)

The 64 KB TICFG partition mtd3 was splitted into the ENV_VAR and CFGMAN portions.

Excerpt from adam2_env.h explaining the environment:

/******************************************************************************* 
 *The structure for each entry in the environment variable region is 
 * as follows:
 *
 * control    1:   Can be either 0x42 (entry) or 0xff (empty)
 * checksum   1: 
 * index      1:   Unique number associated with a variable-value pair
 * size       1:   Size of the payload (x+1+y+1)
 * variable   x+1: ASCII string 
 * value      y+1: ASCII string
 *
 * The last entry for a given value is the most current value.
 *
 * A set variable will contain both a variable and a value, even if the value is ""
 *
 * An unset variable will contain only the header (e.g. For a variable that is 
 * in the region with an index=0x11, [0x42 0x00 0x11 0x00] )
 ******************************************************************************/

/* Note that these definitions must match with the definitions in ADAM2. */
/* These definitions allow for a 10kB area for saving the environment variables */
#define FLASH_ENV_ENTRY_SIZE	        128 
#define MAX_ENV_ENTRY	                80  /* max # of Adam2 environment variables */

#define MAX_ENV_ERRORS                  16   /* max error msgs before we abort the action */

typedef struct
{
	char *name;
	char *val;
}t_env_var;

The maximum of 80 environment variables each 128 bytes sums up to 10 KB for the ENV_VAR and 54 KB for CFGMAN.
AVM replaced the TICFG partition mtd3 using their TFFS 1.0 for the Bootloader-Environment and the TFFS-Configuration.

adam2_env.ko provides these functions:

  • adam2_env_get_variable - Get the variable referenced by (numerical) index
  • adam2_env_get_value - Get the value associated with an environment variable (by name)
  • adam2_env_atox - Converts an ASCII address entry from the environment variable region
  • adam2_env_get_value_direct - Get the value associated with an environment variable bypassing MTD driver
  • adam2_env_set_variable - Set the variable to a specific value
  • adam2_env_unset_variable - Unset the variable to a specific value
  • adam2_env_defrag - Defrag the block associated with the Adam2 environment variables

The adam2_env_get_value_direct function bypasses MTD drivers to support the prom_getenv function from init.c.
prom_getenv is used in Kernel for early access to the Bootloader-Environment, ie for partitioning in avalanche-flash.ko.

See also the adam2_proc.ko procfs interface.

GPL-Browser

Daily updated index of all adam2_env.ko code findings on the GPL-Browser. Last update: 2024-05-04 04:09 GMT.
The Files header attempts to list the files which belong to this module. Useful if a directory contains multiple modules.
The Browse column points to the Path of the Makefile referring this code on the gpl.boxmatrix.info service.
The SoC column lists the Chip-Codenames, the Model column lists the nicks of the Box-Models.
The Diff column links the comparison of the AVM Kernel to the pristine original from Kernel.org.
The Download column links the full tarball the respective directory content is extracted from.
The presence of the source does not mean it fits the respective model and architecture. See the Model-Matrix where it's used.
Note that this list matches module names with hyphen (-) and underscore (_) exchangeable, same as modprobe does.

Dependencies

Daily updated index of all dependencies of this module. Last update: 2024-05-03 07:35 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
0 dependencies for this module

Model-Matrix

Daily updated index of the presence, path and size of this module for each model. Last update: 2024-05-03 05:15 GMT.
Showing all models using this module. 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
0 models use this module

Symbols

Daily updated index of all symbols of this module. Last update: 2024-05-03 07:35 GMT.

Firmware Symbol
0 symbols for this module

SMW-Browser

Information is currently being retrieved from the backend.
 

Synonyms

Showing 1 related property.

a