u-boot-brain/tools/binman/etype
Simon Glass 7c15013639 binman: tegra: Adjust symbol calculation depending on end-at-4gb
A recent change adjusted the symbol calculation to work on x86 but broke
it for Tegra. In fact this is because they have different needs.

On x86 devices the code is linked to a ROM address and the end-at-4gb
property is used for the image. In this case there is no need to add the
base address of the image, since the base address is already built into
the offset and image-pos properties.

On other devices we must add the base address since the offsets start at
zero.

In addition the base address is currently added to the 'offset' and 'size'
values. It should in fact only be added to 'image-pos', since 'offset' is
relative to its parent and 'size' is not actually an address. This code
should have been adjusted when support for 'image-pos' and 'size' was
added, but it was not.

To correct these problems:
- move the code that handles adding the base address to section.py, which
  can check the end-at-4gb property and which property
  (offset/size/image-pos) is being read
- add the base address only when needed (only for image-pos and not if the
  image uses end-at-4gb)
- add a note to the documentation
- add a separate test to cover x86 behaviour

Fixes: 15c981cc (binman: Correct symbol calculation with non-zero image base)

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
2019-11-11 14:20:35 -05:00
..
__init__.py binman: Allow easy importing of entry modules 2019-07-24 12:54:08 -07:00
_testing.py binman: Update the _testing entry to support shrinkage 2019-07-29 09:38:06 -06:00
blob_dtb.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
blob_named_by_arg.py binman: Add support for a cros_ec image 2018-08-01 16:30:48 -06:00
blob.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
cbfs.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
cros_ec_rw.py binman: Add support for a cros_ec image 2018-08-01 16:30:48 -06:00
fdtmap.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
files.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
fill.py binman: Adjust Entry to read the node in a separate call 2019-07-29 09:38:05 -06:00
fmap.py binman: Adjust fmap to ignore CBFS files 2019-07-29 09:38:06 -06:00
gbb.py binman: Use items() instead of iteritems() 2019-07-10 16:52:45 -06:00
image_header.py binman: Take account of skip-at-start with image-header 2019-10-08 13:57:44 +08:00
intel_cmc.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
intel_descriptor.py binman: Fix entry comment for Intel descriptor 2019-10-15 08:40:02 -06:00
intel_fit_ptr.py binman: Add support for Intel FIT 2019-10-15 08:40:02 -06:00
intel_fit.py pylibfdt: Convert to Python 3 2019-11-04 18:15:32 -07:00
intel_fsp_m.py binman: Fix up comment in intel-fsp-m 2019-11-02 18:00:51 +08:00
intel_fsp_s.py binman: Add support for Intel FSP-S 2019-11-02 18:00:51 +08:00
intel_fsp_t.py binman: Add support for Intel FSP-T 2019-11-02 18:00:51 +08:00
intel_fsp.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
intel_ifwi.py binman: Support writing symbols into entries within an IFWI 2019-10-15 08:40:02 -06:00
intel_me.py binman: Don't assume there is an ME region 2019-07-23 20:27:57 -07:00
intel_mrc.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
intel_refcode.py binman: Add support for Intel reference code 2018-10-22 17:51:45 +08:00
intel_vbt.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
intel_vga.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
powerpc_mpc85xx_bootpg_resetvec.py binman: Add support for PowerPC mpc85xx 'bootpg + resetvec' entry 2018-09-27 10:13:51 -07:00
section.py binman: tegra: Adjust symbol calculation depending on end-at-4gb 2019-11-11 14:20:35 -05:00
text.py binman: Allow text directly in the node 2019-07-23 20:27:57 -07:00
u_boot_dtb_with_ucode.py binman: Allow use of help and entry-docs without libfdt 2019-10-15 08:40:02 -06:00
u_boot_dtb.py binman: Adjust GetFdt() to be keyed by etype 2019-07-29 09:38:05 -06:00
u_boot_elf.py binman: Set the pathname correctly for ELF files 2018-11-20 19:14:22 -07:00
u_boot_img.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
u_boot_nodtb.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
u_boot_spl_bss_pad.py binman: Handle repeated bytes for Python 3 2019-07-10 16:52:58 -06:00
u_boot_spl_dtb.py binman: Adjust GetFdt() to be keyed by etype 2019-07-29 09:38:05 -06:00
u_boot_spl_elf.py binman: Correct comment in u_boot_spl_elf 2019-07-23 20:27:58 -07:00
u_boot_spl_nodtb.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
u_boot_spl_with_ucode_ptr.py binman: Support x86 microcode in TPL 2018-09-29 11:49:35 -06:00
u_boot_spl.py binman: Allow symbols to be resolved inside sections 2019-10-15 08:40:02 -06:00
u_boot_tpl_dtb_with_ucode.py binman: Adjust GetFdt() to be keyed by etype 2019-07-29 09:38:05 -06:00
u_boot_tpl_dtb.py binman: Adjust GetFdt() to be keyed by etype 2019-07-29 09:38:05 -06:00
u_boot_tpl_elf.py binman: Support ELF files for TPL 2019-07-23 20:27:58 -07:00
u_boot_tpl_with_ucode_ptr.py binman: Support x86 microcode in TPL 2018-09-29 11:49:35 -06:00
u_boot_tpl.py binman: Allow symbols to be resolved inside sections 2019-10-15 08:40:02 -06:00
u_boot_ucode.py binman: Convert to use bytes type 2019-07-10 16:52:58 -06:00
u_boot_with_ucode_ptr.py binman: Allow entries to expand after packing 2019-07-24 12:54:08 -07:00
u_boot.py binman: Expand documentation for entries 2018-08-01 16:30:48 -06:00
vblock.py binman: Convert to use bytes type 2019-07-10 16:52:58 -06:00
x86_reset16_spl.py binman: Add support for an x86 'reset' section 2019-10-15 08:40:02 -06:00
x86_reset16_tpl.py binman: Add support for an x86 'reset' section 2019-10-15 08:40:02 -06:00
x86_reset16.py binman: Add support for an x86 'reset' section 2019-10-15 08:40:02 -06:00
x86_start16_spl.py binman: x86: Separate out 16-bit reset and init code 2019-10-15 08:40:02 -06:00
x86_start16_tpl.py binman: x86: Separate out 16-bit reset and init code 2019-10-15 08:40:02 -06:00
x86_start16.py binman: x86: Separate out 16-bit reset and init code 2019-10-15 08:40:02 -06:00