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. 09 11月, 2019 1 次提交
  3. 05 11月, 2019 15 次提交
  4. 02 11月, 2019 4 次提交
  5. 31 10月, 2019 1 次提交
    • M
      mkimage: Set correct FDT type and ramdisk architecture in FIT auto mode · 12e288a8
      Michal Sojka 提交于
      When running the following command
      
          mkimage -f auto -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \
                  -d zImage -b zynq-microzed.dtb -i initramfs.cpio image.ub
      
      the type of fdt subimage is the same as of the main kernel image and
      the architecture of the initramfs image is not set. Such an image is
      refused by U-Boot when booting. This commits sets the mentioned
      attributes, allowing to use the "-f auto" mode in this case instead of
      writing full .its file.
      
      Following is the diff of mkimage output without and with this commit:
      
       FIT description: Kernel Image image with one or more FDT blobs
       Created:         Thu Sep 12 23:23:16 2019
        Image 0 (kernel-1)
         Description:
         Created:      Thu Sep 12 23:23:16 2019
         Type:         Kernel Image
         Compression:  uncompressed
         Data Size:    4192744 Bytes = 4094.48 KiB = 4.00 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: 0x00008000
         Entry Point:  0x00008000
        Image 1 (fdt-1)
         Description:  zynq-microzed
         Created:      Thu Sep 12 23:23:16 2019
      -  Type:         Kernel Image
      +  Type:         Flat Device Tree
         Compression:  uncompressed
         Data Size:    9398 Bytes = 9.18 KiB = 0.01 MiB
         Architecture: ARM
      -  OS:           Unknown OS
      -  Load Address: unavailable
      -  Entry Point:  unavailable
        Image 2 (ramdisk-1)
         Description:  unavailable
         Created:      Thu Sep 12 23:23:16 2019
         Type:         RAMDisk Image
         Compression:  Unknown Compression
         Data Size:    760672 Bytes = 742.84 KiB = 0.73 MiB
      -  Architecture: Unknown Architecture
      +  Architecture: ARM
         OS:           Linux
         Load Address: unavailable
         Entry Point:  unavailable
        Default Configuration: 'conf-1'
        Configuration 0 (conf-1)
         Description:  zynq-microzed
         Kernel:       kernel-1
         Init Ramdisk: ramdisk-1
         FDT:          fdt-1
         Loadables:    kernel-1
      Signed-off-by: NMichal Sojka <michal.sojka@cvut.cz>
      12e288a8
  6. 30 10月, 2019 2 次提交
  7. 29 10月, 2019 4 次提交
    • B
      tools: Avoid creating symbolic links for tools/version.h · 4d90f6cd
      Bin Meng 提交于
      When building U-Boot host tools for Windows from Microsoft Azure
      Pipelines, the following errors were seen:
      
        HOSTCC  tools/mkenvimage.o
        In file included from tools/mkenvimage.c:25:
        ./tools/version.h:1:1: error: expected identifier or ‘(’ before ‘.’ token
           1 | ../include/version.h
             | ^
        tools/mkenvimage.c: In function ‘main’:
        tools/mkenvimage.c:117:4: warning: implicit declaration of function ‘usage’ [-Wimplicit-function-declaration]
         117 |    usage(prg);
             |    ^~~~~
        tools/mkenvimage.c:120:35: error: ‘PLAIN_VERSION’ undeclared (first use in this function)
         120 |    printf("%s version %s\n", prg, PLAIN_VERSION);
             |                                   ^~~~~~~~~~~~~
        tools/mkenvimage.c:120:35: note: each undeclared identifier is reported only once for each function it appears in
        make[2]: *** [scripts/Makefile.host:114: tools/mkenvimage.o] Error 1
      
      It turns out tools/version.h is a symbolic link and with Windows
      default settings it is unsupported hence the actual content of
      tools/version.h is not what file include/version.h has, but the
      the linked file path, which breaks the build.
      
      To fix this, remove the symbolic links for tools/version.h. Instead
      we perform a copy from include/version.h during the build.
      Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
      4d90f6cd
    • B
      tools: ifwitool: Define __packed when it is not defined · ccd4398f
      Bin Meng 提交于
      Some compilers may provide __packed define for us.
      Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
      ccd4398f
    • B
      tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 · afd3bf43
      Bin Meng 提交于
      __swab32() is a Linux specific macro defined in linux/swab.h. Let's
      use the compiler equivalent builtin function __builtin_bswap32() for
      better portability.
      Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
      afd3bf43
    • B
      tools: mtk_image.h: Use portable uintXX_t instead of linux-specific __leXX · a7c9a65e
      Bin Meng 提交于
      __leXX has Linux kernel specific __attribute__((bitwise)) which is
      not portable. Use corresponding uintXX_t instead.
      Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
      a7c9a65e
  8. 28 10月, 2019 1 次提交
  9. 24 10月, 2019 1 次提交
  10. 15 10月, 2019 10 次提交