1. 25 Apr, 2019 13 commits
    • Simon Glass's avatar
      sandbox: Add support for Chromium OS verified boot · 42c504e1
      Simon Glass authored
      
      
      Add the required config and features to make this work. This includes:
      
      - new board called chromeos_sandbox
      - new SPL boot method
      - make board_run_command() weak
      
      Change-Id: I4ae19f8328dcf72a9b6ef625fcc443a8a52d1125
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      42c504e1
    • Simon Glass's avatar
      cros: Plumb in Chromium OS verified boot into the build · 19390486
      Simon Glass authored
      
      
      Add Chromium OS's code and vboot library into the build.
      
      Change-Id: I0f741e2ada7d6b76d7917b2209aeb49e43692a0a
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      19390486
    • Simon Glass's avatar
      cros: Add required hooks · 1079303f
      Simon Glass authored
      
      
      Add a few hooks and fields which are required by Chromium OS.
      
      Change-Id: Id996434a10c426b04fab48c1a0925677a616a564
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1079303f
    • Simon Glass's avatar
      cros: Add base implementation · 37835858
      Simon Glass authored
      Add an implementation of Chromium OS verified boot. This is entirely
      contained within the cros/ subdrectory. It includes drivers, device-tree
      files, commands and callbacks.
      
      Change-Id: Icb4e2eb64116293d5ac1b63db8c771b03ec7bcc6
      37835858
    • Simon Glass's avatar
      cros: Add extra data used by verified boot · f41640a0
      Simon Glass authored
      
      
      This includes locale images and developer keys from the Chrome OS repo and
      images.
      
      Change-Id: I49f27bba306166516d5ee1d247ca20c52a2f404f
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      f41640a0
    • Simon Glass's avatar
      RFC: Makefile: Build U-Boot as a library · 81539e68
      Simon Glass authored
      
      
      As an experiment, build U-Boot as a library, u-boot.o, so it can be used
      by other open-source software. Update the sandbox build rules to suit.
      
      This has not been tested in any meaningful way. It breaks sandbox_spl and
      all x86 boards.
      
      I am interested in feedback as to how useful this might be.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Series-to: u-boot
      Cover-letter:
      Various patches for verified boot support
      This is (for now) the last series to enable Chromium OS verified boot in
      U-Boot. It includes:
      
      - Sandbox valgrind spport
      - Minor TPM enhancements and fixes
      - Resurection of inttypes.h
      - Args checking for log functions
      - Sandbox fix for time jitter
      - Various other minir things
      END
      81539e68
    • Simon Glass's avatar
      sandbox: Allow running from valgrind · 3924f638
      Simon Glass authored
      
      
      It is useful to run sandbox from valgrind to find memory errors, etc. At
      present this works OK until U-Boot jumps into the next phase (e.g. from
      SPL to U-Boot). Update os_jump_to_file() to use valgrind for each
      subsequent phase also.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3924f638
    • Simon Glass's avatar
      mmc: Add hardware partition support · e29f9066
      Simon Glass authored
      
      
      MMC devices support multiple partitions, defined by the hardware. At
      present U-Boot can only access partition zero. Add support for selecting
      other partitions.
      
      Also add a way to check if a partition is write-protected.
      
      Note: There is existing support for this in the legacy MMC code, but this
      is being removed soon.
      
      Series-to: u-boot
      Process-logs: sort, uniq
      Series-version: 2
      Series-changes: 2
      - Drop changes previously applied
      - Drop patch 'efi_loader: Don't enable in SPL/TPL by default'
      
      Cover-letter:
      sandbox: Changes and improvements to support verified boot
      This series compiles a number of fixes and improvement sto sandbox,
      cros_ec, tpm and a few other pieces. This allows U-Boot to support
      Chromium OS verified boot and assist with debugging of this.
      END
      
      Change-Id: I44025b99f36aedf749158db6d9edbb187b3c5c35
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e29f9066
    • Simon Glass's avatar
      tpm: Add a delay on start-up · 981816b2
      Simon Glass authored
      
      
      Some TPMs hang on startup without a short delay after getting the lock.
      Add a small delay to cope with this.
      
      Series-changes: 2
      - Split out from main TPM patch
      
      Change-Id: I81503d0c44b18f2836061ba26667e425ef37faa7
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      981816b2
    • Simon Glass's avatar
      log: Add helpers for common log levels · aa9aeb4a
      Simon Glass authored
      
      
      At present to output a log message you need something like:
      
         log(UCLASS_SPI, LOCL_INFO, "message1");
         log(UCLASS_SPI, LOCL_INFO, "message2");
      
      but many files use the same category throughout. Also it is helpful to
      shorten the length of log names, providing helpers for common logging
      levels. Add some macros so that it is possible to do:
      
         (top of file, before #includes)
         #define LOG_CATEGORY UCLASS_SPI
      
         (later in the file)
         log_info("message1");
         log_debug("message2");
         log_err("message3");
      
      Change-Id: Ie8b318419a5a3df0ec01987e0eb2332f4a044566
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      aa9aeb4a
    • Simon Glass's avatar
      fix sandbox64 and dts · eb9ccfb2
      Simon Glass authored
      eb9ccfb2
    • Simon Glass's avatar
      spl: misc: Allow misc drivers in SPL and TPL · b79dd65d
      Simon Glass authored
      
      
      In some cases it is necessary to read the keyboard in early phases of
      U-Boot. The cros_ec keyboard is kept in the misc directory. Update the
      config to allow this.
      
      Series-changes: 2
      - Leave the misc uclass alone since it stops sandbox_spl working
      
      Change-Id: Ie430a83dc32eca0a827ed278524754ba4f11eda0
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b79dd65d
    • Simon Glass's avatar
      spl: Print a message if we are unable to load an image · ad9ff9da
      Simon Glass authored
      
      
      It can confusing when U-Boot SPL hangs for no obvious reason, when it is
      unable to load U-Boot. Add a message to indicate the cause.
      
      Change-Id: Ia59edaef6285051850ca28864155706f266e4fee
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ad9ff9da
  2. 24 Apr, 2019 4 commits
    • Tom Rini's avatar
      Merge branch '2019-04-22-master-imports' · 3fbd2dce
      Tom Rini authored
      - Add and enable brcmnand driver on a number of relevant platforms.
        Also add and enable LED drivers on more bcm platforms.
      - Various ARMv8 fixes/improvements, including extending PSCI
        functionality.
      - fs_loader improvments
      - Various FIT/SPL improvements
      - PCI bugfixes
      - Poplar platform ethernet support
      - MediaTek MMC improvements
      - Android boot improvements
      3fbd2dce
    • Eugeniu Rosca's avatar
      image: android: fix 'iminfo' typo · 74a7e001
      Eugeniu Rosca authored and Tom Rini's avatar Tom Rini committed
      Fix below CP warning triggered by the 'iminfo' output in another patch:
      WARNING: 'addrress' may be misspelled - perhaps 'address'?
      
      Fixes: 4f1318b2
      
       ("common: image: minimal android image iminfo support")
      Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
      Acked-by: default avatarMarek Vasut <marek.vasut@gmail.com>
      74a7e001
    • Eugeniu Rosca's avatar
      image: android: allow booting lz4-compressed kernels · 829ceb28
      Eugeniu Rosca authored and Tom Rini's avatar Tom Rini committed
      
      
      According to Android image format [1], kernel image resides at 1 page
      offset from the boot image address. Grab the magic number from there
      and allow U-Boot to handle LZ4-compressed KNL binaries instead of
      hardcoding compression type to IH_COMP_NONE. Other compression types,
      if needed, can be added later.
      
      Tested on H3ULCB-KF using the image detailed in [2].
      
      [1] Excerpt from include/android_image.h
          +-----------------+
          | boot header     | 1 page
          +-----------------+
          | kernel          | n pages
          +-----------------+
          | ramdisk         | m pages
          +-----------------+
          | second stage    | o pages
          +-----------------+
      
      [2] => iminfo 4c000000
          ## Checking Image at 4c000000 ...
          Android image found
          kernel size:      85b9d1
          kernel address:   48080000
          ramdisk size:     54ddbc
          ramdisk addrress: 4a180000
          second size:      0
          second address:   48000800
          tags address:     48000100
          page size:        800
          os_version:       1200012a (ver: 0.9.0, level: 2018.10)
          name:
          cmdline:          buildvariant=userdebug
      
      Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
      829ceb28
    • Heinrich Schuchardt's avatar
      test: env: Enable env unit tests by default · 0efe2b8f
      Heinrich Schuchardt authored and Tom Rini's avatar Tom Rini committed
      
      
      If CONFIG_UNIT_TEST is enabled we should enable the individual tests by
      default to ensure good test coverage.
      
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      0efe2b8f
  3. 23 Apr, 2019 23 commits