Skip to content
Snippets Groups Projects
  1. Feb 04, 2022
  2. Jan 24, 2022
  3. Nov 12, 2021
    • Simon Glass's avatar
      Create a new boot/ directory · 19a91f24
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      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: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarArtem Lapkin <email2tema@gmail.com>
      Tested-by: default avatarArtem Lapkin <email2tema@gmail.com>
      19a91f24
  4. Aug 31, 2021
  5. Aug 02, 2021
  6. Jul 14, 2021
    • Tom Rini's avatar
      kconfig / kbuild: Re-sync with Linux 4.20 · 473fc279
      Tom Rini authored
      
      Align Kconfig and Kbuild logic to Linux 4.20 release with minimal impact
      on files outside of this scope.
      
      Our previous Kconfig sync was done by commit 587e4a42 ("kconfig /
      kbuild: Re-sync with Linux 4.19").
      
      As part of this re-sync, a few related changes from previous Linux
      releases were found to have been missed and merged in, and are not in
      the following list.
      
      The imported Linux commits are:
      
      [From prior to v4.19]
      b1e0d8b70fa3 kbuild: Fix gcc -x syntax
      a4353898980c kconfig: add CC_IS_GCC and GCC_VERSION
      469cb7376c06 kconfig: add CC_IS_CLANG and CLANG_VERSION
      
      [From v4.19 to v4.20]
      487c7c7702ab kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally
      0d91bf584fe5 kbuild: remove old check for CFLAGS use
      25815cf5ffec kbuild: hide most of targets when running config or mixed targets
      00d78ab2ba75 kbuild: remove dead code in cmd_files calculation in top Makefile
      23066c3f4e21 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
      37c8a5fafa3b kbuild: consolidate Devicetree dtb build rules
      80463f1b7bf9 kbuild: add --include-dir flag only for out-of-tree build
      77ec0c20c7e0 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile
      74bc0c09b2da kbuild: remove user ID check in scripts/mkmakefile
      4fd61277f662 kbuild: do not pass $(objtree) to scripts/mkmakefile
      80d0dda3a4e5 kbuild: simplify command line creation in scripts/mkmakefile
      fb073a4b473e kbuild: add -Wno-pointer-sign flag unconditionally
      9df3e7a7d7d6 kbuild: add -Wno-unused-but-set-variable flag unconditionally
      69ea912fda74 kbuild: remove unneeded link_multi_deps
      7d0ea2524202 kbuild: use 'else ifeq' for checksrc to improve readability
      04c459d20448 kconfig: remove oldnoconfig target
      0085b4191f3e kconfig: remove silentoldconfig target
      3f80babd9ca4 kbuild: remove unused cc-fullversion variable
      2cd3faf87d2d merge_config.sh: Allow to define config prefix
      076f421da5d4 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
      6bbe4385d035 kconfig: merge_config: avoid false positive matches from comment lines
      
      [From post v4.20]
      885480b08469 Makefile: Move -Wno-unused-but-set-variable out of GCC only block
      
      There are a number of changes related to additional warnings as well as
      being able to drop cc-name entirely that have been omitted for now as
      additional work is required first.
      
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      473fc279
  7. May 24, 2021
    • Marek Behún's avatar
      build: support building with Link Time Optimizations · c1094987
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      Add plumbing for building U-Boot with Link Time Optimizations.
      
      When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive /
      --no-whole-archive group, otherwise some functions declared in assembly
      may not be resolved and linking may fail.
      
      Note: clang may throw away linker list symbols it thinks are unused when
      compiling with LTO. To force these symbols to be included, we refer to
      them via the __ADDRESSABLE macro in a C file generated from compiled
      built-in.o files before linking.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c1094987
  8. Jan 30, 2021
    • Simon Glass's avatar
      spl: Tidy up SPL/TPL malloc sizes · 1426174f
      Simon Glass authored
      
      The current help talks about relocation which doesn't apply to SPL and
      TPL. Update it to avoid confusion.
      
      Also make the TPL size default to the same as the SPL size, since this is
      more likely to be a useful value than the one used by U-Boot proper, which
      may be quite a bit larger.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1426174f
  9. Nov 09, 2020
  10. Oct 28, 2020
  11. Oct 21, 2020
    • Heinrich Schuchardt's avatar
      arm: sunxi: increase SYS_MALLOC_F_LEN · fb5b1678
      Heinrich Schuchardt authored and Jagan Teki's avatar Jagan Teki committed
      
      The current default of 0x400 for SYS_MALLOC_F_LEN is too small if any
      additional drivers marked as DM_FLAG_PRE_RELOC are loaded before
      relocation.
      
      CONFIG_RSA=y which is needed for UEFI secure boot or for FIT image
      verification loads the driver mod_exp_sw which has DM_FLAG_PRE_RELOC.
      
      CONFIG_LOG=Y is another setting requiring additional early malloc
      area, cf. log_init().
      
      When running pine64-lts_defconfig with CONFIG_RSA=y and debug UART enabled
      we see as output in main U-Boot
      
          alloc_simple() alloc space exhausted
      
      With this patch the default values of SYS_MALLOC_F_LEN and
      SPL_SYS_MALLOC_F_LEN on ARCH_SUNXI are raised to 0x2000.
      
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      fb5b1678
  12. Oct 09, 2020
  13. Oct 08, 2020
  14. Sep 22, 2020
  15. Aug 14, 2020
  16. Aug 06, 2020
  17. Aug 01, 2020
  18. Jul 29, 2020
    • Simon Glass's avatar
      rockchip: Convert evb-rk3288 over to use binman · a32dd071
      Simon Glass authored
      
      At present this board uses a custom script to produce the .its file.
      Update it to use binman instead. Binman can create all the images that
      are needed.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a32dd071
    • Simon Glass's avatar
      Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty · a8f3ace3
      Simon Glass authored
      
      At present we use the empty string to indicate that there is no FIT
      generator, but this doesn't allow an individual board to undefine it.
      Create a separate bool instead.
      
      Update the config of the boards which currently have an empty string.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a8f3ace3
    • Simon Glass's avatar
      x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM · 3be8ba5e
      Simon Glass authored
      
      This Kconfig is not needed anymore since U-Boot will build the ROM if the
      required binary blobs exist.
      
      The BUILD_ROM environment variable used to request that the ROM be built.
      Now this always happens if the required binary blobs are available. Update
      it to mean that U-Boot should fail if the ROM cannot be built. This
      behaviour should be compatible with how it used to work.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      3be8ba5e
    • Simon Glass's avatar
      x86: Change how selection of ROMs works · bcd4e6f3
      Simon Glass authored
      
      Most x86 boards build a u-boot.rom which is programmed into SPI flash. But
      this is not unique to x86. For example some rockchip boards can also boot
      from SPI flash.
      
      Also, at least on x86, binary blobs are sadly quite common. It is not
      possible to build a functional image without them, and U-Boot needs to
      know this at build time.
      
      Introduce a new CONFIG_HAS_ROM option which selects whether u-boot.rom is
      built and a new CONFIG_ROM_NEEDS_BLOBS option to indicate whether binary
      blobs are also needed. If they are not needed, it is safe to build the ROM
      always. Otherwise we still require the BUILD_ROM environment variable.
      
      For now this affects only x86, but future patches will enable this for
      rockchip too.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      bcd4e6f3
  19. Jul 28, 2020
  20. Jul 08, 2020
  21. Jul 01, 2020
    • Tom Rini's avatar
      kconfig: show compiler version text in the top comment · 61139e2a
      Tom Rini authored
      
      This is a side-port of commit 21c54b774744 ("kconfig: show compiler
      version text in the top comment") from Linux:
      
      "The kernel configuration phase is now tightly coupled with the compiler
      in use.  It will be nice to show the compiler information in Kconfig."
      
      We have already had the required makefile logic for this and had not
      included printing the value in various user and file visible places.
      
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      61139e2a
    • Tom Rini's avatar
      compilers: Introduce options for forcing inlining on SPL/TPL · 72c4d40d
      Tom Rini authored
      
      There are cases where when we allow the compiler to decide about making
      inline decisions rather than forcing them it can save us space.
      
      For now, we keep the default values for inlining that we have had
      historically.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      72c4d40d
    • Tom Rini's avatar
      compiler_types.h: Re-introduce CONFIG_OPTIMIZE_INLINING for U-Boot · 1f1a0f3d
      Tom Rini authored
      
      In the Linux kernel, support for forcing inline functions to be made
      inline, rather than allowing the compiler to make its own choice has
      been removed.  With respect to performance, modern GCC (and Clang) do a
      good job at deciding when to, or not to, inline code and there are no
      run-time requirements in Linux anymore.
      
      There is one downside to this, which is final binary size.  On average
      in U-Boot removing this support grows SPL by almost 1 kilobyte.  But
      there are cases where it shrinks the binary by making better inline
      choices than we had forced.
      
      Start by re-introducing CONFIG_OPTIMIZE_INLINING as a global which
      essentially reverts 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely")
      from Linux.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      1f1a0f3d
    • Tom Rini's avatar
      compiler*.h: sync include/linux/compiler*.h with Linux 5.7-rc5 · 67f51b40
      Tom Rini authored
      
      Copy these from Linux v5.7-rc5 tag.
      
      This brings in some handy new attributes and is otherwise important to
      keep in sync.
      
      We drop the reference to smp_read_barrier_depends() as it is not
      relevant on the architectures we support at this time, based on where
      it's implemented in Linux today.  We drop the call to kasan_check_read()
      as that is not relevant to U-Boot as well.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      67f51b40
    • Tom Rini's avatar
      kconfig: Add scripts/Kconfig.include from v4.19 · a9610bd8
      Tom Rini authored
      
      As part of re-syncing our Kconfig logic up to v4.19, we had missed
      adding this new file that includes helper macros.  To quote the upstream
      commit e1cfdc0e72fc ("kconfig: add basic helper macros to scripts/Kconfig.include"):
      
      Kconfig got text processing tools like we see in Make.  Add Kconfig
      helper macros to scripts/Kconfig.include like we collect Makefile
      macros in scripts/Kbuild.include.
      
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      a9610bd8
  22. Jun 15, 2020
  23. Jun 12, 2020
  24. May 15, 2020
  25. May 01, 2020
    • Marek Bykowski's avatar
      malloc: dlmalloc: add an ability for the malloc to be re-init/init multiple times · 9297e366
      Marek Bykowski authored and Tom Rini's avatar Tom Rini committed
      
      Malloc gets initialized with a call to mem_malloc_init() with the address
      the allocation starts to and its size. Currently it is not possible to
      move the malloc from one memory area to another as the malloc would eventually
      fail.
      
      This patch adds in the ability to re-init the malloc with the updated
      start address and the size.
      
      One of the use cases of this feature is SPL U-Boot running from within
      the static memory and calling to malloc init from within board_init_f():
      
      	arch/arm/cpu/armv8/start.S:reset vector
      	arch/arm/cpu/armv8/start.S:main()
      	arch/arm/lib/crt0_64.S:board_init_f()
      	board/<my_board>/common/spl.c:board_init_f()
              board/<my_board>/common/spl.c:mem_malloc_init((ulong)CONFIG_SYS_SPL_MALLOC_START,
                              CONFIG_SYS_SPL_MALLOC_SIZE);
      
      Shortly after the DDR (main) memory is init and ready we call to malloc init
      again but this time with the start address in the DDR memory and a much greater
      size for moving the allocation off the static to the DDR memory:
      
      	board/<my_board>/common/spl.c:mem_malloc_init((ulong)CONFIG_SPL_MALLOC_OFFSET,
      			CONFIG_SPL_MALLOC_SIZE);
      
      Where CONFIG_SYS_SPL_MALLOC_START and CONFIG_SPL_MALLOC_OFFSET are the start
      addresses of the malloc in the static and DDR memories respectively and
      CONFIG_SYS_SPL_MALLOC_SIZE=SZ_16K and CONFIG_SPL_MALLOC_SIZE=SZ_2M are
      the sizes of the mallocs in these memories. Note, now we have a much greater
      memory, enlarging from 16K to 2M, available for allocation.
      
      There is an alternative approach already existing in U-Boot with the use of
      an early (simplified) malloc and the proper (dlamalloc) malloc however
      necessitating managing the two mallocs whereas this approach proposes using
      a single dlmalloc.
      
      Signed-off-by: default avatarMarek Bykowski <marek.bykowski@gmail.com>
      9297e366
Loading