1. 12 11月, 2019 1 次提交
    • S
      binman: tegra: Adjust symbol calculation depending on end-at-4gb · 7c150136
      Simon Glass 提交于
      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: NSimon Glass <sjg@chromium.org>
      Tested-by: NStephen Warren <swarren@nvidia.com>
      7c150136
  2. 15 10月, 2019 5 次提交
    • S
      binman: Clean up unnecessary code related to ELF test files · c9a0b275
      Simon Glass 提交于
      We use the Makefile for all ELF test files now, so drop all the code that
      checks whether to get the test file from the Makefile or from the git
      repo.
      
      Also add a comment to the Makefile indicating that it is run from binman.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c9a0b275
    • S
      binman: Use the Makefile for u_boot_binman_syms_bad · 8dc60f99
      Simon Glass 提交于
      Remove this file from git and instead build it using the Makefile.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      8dc60f99
    • S
      binman: Use the Makefile for u_boot_binman_syms · 1542c8b5
      Simon Glass 提交于
      Remove this file from git and instead build it using the Makefile.
      
      With this change a few things need to be adjusted:
      
      1. The 'notes' section no-longer appears at the start of the ELF file
      (before the code), so update testSymbols to adjust the offsets.
      
      2. The dynamic linker is disabled to avoid errors like:
      
          "Not enough room for program headers, try linking with -N"
      
      3. The interpreter note is moved to the end of the image, so that the
      binman symbols appear first.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      1542c8b5
    • S
      binman: Use the Makefile for u_boot_ucode_ptr · f514d8f2
      Simon Glass 提交于
      Remove this file from git and instead build it using the Makefile.
      
      Update tools.GetInputFilename() to support reading files from an absolute
      path, so that we can read the Elf test files easily. Also make sure that
      the temp directory is report in ELF tests as this was commented out.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f514d8f2
    • S
      binman: Use the Makefile to build ELF test files · 53e22bf3
      Simon Glass 提交于
      At present the ELF test files are checked into the U-Boot tree. This is
      covenient since the files never change and can be used on non-x86
      platforms. However it is not good practice to check in binaries and in
      this case it does not seem essential.
      
      Update the binman test-file Makefile to support having source in a
      different directory. Adjust binman to run it to build bss_data, as a
      start. We can add other files as needed.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      53e22bf3
  3. 13 12月, 2017 1 次提交
    • S
      binman: Add tests binaries with binman symbols · 5cfcf7e0
      Simon Glass 提交于
      For testing we need to build some ELF files containing binman symbols. Add
      these to the Makefile and check in the binaries:
      
         u_boot_binman_syms - normal, valid ELF file
         u_boot_binman_syms_bad - missing the __image_copy_start symbol
         u_boot_binman_syms_size - has a binman symbol with an invalid size
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5cfcf7e0
  4. 23 11月, 2017 2 次提交