Skip to content
Snippets Groups Projects
  1. 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
  2. Nov 09, 2020
  3. Oct 28, 2020
  4. 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
  5. Oct 09, 2020
  6. Oct 08, 2020
  7. Sep 22, 2020
  8. Aug 14, 2020
  9. Aug 06, 2020
  10. Aug 01, 2020
  11. 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
  12. Jul 28, 2020
  13. Jul 08, 2020
  14. 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
  15. Jun 15, 2020
  16. Jun 12, 2020
  17. May 15, 2020
  18. 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
  19. Apr 24, 2020
  20. Apr 17, 2020
  21. Apr 03, 2020
    • Michal Simek's avatar
      arch: Add explicit linker script for u-boot-elf · e14ba8a5
      Michal Simek authored and Tom Rini's avatar Tom Rini committed
      Commit f4dc714a ("arm64: Turn u-boot.bin back into an ELF file after
      relocate-rela")
      introduce REMAKE_ELF option to recreate u-boot.elf from u-boot ->
      u-boot.bin + DT -> u-boot.elf.
      
      The best is to ilustrate it from make V=1 output
        cat u-boot-nodtb.bin dts/dt.dtb > u-boot-dtb.bin
        cp u-boot-dtb.bin u-boot.bin
      aarch64-linux-gnu-objcopy -I binary -B aarch64 -O elf64-littleaarch64  u-boot.bin u-boot-elf.o
        aarch64-linux-gnu-ld.bfd u-boot-elf.o -o u-boot.elf --defsym="_start"=0x8000000 -Ttext=0x8000000
      
      Last command has no explicit linker script passed that's why toolchain
      internal linker script is used.
      In Binutils 2.32 case it contains SIZEOF_HEADERS symbol which has changed
      behavior by commit
      https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=64029e93683a266c38d19789e780f3748bd6a188
      which result in situation that program headers has changed from
      (xilinx_zynqmp_mini_defconfig)
      
      Program Headers:
        Type           Offset             VirtAddr       ...
      e14ba8a5
  22. Mar 18, 2020
    • André Przywara's avatar
      sunxi: Move common defconfig options to Kconfig · 48313fe5
      André Przywara authored and Jagan Teki's avatar Jagan Teki committed
      
      Some config symbols are found in *almost* every _defconfig file for
      Allwinner boards, because those options are actually a platform choice,
      and not a per-board decision.
      Some of these options are older, some have recently been added.
      
      Move those options to be set for all Allwinner boards in their
      respective Kconfig files.
      
      The rationales are as follows:
      - NR_DRAM_BANKS: All Allwinner SoC map DRAM at one contiguous region of
        address space only, starting at 1 GB. So it's always one bank.
      - SPL_{DOS,EFI}_PARTITION: The Allwinner SPL does only support raw MMC
        accesses, we don't care about filesystems or partitions in there, so
        there is no need to define those symbols at all.
      - USE_PREBOOT: We start USB early when a keyboard is configured, using the
        preboot env variable, so we need to set this variable.
      - SYS_RELOC_GD_ENV_ADDR: We don't specify any ENV_ADDR, so need this
        symbol to be set (according to 8d8ee47e).
      - SYS_USB_EVENT_POLL_VIA_INT_QUEUE: According to commit eab9433a,
        specifying this reduces the latency of the USB keyboard handling, so
        this was formerly enabled in config headers for all Allwinner boards.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
      Tested-by: Jagan Teki <jagan@amarulasolutions.com> # Amarula A64-Relic
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      48313fe5
  23. Mar 16, 2020
    • Tom Rini's avatar
      kconfig / kbuild: re-sync with Linux 4.18 · 5972ff07
      Tom Rini authored
      
      Align Kconfig and Kbuild logic to Linux 4.18 release with minimal impact
      on files outside of this scope.
      
      Our previous Kconfig sync was done by commit e91610da ("kconfig:
      re-sync with Linux 4.17-rc4").
      
      A very small number of changes upstream since our sync with v4.17-rc4
      that exist in the v4.18 release have already been applied here and have
      been omitted from the list in this commit (and are readily available in
      our own git history).
      
      The imported Linux commits are:
      [From prior to v4.17-rc4]
      39a33ff80a25 kbuild: remove cc-option-align
      db547ef19064 Kbuild: don't add obj tree in additional includes
      b999596b963a Kbuild: don't add ../../ to include path
      
      [From v4.17 to v4.18]
      b3aa58d2e85d fixdep: suppress consecutive / from file paths in dependency list files
      74656b682902 kbuild: disable new dtc graph and unit-address warnings
      74d931716151 genksyms: remove symbol prefix support
      e6ecfb45072c kbuild: do not display CHK for filechk
      0b669a5076fd kconfig: refactor Qt package checks for building qconf
      b464ef583dc7 kconfig: refactor GTK+ package checks for building gconf
      1c5af5cf9308 kconfig: refactor ncurses package checks for building mconf and nconf
      694c49a7c01c kconfig: drop localization support
      96f60dfa5819 trace: Use -mcount-record for dynamic ftrace
      bb222ceeb327 kconfig: remove string expansion in file_lookup()
      96d8e48da55a kconfig: remove string expansion for mainmenu after yyparse()
      5b31a9746756 kconfig: remove sym_expand_string_value()
      137c0118a900 kconfig: make default prompt of mainmenu less specific
      e298f3b49def kconfig: add built-in function support
      2fd5b09c201e kconfig: add 'shell' built-in function
      9de071536c87 kconfig: begin PARAM state only when seeing a command keyword
      9ced3bddec08 kconfig: support user-defined function and recursively expanded variable
      1175c02506ff kconfig: support simply expanded variable
      ed2a22f277c6 kconfig: support append assignment operator
      82bc8bd82e5c kconfig: expand lefthand side of assignment statement
      1d6272e6fe43 kconfig: add 'info', 'warning-if', and 'error-if' built-in functions
      a702a6176e2f kconfig: add 'filename' and 'lineno' built-in variables
      915f64901eb3 kconfig: error out if a recursive variable references itself
      2bece88f89fa kconfig: test: add Kconfig macro language tests
      21c54b774744 kconfig: show compiler version text in the top comment
      59f7b5847b0c kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice
      145167650b96 kbuild: add endianness flag to CHEKCFLAGS
      1f2f01b122d7 kbuild: add machine size to CHECKFLAGS
      d6a0c8a1326b kconfig: Add testconfig into make help output
      bb6d83dde191 kbuild: Move last word of nconfig help to the previous line
      8593080c0fcf kconfig: fix localmodconfig
      ed7d40bc67b8 tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount
      b2d00d7c61c8 kconfig: fix line numbers for if-entries in menu tree
      ecd53ac2f2c6 kconfig: handle P_SYMBOL in print_symbol()
      73d1c580f92b kconfig: loop boundary condition fix
      48f6e3cf5bc6 kbuild: do not drop -I without parameter
      bd412d81b7ea kbuild: .PHONY is not a variable, but PHONY is
      6916162c7308 kbuild: remove duplicated comments about PHONY
      
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5972ff07
  24. Mar 12, 2020
  25. Feb 04, 2020
  26. Jan 17, 2020
Loading