binman: Rename 'position' to 'offset'
authorSimon Glass <sjg@chromium.org>
Wed, 1 Aug 2018 21:22:37 +0000 (15:22 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 1 Aug 2018 22:30:06 +0000 (16:30 -0600)
commit3ab9598df714556b649048b2a387071253e9e731
tree55a61a2125ff40b15a96e47104402f06a91f5eb9
parent46d61a2f2aeefcd622c9678716429e68a3a98811
binman: Rename 'position' to 'offset'

After some thought, I believe there is an unfortunate naming flaw in
binman. Entries have a position and size, but now that we support
hierarchical sections it is unclear whether a position should be an
absolute position within the image, or a relative position within its
parent section.

At present 'position' actually means the relative position. This indicates
a need for an 'image position' for code that wants to find the location of
an entry without having to do calculations back through parents to
discover this image position.

A better name for the current 'position' or 'pos' is 'offset'. It is not
always an absolute position, but it is always an offset from its parent
offset.

It is unfortunate to rename this concept now, 18 months after binman was
introduced. However I believe it is the right thing to do. The impact is
mostly limited to binman itself and a few changes to in-tree users to
binman:

   tegra
   sunxi
   x86

The change makes old binman definitions (e.g. downstream or out-of-tree)
incompatible if they use the 'pos = <...>' property. Later work will
adjust binman to generate an error when it is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
44 files changed:
arch/arm/dts/sunxi-u-boot.dtsi
arch/arm/dts/tegra-u-boot.dtsi
arch/x86/dts/u-boot.dtsi
common/spl/spl.c
common/spl/spl_ram.c
include/spl.h
tools/binman/README
tools/binman/bsection.py
tools/binman/cmdline.py
tools/binman/control.py
tools/binman/elf.py
tools/binman/entry.py
tools/binman/etype/_testing.py
tools/binman/etype/intel_descriptor.py
tools/binman/etype/section.py
tools/binman/etype/u_boot_dtb_with_ucode.py
tools/binman/etype/u_boot_ucode.py
tools/binman/etype/u_boot_with_ucode_ptr.py
tools/binman/ftest.py
tools/binman/image.py
tools/binman/test/08_pack.dts
tools/binman/test/12_pack_inv_align.dts
tools/binman/test/14_pack_overlap.dts
tools/binman/test/21_image_pad.dts
tools/binman/test/24_sorted.dts
tools/binman/test/25_pack_zero_size.dts
tools/binman/test/27_pack_4gb_no_size.dts
tools/binman/test/28_pack_4gb_outside.dts
tools/binman/test/29_x86-rom.dts
tools/binman/test/30_x86-rom-me-no-desc.dts
tools/binman/test/31_x86-rom-me.dts
tools/binman/test/34_x86_ucode.dts
tools/binman/test/35_x86_single_ucode.dts
tools/binman/test/37_x86_no_ucode.dts
tools/binman/test/38_x86_ucode_missing_node.dts
tools/binman/test/39_x86_ucode_missing_node2.dts
tools/binman/test/40_x86_ucode_not_in_image.dts
tools/binman/test/44_x86_optional_ucode.dts
tools/binman/test/45_prop_test.dts
tools/binman/test/49_x86_ucode_spl.dts
tools/binman/test/53_symbols.dts
tools/binman/test/58_x86_ucode_spl_needs_retry.dts
tools/binman/test/u_boot_binman_syms
tools/binman/test/u_boot_binman_syms.c