Uboot-envtools - fw_env.config missing on AVM FB 4040

After installing uboot-envtools the config file /etc/fw_env.config is not being created.
Looking at /etc/uci-defaults/30_uboot-envtools ...

...
case "$board" in
alfa-network,ap120c-ac|\
devolo,magic-2-wifi-next|\
edgecore,ecw5211|\
glinet,gl-a1300 |\
glinet,gl-ap1300|\
glinet,gl-b1300|\
glinet,gl-b2200|\
luma,wrtq-329acn|\
...

But for "avm,fritzbox-4040" there is just nothing.

Any help appreciated

cat /proc/mtd should provide you with the info you need to populate it.

cat /proc/mtd gives

dev: size erasesize name
...
mtd5: 00010000 00010000 "APPSBLENV"
...

leads to:

mtd_dev=mtd5
mtd_size=00010000
mtd_erase=00010000

the device has nor flash, hence

ubootenv_size=$mtd_size = 00010000

sectors=$(( $ubootenv_size / $mtd_erase )) --> 00010000 / 00010000 = 1
sectors=$(printf "0x%x" $sectors ) --> 0x1

next step in 30_uboot-envtools would be
ubootenv_add_uci_config "/dev/mtd5" "0x0" "0x10000" "0x10000"

Or am I missing something ?

I dumped /dev/mtd5 via the gui --> all zeroes.
I remember having read something similar on the DL-WRX36 thread.
So I used the serial console on my 2nd FB4040 to enter uboot and run a saveenv command.
After that I dumped /dev/mtd5 again, e voila, the environment was there.

After inserting:
/dev/mtd5 0x0 00010000 00010000 0x1
in
/etc/fw_env.config

fw_printenv was working fine.
I haven't tried fw_setenv yet.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.