Skip to content
Snippets Groups Projects
  1. Dec 09, 2024
  2. Nov 30, 2024
  3. Nov 25, 2024
  4. Nov 14, 2024
    • Quentin Schulz's avatar
      Makefile: fix empty MK_ARCH when using ccache · 04b1d842
      Quentin Schulz authored and Tom Rini's avatar Tom Rini committed
      
      One can use ccache by prefixing the typical CROSS_COMPILE value with
      "ccache " (e.g. "ccache aarch64-gnu-linux-" for Aarch64). This however
      makes the MK_ARCH empty because sed won't find a match anymore since it
      expects the CROSS_COMPILE value to start with the actual toolchain (with
      an unlimited number of white spaces before).
      
      This is failing builds since commit 7506c156 ("sandbox: Report host
      default-filename in native mode").
      
      Add "ccache" prefix to ignore but participate in the matching regex used
      by sed to identify the target architecture.
      
      Signed-off-by: default avatarQuentin Schulz <quentin.schulz@cherry.de>
      04b1d842
  5. Nov 13, 2024
  6. Nov 11, 2024
  7. Oct 28, 2024
  8. Oct 18, 2024
    • Marek Vasut's avatar
      dts: Add ability to build fallback DTBOs from arch/$(ARCH)/dts · a55c4836
      Marek Vasut authored
      
      Currently the enablement of OF_UPSTREAM results on the build system
      searching for DTs only in dts/upstream/ . There are platforms which
      use U-Boot specific DTBOs applied on top of U-Boot control DT during
      SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.
      
      Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and
      in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled, build
      this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs.
      
      Adjust top level Makefile so binman would search for .dtb and .dtbo in
      both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case
      in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled.
      
      Reviewed-by: default avatarSumit Garg <sumit.garg@linaro.org>
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      a55c4836
  9. Oct 17, 2024
    • Marek Vasut's avatar
      Makefile: Drop SPL_FIT_SOURCE support · 8efc954f
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      The SPL_FIT_SOURCE is long superseded by SPL_FIT_GENERATOR which
      is long superseded by binman, drop SPL_FIT_SOURCE support as there
      are no more users.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarPeter Robinson <pbrobinson@gmail.com>
      8efc954f
    • Sebastian Reichel's avatar
      usb: tcpm: add core framework · 1db4c0ac
      Sebastian Reichel authored and Marek Vasut's avatar Marek Vasut committed
      
      This adds TCPM framework in preparation for fusb302 support, which can
      handle USB power delivery messages. This is needed to solve issues with
      devices, that are running from a USB-C port supporting USB-PD, but not
      having a battery.
      
      Such a device currently boots to the kernel without interacting with
      the power-supply at all. If there are no USB-PD message replies within
      5 seconds, the power-supply assumes the peripheral is not capable of
      USB-PD. It usually takes more than 5 seconds for the system to reach
      the kernel and probe the I2C based fusb302 chip driver. Thus the
      system always runs into this state. The power-supply's solution to
      fix this error state is a hard reset, which involves removing the
      power from VBUS. Boards without a battery (or huge capacitors) will
      reset at this point resulting in a boot loop.
      
      This imports the TCPM framework from the kernel. The porting has
      originally been done by Rockchip using hardware timers and the Linux
      kernel's TCPM code from some years ago.
      
      I had a look at upgrading to the latest TCPM kernel code, but that
      beast became a lot more complex due to adding more USB-C features.
      I believe these features are not needed in U-Boot and with multiple
      kthreads and hrtimers being involved it is non-trivial to port them.
      Instead I worked on stripping down features from the Rockchip port
      to an even more basic level. Also the TCPM code has been reworked
      to avoid complete use of any timers (Rockchip used SoC specific
      hardware timers + IRQ to implement delayed work mechanism). Instead
      the delayed state changes are handled directly from the poll loop.
      
      Note, that (in contrast to the original Rockchip port) the state
      machine has the same hard reset quirk, that the kernel has - i.e.
      it avoids disabling the CC pin resistors for devices that are not
      self-powered. Without that quirk, the Radxa Rock 5B will not just
      end up doing a machine reset when a hard reset is triggered, but will
      not even recover, because the CPU will loose power and the FUSB302
      will keep this state because of leak voltage arriving through the RX
      serial pin (assuming a serial adapter is connected).
      
      This also includes a 'tcpm' command, which can be used to get
      information about the current state and the negotiated voltage
      and current.
      
      Co-developed-by: default avatarWang Jie <dave.wang@rock-chips.com>
      Signed-off-by: default avatarWang Jie <dave.wang@rock-chips.com>
      Tested-by: default avatarSoeren Moch <smoch@web.de>
      Tested-by: default avatarAnand Moon <linux.amoon@gmail.com>
      Reviewed-by: default avatarJonas Karlman <jonas@kwiboo.se>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      1db4c0ac
  10. Oct 16, 2024
    • Jerome Forissier's avatar
      net: split net into net{,-common,-legacy,-lwip} · 1d5d292b
      Jerome Forissier authored and Tom Rini's avatar Tom Rini committed
      
      Make net.h a wrapper which includes net-common.h and either
      net-legacy.h or net-lwip.h based on NET_LWIP. The function
      copy_filename() can be useful when NET_LWIP is enabled, therefore
      move it out of net/net.c which is built only when networking choice
      is NET and create a new file net/net-common.c.
      
      Signed-off-by: default avatarJerome Forissier <jerome.forissier@linaro.org>
      Acked-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      1d5d292b
    • Jerome Forissier's avatar
      net: introduce alternative implementation as net/lwip/ · 8cb33035
      Jerome Forissier authored and Tom Rini's avatar Tom Rini committed
      
      Prepare the introduction of the lwIP (lightweight IP) TCP/IP stack by
      adding a new net/lwip/ directory and the NET_LWIP symbol. Network
      support is either NO_NET, NET (legacy stack) or NET_LWIP. Subsequent
      commits will introduce the lwIP code, re-work the NETDEVICE integration
      and port some of the NET commands and features to lwIP.
      
      SPL_NET cannot be enabled when NET_LWIP=y. SPL_NET pulls some symbols
      that are part of NET (such as arp_init(), arp_timeout_check(),
      arp_receive(), net_arp_wait_packet_ip()). lwIP support in SPL may be
      added later.
      
      Similarly, DFU_TFTP and FASTBOOT are not compatible with NET_LWIP
      because of dependencies on net_loop(), tftp_timeout_ms,
      tftp_timeout_count_max and other NET things. Let's add a dependency on
      !NET_LWIP for now.
      
      SANDBOX can select NET_LWIP but doing so will currently disable the eth
      dm tests as well as the wget tests which have strong dependencies on the
      NET code.
      
      Other adjustments to Kconfig files are made to fix "unmet direct
      dependencies detected" for USB_FUNCTION_SDP and CMD_FASTBOOT when
      the default networking stack is set to NET_LWIP ("default NET_LWIP"
      instead of "default NET" in Kconfig).
      
      The networking stack is now a choice between NO_NET,
      NET and NET_LWIP. Therefore '# CONFIG_NET is not set' should be
      'CONFIG_NO_NET=y'. Adjust the defconfigs accordingly.
      
      Signed-off-by: default avatarJerome Forissier <jerome.forissier@linaro.org>
      Acked-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      8cb33035
    • Tom Rini's avatar
      Revert "Makefile: Drop SPL_FIT_GENERATOR / SPL_FIT_SOURCE support" changes · d5cab0d6
      Tom Rini authored
      
      :hile we had hoped to be able to remove these options finally, it was
      missed that zynq still requires these currently.
      
      This reverts commit 5b9261fb and
      commit 099b6df5.
      
      Reported-by: default avatarJonas Karlman <jonas@kwiboo.se>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      d5cab0d6
  11. Oct 15, 2024
  12. Oct 14, 2024
    • Raymond Mao's avatar
      mbedtls: add mbedtls into the build system · 13de8483
      Raymond Mao authored and Tom Rini's avatar Tom Rini committed
      Port mbedtls with adapted libc header files.
      Add mbedtls default config header file.
      Optimize mbedtls default config by disabling unused features to
      reduce the target size.
      Add mbedtls kbuild makefile.
      Add Kconfig skeleton and config submenu entry for selecting
      crypto libraries between mbedtls and legacy ones.
      Add the mbedtls include directories into the build system.
      Port u-boot hash functions as MbedTLS crypto alternatives and set
      it as default.
      
      Subsequent patches will separate those Kconfigs into pairs of
      _LEGACY and _MBEDTLS for controlling the implementations of legacy
      crypto libraries and MbedTLS ones respectively.
      
      The motivation of moving and adapting *INT* macros from kernel.h
      to limits.h is to fulfill the MbedTLS building requirement.
      The conditional compilation statements in MbedTLS expects the
      *INT* macros as constant expressions, thus expressions like
      `((int)(~0U >> 1))` will not work.
      
      Prerequisite
      ------------
      
      This patch series requires mbedtls git repo to be added as a
      subtree to the main U-Boot repo via:
      
      $ git subtree add --prefix lib/mbedtls/external/mbedtls \
            https://github.com/Mbed-TLS/mbedtls.git
      
       \
            v3.6.0 --squash
      
      Moreover, due to the Windows-style files from mbedtls git repo,
      we need to convert the CRLF endings to LF and do a commit manually:
      
      $ git add --renormalize .
      $ git commit
      
      Signed-off-by: default avatarRaymond Mao <raymond.mao@linaro.org>
      13de8483
  13. Oct 11, 2024
  14. Oct 08, 2024
  15. Oct 07, 2024
  16. Oct 02, 2024
  17. Sep 30, 2024
  18. Sep 16, 2024
  19. Sep 02, 2024
  20. Aug 19, 2024
  21. Aug 11, 2024
  22. Aug 09, 2024
    • Simon Glass's avatar
      sandbox: Add ELF file to VPL u-boot.img · 5b33660c
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present sandbox builds package up u-boot.bin in the .img file. This
      cannot actually be executed, since it is not an ELF file.
      
      For sandbox_vpl we want to be able to run the full boot flow.
      
      Adjust the build rule for sandbox_vpl to package the ELF file and
      thereby allow full testing of the sandbox transition from SPL to U-Boot
      proper.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5b33660c
  23. Aug 06, 2024
  24. Jul 31, 2024
  25. Jul 29, 2024
  26. Jul 23, 2024
  27. Jul 01, 2024
  28. Jun 24, 2024
  29. Jun 04, 2024
  30. May 24, 2024
    • Marek Vasut's avatar
      binman: Add nxp_imx8mcst etype for i.MX8M flash.bin signing · bc6beae7
      Marek Vasut authored and Fabio Estevam's avatar Fabio Estevam committed
      
      Add new binman etype which allows signing both the SPL and fitImage sections
      of i.MX8M flash.bin using CST. There are multiple DT properties which govern
      the signing process, nxp,loader-address is the only mandatory one which sets
      the SPL signature start address without the imx8mimage header, this should be
      SPL text base. The key material can be configured using optional DT properties
      nxp,srk-table, nxp,csf-crt, nxp,img-crt, all of which default the key material
      names generated by CST tool scripts. The nxp,unlock property can be used to
      unlock CAAM access in SPL section.
      
      Reviewed-by: default avatarTim Harvey <tharvey@gateworks.com>
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      bc6beae7
  31. May 21, 2024
    • Rasmus Villemoes's avatar
      scripts/setlocalversion: sync with linux v6.9 · 5c02350f
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      
      The changes upstream since the last sync (2ed1b242
      "scripts/setlocalversion: sync with linux 5.8") are
      
      (5) 548b8b5168c9 scripts/setlocalversion: make git describe output more reliable
          77a88274dc1a kbuild: replace LANG=C with LC_ALL=C
          2a73cce2dad3 scripts/setlocalversion: remove mercurial, svn and git-svn supports
          a2be76a352f1 scripts/setlocalversion: remove workaround for old make-kpkg
          ffaf62a8050b scripts/setlocalversion: add more comments to -dirty flag detection
          630ff0faf84e scripts/setlocalversion: factor out 12-chars hash construction
          042da426f8eb scripts/setlocalversion: simplify the short version part
          5df99bec210a scripts/setlocalversion: fix a bug when LOCALVERSION is empty
      (1) 7d153696e5db kbuild: do not include include/config/auto.conf from shell scripts
      (2) 129ab0d2d9f3 kbuild: do not quote string values in include/config/auto.conf
          f6e09b07cc12 kbuild: do not put .scmversion into the source tarball
          992ebfab2a75 setlocalversion: simplify the construction of the short version
          75280bdf49b2 setlocalversion: make indentation shallower
      (3) ec31f868ec67 setlocalversion: absorb $(KERNELVERSION)
          eed36d775177 setlocalversion: clean up the construction of version output
      (4) 6ab7e1f95e96 setlocalversion: use only the correct release tag for git-describe
          05e96e96a315 kbuild: use git-archive for source package creation
          3354c64d4184 scripts/setlocalversion: clean up stale comment
          01e89a4acefc scripts/setlocalversion: also consider annotated tags of the form vx.y.z-${file_localversion}
      
      The only thing U-Boot has been applying on top was to deal with not
      sourcing include/config/auto.conf but instead using awk to extract the
      right value. Commit (1) did a very similar thing upstream, so we no
      longer need to do that. However, upstream then went a step further (2)
      and changed the convention for what goes into auto.conf, so RHS no
      longer contain double-quotes. That commit thus changed the sed pattern
      to no longer match those quotes, but as U-Boot has not yet adopted
      that change, we have to deal with that. In order to be a little
      forward-compatible, I did that in a way that should work both ways:
      
       # version string from CONFIG_LOCALVERSION
      -config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
      +config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf | tr -d '"')
      
      Furthermore, (3) now requires that there is an appropriate
      KERNELVERSION environment variable set. One way to deal with that
      would be to just modify the script to use UBOOTVERSION instead, but
      for now I've instead opted to let the Makefile provide
      KERNELVERSION=$(UBOOTVERSION) to keep the setlocalversion changes
      minimal.
      
      That variable is further put to use in (4). Note that the logic for
      mapping *VERSION -> [upstream annotated tag to look for] works
      unchanged in U-Boot for the current versioning scheme 20XX.YY(-rcN)?.
      
      My motivation for wanting to do this sync is to get (4) and (5), in
      order to get the setlocalversion output both more predictable and
      consistent across different build environments, i.e. independent of
      random local .gitconfig settings, total number of git objects and/or
      existence of unrelated tags (possibly from some tracked fork).
      
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      5c02350f
    • Rasmus Villemoes's avatar
      Makefile: refactor ubootrelease target · 1bfce599
      Rasmus Villemoes authored and Tom Rini's avatar Tom Rini committed
      
      Instead of duplicating the contents of the filechk_uboot.release
      variable, use it directly.
      
      This is preparation for the next patch which will modify
      filechk_uboot.release, and reflects what the linux kernel does
      nowadays:
      
      kernelrelease:
      	@$(filechk_kernel.release)
      
      Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      1bfce599
Loading