Re: [PATCH v2 08/10] fdtfactor: Add -S/--strip-local-fixups option

From: Doug Anderson

Date: Sun Nov 01 2026 - 17:12:15 EST


Hi Simon,

On Fri, Oct 30, 2026 at 5:23 AM Simon Glass <sjg@xxxxxxxxxxxx> wrote:
>
> > On a set of 47 Qualcomm SC7180 Trogdor Chromebook board DTBs,
> > `fdtfactor -S` reduces total uncompressed size from 7.69 MB to 634 KB
> > (91.8% savings).
>
> This compares against the unfactored DTBs, so it doesn't show what -S
> itself saves. Please can you also give the size without -S, so it is
> clear what the /__local_fixups__ in base.dtb costs?

Done. Updated the commit message to show both numbers: without `-S` the
47 Trogdor DTBs factor down from 7.69 MB to 932 KB (88.2% savings), and
with `-S` they factor down to 634 KB (91.8% savings, saving an additional
298 KB by omitting `/__local_fixups__` from `base.dtb`).


> > diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> > @@ -1238,6 +1238,28 @@ fdtfactor_tests () {
> > + # Strip local fixups (-S): verify that merged DTBs match DTBs compiled
> > + # with -@ (without -L), and that inputs lacking /__local_fixups__ are
> > + # rejected.
> > + for i in 1 2 3; do
> > + run_dtc_test -b 2 -@ -I dts -O dtb -o fdtfactor_board${i}.nolf.test.dtb \
> > + "$SRCDIR/fdtfactor_board${i}.dts"
> > + done
> > + run_wrap_error_test $PYTHON $FDTFACTOR -o fdtfactor_strip.test.dir \
> > + fdtfactor_board1.nolf.test.dtb fdtfactor_board2.test.dtb
>
> This rejection test has no -S, so it checks the -L requirement from
> the previous patch rather than anything added here. Since -S could
> easily be read as 'my inputs don't need -L', I think it is more useful
> to pass -S here, to show that it does not relax that requirement. The
> plain no-S case could then go into the previous patch with the other
> rejection tests.

Done. Moved the no-`-S` `.nolf.test.dtb` rejection test into the main
`fdtfactor` patch and updated this test to pass `-S`.


-Doug