D-LINK DIR-825 b1 size of overlay changed in snapshots?

I do understand the core logic/concept of it, that has never been my question. I'm just trying to understand the math behind it. Mtd3/rootfs is 5184K on this device, that never change, right? (Since that would probably mess up partitions if you go back to stock fw...)
So rom and overlay share the same space, if one grows one shrinks, crystal clear, never questioned that either.
Now in my first post I compare two builds, both has a rom size of 3,3M but different overlay size, that is what puzzles me. And 3,3M+576K or 960K is not 5184K. And as fast as I understand, rom is compressed to so 3,3M should be even less on the flash then, making the math even worse.
Is the kernel also borrowing space from mtd3? (Without making /rom larger) That would explain a lot then. As others have said too, kernels gets bigger and bigger of course. Maybe there is a command to list everything better than just standard df do which can show what's in mtd3/rootfs?

Yes.

The sysupgrade file is kernel + rootfs concatenated together. This is placed in "firmware" starting from the beginning ("firmware" is an alias for kernel + rootfs + rootfs_data). At boot time the end of the kernel is detected and two dynamic partitions are made. Starting on the next 64K boundary (erase block) after the end of rootfs, the overlay is formatted. Partitions that will not be erased at run time can start at any byte in the flash, but the way the chip is made requires erasing exact 64K blocks at a time, so a writeable filesystem has to start on a 64K boundary.

The problem here is the OEM partitioning of this model has about 2.5 MB of reserved space in the flash chip, compared to less than 512 MB for a typical 8 MB NOR flash based router. All 8MB routers are getting squeezed as kernels get larger, but most aren't at a critical point yet.

3 Likes

the MTD3 you are referring to is the layout given by the Original OEM firmware
and since the use of MTD3 is only used via MTD2 it's only relevant to the kernel in use
openwrt joins MTD2 & MTD3 into MTD7 calling it Firmware
then creates it's kernel
what ever room is left over in Firmware is then allocated to rootfs

1 Like

Need 3 more approvals on that PR for it to be "auto merged" (assuming that is what should happen).

As a refresher, it is a super small change that merges the "Unknown" partition to the firmware partition to make overlay much larger.

Anyone still using DIR-825 willing to give it a try? Happy to help anyone build an image to try it out.

Maybe this can give it a few more years and set some kind of a record? :wink:

1 Like