nvram2env

nvram2env - pseudo driver that copy nvram-like data from flash to kenv.

Usage

Include into kernel build

add following line to sys/conf/files file:

dev/nvram/nvram2env.c           optional nvram2env

add following line to your kernel CONFIG file:

device nvram2env

Hints definition

That module configured via hints.

Usage in U-Boot case:

hint.nvram.0.base=0x1f030000
hint.nvram.0.maxsize=0x2000
hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic
hint.nvram.1.base=0x1f032000
hint.nvram.1.maxsize=0x4000
hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic

CFE nvram with fallback:

hint.nvram.0.base=0x1fff8000
hint.nvram.0.fallbackbase=0x1fc00400
hint.nvram.0.flags=4 # 4 = Format Broadcom

but seems for CFE nvram preferred to read both blocks:

# NVRAM partition
# Static, CFE internal
hint.nvram.0.flags=0x05 # Broadcom + nocheck
hint.nvram.0.base=0x1fc00400
# Dynamic, editable form CFE, override values from first
hint.nvram.1.flags=0x05 # Broadcom + nocheck
hint.nvram.1.base=0x1cff8000

Code

nvram2env.c

AleksandrRybalko/nvram2env (last edited 2011-03-16 11:09:03 by AleksandrRybalko)