u-boot-brain/tools
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
..
binman binman: tegra: Adjust symbol calculation depending on end-at-4gb 2019-11-11 14:20:35 -05:00
buildman buildman: Convert to Python 3 2019-11-04 18:15:32 -07:00
concurrencytest binman: Run tests concurrently 2018-10-08 07:34:34 -06:00
dtoc dtoc: Convert fdt.py to Python 3 2019-11-04 18:15:32 -07:00
env fw_env: fix build error 2019-09-24 17:46:13 -04:00
gdb SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
kermit SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
libfdt fdt: Sync up to the latest libfdt 2019-11-04 18:15:32 -07:00
logos logos: Add the TechNexion's logo 2019-10-08 16:35:59 +02:00
omap SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
patman patman: Move to use Python 3 2019-11-04 18:15:32 -07:00
scripts tools: fix define2mk.sed to not add quotes around negative integers 2016-06-13 07:46:29 +09:00
.gitignore tools: Avoid creating symbolic links for tools/version.h 2019-10-28 13:32:51 -04:00
Makefile tools: remove easylogo and include/video_logo.h 2019-08-26 11:46:30 -04:00
aisimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
aisimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmel_pmecc_params.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmelimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bmp_logo.c bmp_logo: support CONFIG_DM_VIDEO 2019-07-29 00:20:31 +02:00
default_image.c imx: Kconfig: Reduce default CONFIG_CSF_SIZE 2019-10-08 16:36:36 +02:00
dumpimage.c tools: dumpimage: Clarify help 2019-02-01 14:13:46 -05:00
dumpimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
envcrc.c env: Rename environment.h to env_internal.h 2019-08-11 19:27:31 -04:00
fdt_host.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fdtgrep.c fdtgrep: Separate out checking of two allocations 2018-06-19 07:31:44 -04:00
file2include.c tools/file2include: don't use malloc.h for malloc 2018-11-26 22:52:12 -05:00
fit_check_sign.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_common.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_common.h tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
fit_image.c mkimage: Set correct FDT type and ramdisk architecture in FIT auto mode 2019-10-31 07:22:53 -04:00
fit_info.c tools: use read-only mmap in fit_check_sign 2019-05-18 12:32:02 -04:00
gen_eth_addr.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gen_ethaddr_crc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
genboardscfg.py kconfiglib: Update to the 12.14.0 release 2019-10-08 08:37:29 -04:00
getline.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
getline.h getline: split out for darwin systems 2010-01-26 00:07:13 +01:00
gpheader.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gpimage-common.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gpimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ifdtool.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
ifdtool.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ifwitool.c tools: ifwitool: Define __packed when it is not defined 2019-10-28 13:32:51 -04:00
image-host.c rsa: add a structure for the padding 2018-12-03 10:44:10 -05:00
imagetool.c fdt: Fix FIT header verification in mkimage and conduct same checks as bootm 2019-03-08 11:31:44 -05:00
imagetool.h fdt: Fix FIT header verification in mkimage and conduct same checks as bootm 2019-03-08 11:31:44 -05:00
img2srec.c treewide: remove unneeded semicolons 2017-06-16 10:11:38 -04:00
imx8image.c Revert "tools: imx8image: set dcd_skip to true" 2019-01-28 12:59:03 +01:00
imx8m_image.sh tools: imx8m_image: align spl bin image size 2019-10-08 16:36:36 +02:00
imx8mimage.c tools: imx8mimage: fix HDMI/FIT parsing 2019-10-08 16:35:16 +02:00
imx_cntr_image.sh tools: improve portability of imx_cntr_image.sh 2019-01-01 14:12:18 +01:00
imximage.c tools/imximage: get HAB information from header 2018-07-23 11:04:22 +02:00
jtagconsole Blackfin: jtagconsole: disable output processing 2010-07-25 15:17:23 -04:00
k3_fit_atf.sh arm: mach-k3: Add secure device build support 2019-04-26 17:51:51 -04:00
k3_gen_x509_cert.sh tools: k3_get_x509 cert: Add a script to generate x509 certificate for K3 devices 2019-05-09 20:22:04 -04:00
kwbimage.c kwbimage: fixing the issue with proper return code checking 2019-05-03 08:14:39 +02:00
kwbimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
kwboot.c tools: kwboot: Make kwboot more robust on a38x 2018-09-19 08:59:26 +02:00
lpc32xximage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microcode-tool x86: Add a script to process Intel microcode files 2014-12-18 17:26:08 -07:00
microcode-tool.py microcode_tool: Convert to Python 3 2019-11-04 18:15:32 -07:00
mingw_support.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mingw_support.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mips-relocs.c MIPS: make size of relocation table fixed but configurable 2018-11-02 22:39:07 +01:00
mkenvimage.c tools: mkenvimage: Always consider non-regular files 2019-07-18 11:31:26 -04:00
mkexynosspl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mkimage.c lib: rsa: add support to other openssl engine types than pkcs11 2019-07-18 11:31:23 -04:00
mkimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mksunxiboot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
moveconfig.py move_config: Convert to Python 3 2019-11-04 18:15:32 -07:00
mrvl_uart.sh SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mtk_image.c tools: mtk_image: replace strncpy(d, s, sizeof(d)) with snprintf() 2018-12-15 11:49:56 -05:00
mtk_image.h tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXX 2019-10-28 13:32:51 -04:00
mxsboot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxsimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxsimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ncb.c ncb: Check return value of write() 2009-04-28 01:16:46 +02:00
netconsole net: Make netconsole src and dest ports configurable 2012-09-24 13:17:24 -05:00
omapimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omapimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
os_support.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
os_support.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pbl_crc32.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pbl_crc32.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pblimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pblimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
prelink-riscv.c riscv: tools: Add big endian target support to prelink-riscv 2019-08-15 13:42:28 +08:00
prelink-riscv.inc riscv: tools: Handle addend to absolute reloc in prelink-riscv 2019-09-03 09:30:32 +08:00
proftool.c trace: do not limit trace buffer to 2GiB 2019-07-10 16:52:58 -06:00
relocate-rela.c SPDX: Convert all of our multiple license tags to Linux Kernel style 2018-05-07 10:24:31 -04:00
rkcommon.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rkcommon.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rkimage.c rockchip: Fix rkimage format for SPL boot over USB 2018-10-04 22:55:47 +02:00
rkmux.py rkmux: Convert to Python 3 2019-11-04 18:15:32 -07:00
rksd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rkspi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rmboard.py Add a simple script to remove boards 2019-07-10 16:52:58 -06:00
socfpgaimage.c tools: socfpga: fix sfp_verify_header 2018-10-03 12:56:50 +02:00
spl_size_limit.c imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 2019-10-08 16:36:37 +02:00
stm32image.c mkimage: change stm32image header to manage binary information 2019-05-23 11:36:47 +02:00
sunxi-spl-image-builder.c tools: sunxi: avoid read after end of string 2017-05-05 16:45:57 -04:00
ublimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ublimage.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ubsha1.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vybridimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
xway-swap-bytes.c MIPS: INCA-IP: rename inca-swap-bytes host tool 2011-07-31 23:25:41 +09:00
zynqimage.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynqmp_pm_cfg_obj_convert.py arm64: zynqmp: add tool to convert PMU config object .c to binary 2019-07-30 10:20:06 +02:00
zynqmp_psu_init_minimize.sh arm64: zynqmp: Do not remove dpll_prog from psu_init 2019-10-24 13:37:02 +02:00
zynqmpbif.c tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 2019-10-28 13:32:51 -04:00
zynqmpimage.c tools: zynqmpimage: Add bif support 2018-05-11 09:23:44 +02:00
zynqmpimage.h SPDX: Correct SPDX tags from recent xilinx merge 2018-05-11 14:54:57 -04:00