Skip to content
Snippets Groups Projects
  1. Mar 28, 2022
    • Jérôme Carretero's avatar
      boot: image: fixup zstd decompression buffer initialization typo · 408e2d5a
      Jérôme Carretero authored
      
      The code was mistakenly initializing the input buffer twice.
      
      Tested to be working on BeagleBone by adjusting CONFIG_SYS_BOOTM_LEN to
      64MiB (probably works with less) and preparing uImage with:
      
       cat arch/arm/boot/Image \
        | zstd --ultra -22 --zstd=windowLog=22 \
        > linux.bin.zst
      
       mkimage -A arm -T kernel uImage -C zstd -d linux.bin.zst \
        -a 0x80008000 -e 0x80008000
      
      Without the windowLog restriction, bootm fails with a zstd decompression
      error 7 (window too large), which I haven't troubleshooted.
      
      There should be a bit more documentation on the feature...
      
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Fixes: 458b30af image: Update image_decomp() to avoid ifdefs
      408e2d5a
  2. Jan 19, 2022
  3. Jan 13, 2022
  4. Nov 15, 2021
  5. Nov 12, 2021
    • Thomas Huth's avatar
      Remove LYNX KDI remainders · 7e713067
      Thomas Huth authored
      
      The last board that used to set CONFIG_LYNXKDI has been removed in
      commit 242836a8 ("powerpc: ppc4xx: remove pcs440ep support"),
      doc/README.lynxkdi only talks about a MPC8260 board being supported,
      and the mpc8260 support has been removed four years ago in commit
      2eb48ff7 ("powerpc, 8260: remove support for mpc8260") already,
      and common/lynxkdi.c only consists of an "#error" statement these
      days, so it seems like the LYNX KDI code is dead code nowadays.
      Let's remove it now.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      7e713067
    • Simon Glass's avatar
      Create a new boot/ directory · 19a91f24
      Simon Glass authored
      
      Quite a lot of the code in common/relates to booting and images. Before
      adding more it seems like a good time to move the code into its own
      directory.
      
      Most files with 'boot' or 'image' in them are moved, except:
      
      - autoboot.c which relates to U-Boot automatically running a script
      - bootstage.c which relates to U-Boot timing
      
      Drop the removal of boot* files from the output directory, since this
      interfers with the symlinks created by tools and there does not appear
      to be any such file from my brief testing.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarArtem Lapkin <email2tema@gmail.com>
      Tested-by: default avatarArtem Lapkin <email2tema@gmail.com>
      19a91f24
  6. Oct 09, 2021
    • Simon Glass's avatar
      lz4: Use a private header for U-Boot · 2a2d8e94
      Simon Glass authored
      
      At present U-Boot has a header file called lz4.h for its own use. If the
      host has its own lz4 header file installed (e.g. from the 'liblz4-dev'
      package) then host builds will use that instead.
      
      Move the U-Boot file into its own directory, as is done with various
      other headers with the same problem.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      2a2d8e94
  7. Oct 08, 2021
  8. Oct 07, 2021
  9. Sep 23, 2021
  10. Aug 02, 2021
  11. Mar 01, 2021
  12. Feb 02, 2021
    • Simon Glass's avatar
      common: Drop asm/global_data.h from common header · 401d1c4f
      Simon Glass authored
      
      Move this out of the common header and include it only where needed.  In
      a number of cases this requires adding "struct udevice;" to avoid adding
      another large header or in other cases replacing / adding missing header
      files that had been pulled in, very indirectly.   Finally, we have a few
      cases where we did not need to include <asm/global_data.h> at all, so
      remove that include.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      401d1c4f
  13. Jan 12, 2021
  14. Oct 22, 2020
  15. Aug 27, 2020
    • Baruch Siach's avatar
      image: don't exceed gd->ram_top in bootm_size · 7f98b4ee
      Baruch Siach authored
      
      When board_get_usable_ram_top() limits gd->ram_top, env_get_bootm_size()
      must not exceed that limit. Otherwise, boot_relocate_fdt() might put fdt
      out of the allowed RAM range.
      
      The similar commit 8ce1f10c ("ARM: bootm: take into account
      gd->ram_top") exposed this bug.
      
      This fixes boot on Armada 8040 based Clearfog GT-8K where ram_top is set
      to 0x80000000 (2GB), but bi_dram[0].size might be up to 0xc0000000
      (3GB). Note the relocated fdt address (0xbfff4000) in the console output
      listed below:
      
      Found /extlinux/extlinux.conf
      Retrieving file: /extlinux/extlinux.conf
      62 bytes read in 21 ms (2 KiB/s)
      1:	linux
      Retrieving file: /extlinux/Image
      13740544 bytes read in 1266 ms (10.4 MiB/s)
      Retrieving file: /extlinux/armada-8040-clearfog-gt-8k.dtb
      33368 bytes read in 31 ms (1 MiB/s)
         Booting using the fdt blob at 0x4f00000
         Loading Device Tree to 00000000bfff4000, end 00000000bffff257 ... "Synchronous Abort" handler, esr 0x96000045
      elr: 000000000006e1cc lr : 0000000000068fd8 (reloc)
      elr: 000000007ffa91cc lr : 000000007ffa3fd8
      x0 : ffffffffffffffff x1 : 00000000bfffc258
      x2 : 0000000000000000 x3 : ffffffffffff7da7
      x4 : 0000000004f08258 x5 : 00000000bfff4000
      x6 : 00000000bfff4000 x7 : 000000000000000f
      x8 : 000000007fb23bf8 x9 : 0000000000000008
      x10: 00000000bffff257 x11: 00000000bffff257
      x12: 0000000000000000 x13: fffffffffffff000
      x14: 00000000bfff4000 x15: 0000000000000021
      x16: 000000007ff7bc38 x17: 0000000000000000
      x18: 000000007fb2add0 x19: 00000000bfff4000
      x20: 0000000004f00000 x21: 000000000000b258
      x22: 0000000058820000 x23: 0000000000000010
      x24: 000000007ffe3c40 x25: 000000007fb23cb8
      x26: 00000000c0000000 x27: 0000000000000000
      x28: 000000007fc3fd50 x29: 000000007fb23bd0
      
      Code: 54000061 aa0603e0 d65f03c0 38606882 (38206822)
      Resetting CPU ...
      
      Thanks to Patrice CHOTARD who directed me to the right way.
      
      Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
      7f98b4ee
  16. Aug 26, 2020
  17. Jul 17, 2020
    • Masahiro Yamada's avatar
      treewide: convert bd_t to struct bd_info by coccinelle · b75d8dc5
      Masahiro Yamada authored
      
      The Linux coding style guide (Documentation/process/coding-style.rst)
      clearly says:
      
        It's a **mistake** to use typedef for structures and pointers.
      
      Besides, using typedef for structures is annoying when you try to make
      headers self-contained.
      
      Let's say you have the following function declaration in a header:
      
        void foo(bd_t *bd);
      
      This is not self-contained since bd_t is not defined.
      
      To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h>
      
        #include <asm/u-boot.h>
        void foo(bd_t *bd);
      
      Then, the include direcective pulls in more bloat needlessly.
      
      If you use 'struct bd_info' instead, it is enough to put a forward
      declaration as follows:
      
        struct bd_info;
        void foo(struct bd_info *bd);
      
      Right, typedef'ing bd_t is a mistake.
      
      I used coccinelle to generate this commit.
      
      The semantic patch that makes this change is as follows:
      
        <smpl>
        @@
        typedef bd_t;
        @@
        -bd_t
        +struct bd_info
        </smpl>
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      b75d8dc5
  18. Jul 07, 2020
  19. May 19, 2020
  20. May 18, 2020
  21. Apr 17, 2020
  22. Feb 06, 2020
    • Simon Glass's avatar
      dm: core: Create a new header file for 'compat' features · 336d4615
      Simon Glass authored
      
      At present dm/device.h includes the linux-compatible features. This
      requires including linux/compat.h which in turn includes a lot of headers.
      One of these is malloc.h which we thus end up including in every file in
      U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
      which needs to use the system malloc() in some files.
      
      Move the compatibility features into a separate header file.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      336d4615
  23. Jan 24, 2020
  24. Jan 17, 2020
  25. Jan 07, 2020
    • Cristian Ciocaltea's avatar
      image: Add IH_OS_EFI for EFI chain-load boot · a031b03f
      Cristian Ciocaltea authored
      
      Add a new OS type to be used for chain-loading an EFI compatible
      firmware or boot loader like GRUB2, possibly in a verified boot
      scenario.
      
      Bellow is sample ITS file that generates a FIT image supporting
      secure boot. Please note the presence of 'os = "efi";' line, which
      identifies the currently introduced OS type:
      
      / {
          #address-cells = <1>;
      
          images {
              efi-grub {
                  description = "GRUB EFI";
                  data = /incbin/("bootarm.efi");
                  type = "kernel_noload";
                  arch = "arm";
                  os = "efi";
                  compression = "none";
                  load = <0x0>;
                  entry = <0x0>;
                  hash-1 {
                      algo = "sha256";
                  };
              };
          };
      
          configurations {
              default = "config-grub";
              config-grub {
                  kernel = "efi-grub";
                  signature-1 {
                      algo = "sha256,rsa2048";
                      sign-images = "kernel";
                  };
              };
          };
      };
      
      Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@gmail.com>
      Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      a031b03f
Loading