Skip to content
Snippets Groups Projects
  1. Apr 25, 2022
  2. Apr 23, 2022
    • Tom Rini's avatar
      Merge branch '2022-04-22-assorted-updates' · 9bb99fa9
      Tom Rini authored
      - Add "-q" to fdt addr and use it in distro_bootcmd to make the user
        experience less scary reading in normal try/fail cases.
      - Let the adc update an environment variable like many other commands do
      - Fix TPL SEPARATE_BSS check when locating DTB
      - Allow ":" in PXE file names again
      - Two Apple M1 fixes
      9bb99fa9
  3. Apr 22, 2022
    • Mark Kettenis's avatar
      arm: apple: Point stdout-path to framebuffer when keyboard present · a609353e
      Mark Kettenis authored and Tom Rini's avatar Tom Rini committed
      
      Unless you have a spare Apple Silicon machine, getting access to
      the serial port on Apple Silicon machines requires special
      hardware. Given that most machines come with a built-in screen
      the framebuffer is likely to be the most convenient output device
      for most users. While U-Boot will output to both serial and
      framebuffer, OSes might not. Therefore set stdout-path to point
      at /chosen/framebuffer when a keyboard is connected to the machine.
      
      This behaviour can be overridden by setting the "stdout" variable
      in the U-Boot environment. I addition to that keep the serial
      console as the default when running under the m1n1 hypervisor.
      The m1n1 hypervisor virtualizes the serial port such that it
      can be easily accessed from any other machine with a USB port.
      
      Signed-off-by: default avatarMark Kettenis <kettenis@openbsd.org>
      Reviewed-by: default avatarJanne Grunau <j@jannau.net>
      Tested-by: default avatarJanne Grunau <j@jannau.net>
      a609353e
    • Mark Kettenis's avatar
      arm: apple: Don't clear framebuffer · 4a8d0711
      Mark Kettenis authored and Tom Rini's avatar Tom Rini committed
      
      Enable CONFIG_NO_FB_CLEAR to preserve the Asahi logo. Since that
      logo is drawn on a black background also enable
      CONFIG_SYS_WHITE_ON_BLACK such that text printed by U-Boot is still
      visible.
      
      Signed-off-by: default avatarMark Kettenis <kettenis@openbsd.org>
      4a8d0711
    • Lyle Franklin's avatar
      Allow colon in PXE bootfile URLs · 85f8e03b
      Lyle Franklin authored and Tom Rini's avatar Tom Rini committed
      - U-boot's PXE flow supports prefixing your bootfile name with an
        IP address to fetch from a server other than the DHCP server,
        e.g. `hostIPaddr:bootfilename`:
        https://github.com/u-boot/u-boot/commit/a93907c43f847f076dd0e34ee3b69b5e8e6d0d29
      
      
      - However, this breaks bootfile paths which contain a colon, e.g.
        `f0:ad:4e:10:1b:87/7/pxelinux.cfg/default`
      - This patch checks whether the `hostIPaddr` prefix is a valid
        IP address before overriding the serverIP otherwise the whole
        bootfile path is preserved
      
      Signed-off-by: default avatarLyle Franklin <lylejfranklin@gmail.com>
      85f8e03b
    • Peter Hoyes's avatar
      fdt: Add -q option to fdt addr for distro_bootcmd · e9496ec3
      Peter Hoyes authored and Tom Rini's avatar Tom Rini committed
      
      distro_bootcmd uses this construct a few times to test $fdt_addr_r,
      and fall back on $fdtcontroladdr if not set/invalid:
      
          if fdt addr ${fdt_addr_r}; then
              ...
          else
              ...
          fi
      
      If the `fdt addr` test fails, it prints the following  message on the
      console, suggesting there is an error when there is not:
      
          libfdt fdt_check_header(): FDT_ERR_BADMAGIC
      
      To remove this potentially confusing error message, this patch adds -q
      as a 'quiet' option for fdt addr, and uses this flag in
      config_distro_bootcmd.h
      
      Signed-off-by: default avatarPeter Hoyes <Peter.Hoyes@arm.com>
      e9496ec3
    • Marek Vasut's avatar
      cmd: adc: Add support for storing ADC result in env variable · 9de612ae
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      Add the ability to save ADC conversion result in an environment
      variable. This is useful for further arbitrary processing by the
      U-Boot scripts.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
      Cc: Patrice Chotard <patrice.chotard@foss.st.com>
      Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
      9de612ae
    • Andrew Abbott's avatar
      fdt: Fix TPL SEPARATE_BSS check when locating DTB · 0de71bb5
      Andrew Abbott authored and Tom Rini's avatar Tom Rini committed
      
      Commit 690af718 changed this condition
      from an explicit
      
      IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)
      
      to
      
      CONFIG_IS_ENABLED(SEPARATE_BSS)
      
      The documentation for CONFIG_IS_ENABLED() in include/linux/kconfig.h
      implies that we will get the correct behaviour, but the actual behaviour
      differs such that this condition is now always false.
      
      This stopped TPL being able to load the device tree blob at least on the
      ROCKPro64 board (RK3399 SoC), since the wrong device tree location was
      chosen.
      
      The issues causing this behaviour with CONFIG_IS_ENABLED() are:
      
      1. The documentation implies that CONFIG_SPL_BUILD =>
         CONFIG_SPL_<option> is considered before the TPL equivalent.
      
         Actually, the TPL options have higher priority - see definition of
         _CONFIG_PREFIX.
      
      2. The documentation implies a fallthrough, eg. if CONFIG_SPL_BUILD is
         defined but the CONFIG_SPL_<option> is not, then it will proceed to
         check if CONFIG_TPL_BUILD
      
         Actually, if CONFIG_TPL_BUILD is defined, then it stops there
         and CONFIG_SPL_BUILD is not considered - see definition of
         _CONFIG_PREFIX.
      
         During TPL build, at least for the ROCKPro64, both CONFIG_TPL_BUILD
         and CONFIG_SPL_BUILD are defined, but because of the above, only TPL
         options are considered. Since there is no CONFIG_TPL_SEPARATE_BSS,
         this fails.
      
      Fixes: 690af718 ("fdt: Correct condition for SEPARATE_BSS")
      Signed-off-by: default avatarAndrew Abbott <andrew@mirx.dev>
      0de71bb5
Loading