Clarify Project Policy on Default Writes to NVRAM

Michael Richardson mcr at sandelman.ca
Tue Aug 26 08:53:11 PDT 2025


Sebastian Moeller via openwrt-devel <openwrt-devel at lists.openwrt.org> wrote:
    >> Tom Li via openwrt-devel <openwrt-devel at lists.openwrt.org> wrote: >
    >> For OpenWrt routers, writing to NVRAM by default can serve useful >
    >> purposes in several contexts:
    >>
    >> Would the discussion change if these things went into uboot variables?
    >> While that's often the same NVRAM as the system, sometimes it's not.
    >> NVRAM is also getting much better.  (Of course, I think that there are
    >> systems that don't use uboot)
    >>
    >> Certainly the IPv6 prefix seems like a good candidate.  It doesn't
    >> change that often.

    > That is a hypothesis, not a fact unfortunately. ISPs, as far as I can
    > tell, do not all have a decent grasp on IPv6 provisioning so there will

Agreed. Among the ISPs that do not roll every 24h (often forced by law), they
do not change that often.   I'd be curious to know if the ISPs that *do* roll
every 24, if the PDs lifetime are appropriately set.  If done right, then the
announcement on the LAN should also be equally short, and we do not need to
write it.

    > be cases in which the prefix changes quite often. Hopefully these will
    > be transient, but I would not bet the farm on that...  So I thing
    > saving this information out should be done in a rate limited fashion
    > and cause a report if attempted too often, no?

If we write to the same flash block once a day, 365 days/year, we get 27 years
of write time before we run into 10,000 writes.  10,000 erase cycles per
block is what I recall, but in doing some searches to see what it is now, I
got lost in AI slop.  That assumes no wear leveling in the flash device
itself (few of the onboard NAND devices we work with have that), and also
that our file system has no wear leveling. But, both JFFS2 and UBIFS *do*
have wear leveling.

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 511 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20250826/da703b35/attachment.sig>


More information about the openwrt-devel mailing list