On Sun, Nov 01, 2026 at 02:01:20PM -0800, Douglas Anderson wrote: > By default, `fdtfactor` preserves `/__local_fixups__` on `base.dtb` so > that when `fdt_overlay_apply()` merges a `.dtbo` overlay, the > reconstructed device tree retains full `/__local_fixups__` information > (for instance, if an OS kernel wants to know which property cells > contain phandles at runtime). > > When `-L` was passed to `dtc` solely to help `fdtfactor` locate phandle > cells at build time and `/__local_fixups__` is not needed at runtime, > retaining `/__local_fixups__` in `base.dtb` wastes space. > > Add `-S` / `--strip-local-fixups` to omit `/__local_fixups__` from > `base.dtb` (and therefore from the merged device trees produced by > `fdt_overlay_apply()`). On a set of 47 Qualcomm SC7180 Trogdor > Chromebook board DTBs, `fdtfactor` without `-S` reduces total > uncompressed size from 7.69 MB to 932 KB (88.2% savings), while > `fdtfactor -S` reduces it to 634 KB (91.8% savings, saving an additional > 298 KB by omitting `/__local_fixups__` from `base.dtb`). > > Add a test case in `tests/run_tests.sh` verifying that `fdtfactor -S` > followed by `fdtoverlay` reproduces DTBs compiled with `-@` (without > `-L`) via `dtbs_equal_unordered`. > > Assisted-by: Gemini:gemini-pro-prerelease > Signed-off-by: Douglas Anderson Reviewed-by: David Gibson -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson