Skip to content
Snippets Groups Projects
  1. 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           PhysAddr
                       FileSiz            MemSiz              Flags  Align
        LOAD           0x0000000000010000 0x00000000fffc0000 0x00000000fffc0000
                       0x0000000000018918 0x0000000000018918  RW     0x10000
      
      to
      
      Program Headers:
        Type           Offset             VirtAddr           PhysAddr
                       FileSiz            MemSiz              Flags  Align
        LOAD           0x0000000000000000 0x00000000fffb0000 0x00000000fffb0000
                       0x0000000000028918 0x0000000000028918  RW     0x10000
      
      Xilinx tools like XSDB or Bootgen are using program headers for loading ELF
      to the right location and by above binutils change ELF is loaded to
      incorrect location.
      
      The patch is explicitly use u-boot-elf.lds (just cat now) for u-boot.elf
      recreation which is called when REMAKE_ELF is setup.
      By purpose u-boot-elf.lds doesn't contain OUTPUT_FORMAT/OUTPUT_ARCH to be
      able to use by all archs.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Daniel Schwierzeck's avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Tested-By: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
      e14ba8a5
  2. 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
  3. 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
  4. Mar 12, 2020
  5. Feb 04, 2020
  6. Jan 17, 2020
  7. Jan 14, 2020
    • Michal Simek's avatar
      arm64: zynqmp: Add support for u-boot.itb generation with ATF · 5b21d648
      Michal Simek authored
      
      Follow i.MX, Sunxi, RISC-V and Rockchip to generate u-boot.itb which
      includes U-Boot proper, ATF and DTBs in FIT format. ZynqMP supports FIT for
      quite a long time but with using out of tree solution. The patch is filling
      this gap.
      
      Tested on zcu102, zcu104 and zcu100/Ultra96.
      
      zcu100/Ultra96 v2.2 ATF build by:
      make DEBUG=0 ZYNQMP_CONSOLE=cadence1 RESET_TO_BL31=1 PLAT=zynqmp bl31
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      5b21d648
  8. Jan 07, 2020
  9. Dec 15, 2019
  10. Dec 06, 2019
  11. Nov 23, 2019
  12. Nov 07, 2019
    • Simon Goldschmidt's avatar
      Kconfig add config ERR_PTR_OFFSET · 93db2b83
      Simon Goldschmidt authored and Tom Rini's avatar Tom Rini committed
      
      Some U-Boot pointers have redundant information, so we can use a scheme
      where we can return either an error code or a pointer with the same
      return value. The default implementation just casts the pointer to a
      number, however, this may fail on platforms where the end of the address
      range is used for valid pointers (e.g. 0xffffff00 is a valid heap pointer
      in socfpga SPL). For such platforms, this value provides an upper range
      of those error pointer values - up to 'MAX_ERRNO' bytes below this value
      must be unused/invalid addresses.
      
      Signed-off-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
      93db2b83
  13. Oct 08, 2019
  14. Aug 26, 2019
  15. Aug 23, 2019
  16. Jul 11, 2019
  17. Jun 26, 2019
  18. Jun 14, 2019
  19. Jun 13, 2019
  20. Jun 11, 2019
  21. Jun 07, 2019
    • Simon Goldschmidt's avatar
      spl: add overall SPL size check · 2577015d
      Simon Goldschmidt authored and Tom Rini's avatar Tom Rini committed
      
      This adds a size check for SPL that can dynamically check generated
      SPL binaries (including devicetree) for a size limit that ensures
      this image plus global data, heap and stack fit in initial SRAM.
      
      Since some of these sizes are not available to make, a new host tool
      'spl_size_limit' is added that dumps the resulting maximum size for
      an SPL binary to stdout. This tool is used in toplevel Makefile to
      implement the size check on SPL binaries.
      
      Signed-off-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
      2577015d
    • Heinrich Schuchardt's avatar
      configs: define CONFIG_SPL_SIZE_LIMIT · 0a0f2314
      Heinrich Schuchardt authored and Tom Rini's avatar Tom Rini committed
      
      A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
      the board specific maximum size for the SPL file.
      
      Use Makefile function size_check() to implement the test.
      
      Depending on the size of CONFIG_SPL_SIZE_LIMIT an error like the following
      is thrown:
      
      spl/u-boot-spl.bin exceeds file size limit:
        limit:  30720 bytes
        actual: 33426 bytes
        excess: 2706 bytes
      make: *** [Makefile:1663: spl/u-boot-spl.bin] Error 1
      
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      0a0f2314
  22. May 28, 2019
  23. May 23, 2019
  24. May 21, 2019
    • Marek Vasut's avatar
      ARM: rmobile: Add recovery SPL for R-Car Gen3 · 5602330d
      Marek Vasut authored
      
      Build an SPL which can be started via SCIF download mode on R-Car Gen3
      and allows loading and executing U-Boot uImage with the next stage code.
      This is also useful for starting e.g. ATF BL2, which inits the hardware
      and returns to the U-Boot SPL, which can then load e.g. U-Boot proper.
      
      The H3, M3-W, M3-N SoCs have plenty of SRAM for storing the U-Boot SPL
      while the payload, e.g. ATF BL2, executes, so there is no problem here.
      
      However, E3 and D3 have much less SRAM, hence the loader uses a trick
      where it copies itself beyond the area used by BL2 and executes from
      there. That area is 32kiB large and not enough to hold U-Boot SPL, BSS,
      stack and malloc area, so the later two are placed at +0x4000 offset
      from start of SRAM, another area not used by ATF BL2. To make things
      even more complicated, the SCIF loader cannot load to the upper 32kiB
      of the SRAM directly, hence the copying approach.
      
      Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      5602330d
    • Mario Six's avatar
      mpc83xx: Get rid of CONFIG_83XX_CLKIN · ff3bb0c4
      Mario Six authored
      
      MPC83xx uses CONFIG_83XX_CLKIN instead of CONFIG_SYS_CLK_FREQ to set the
      system clock. To migrate the architecture, we can replace
      CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ.
      
      To do this
      * replace all occurrences of CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ
      * set CONFIG_SYS_CLK_FREQ to the old value of CONFIG_83XX_CLKIN in all
        MPC83xx config files
      
      Signed-off-by: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      ff3bb0c4
  25. May 18, 2019
  26. May 08, 2019
  27. Apr 09, 2019
    • Stefan Roese's avatar
      Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary · 9ea6f718
      Stefan Roese authored
      
      This patch adds the CONFIG_SPL_IMAGE option to select the SPL image that
      shall be used to generate the combined SPL + U-Boot image. The default
      value is the current value "spl/u-boot-spl.bin".
      
      This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets
      which use SPL NAND support (boot from NAND). For these build targets the
      combined image "u-boot-with-spl.bin" is now automatically generated and
      can be programmed into NAND as one single image (vs. SPL image and U-Boot
      as 2 separate images).
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      9ea6f718
  28. Mar 21, 2019
  29. Feb 11, 2019
  30. Feb 02, 2019
  31. Jan 18, 2019
  32. Jan 01, 2019
  33. Dec 13, 2018
  34. Dec 03, 2018
  35. Dec 02, 2018
Loading