1. 21 8月, 2018 1 次提交
    • J
      cmd: Add bind/unbind commands to bind a device to a driver from the command line · 49c752c9
      Jean-Jacques Hiblot 提交于
      In some cases it can be useful to be able to bind a device to a driver from
      the command line.
      The obvious example is for versatile devices such as USB gadget.
      Another use case is when the devices are not yet ready at startup and
      require some setup before the drivers are bound (ex: FPGA which bitsream is
      fetched from a mass storage or ethernet)
      
      usage example:
      
      bind usb_dev_generic 0 usb_ether
      unbind usb_dev_generic 0 usb_ether
      or
      unbind eth 1
      
      bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
      unbind /ocp/omap_dwc3@48380000/usb@48390000
      Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
      49c752c9
  2. 11 8月, 2018 1 次提交
  3. 03 7月, 2018 1 次提交
    • L
      net: Add new wol command - Wake on LAN · d8970dae
      Lothar Felten 提交于
      Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or
      time out if no WoL packed is received.
      If the WoL packet contains a password, it is saved in the environment
      variable 'wolpassword' using the etherwake format (dot or colon
      separated decimals).
      
      Intended use case: a networked device should boot an alternate image.
      It's attached to a network on a client site, modifying the DHCP server
      configuration or setup of a tftp server is not allowed.
      After power on the device waits a few seconds for a WoL packet. If a
      packet is received, the device boots the alternate image. Otherwise
      it boots the default image.
      
      This method is a simple way to interact with a system via network even
      if only the MAC address is known. Tools to send WoL packets are
      available on all common platforms.
      
      Some Ethernet drivers seem to pad the incoming packet. The additional
      padding bytes might be recognized as Wake-on-LAN password bytes.
      
      By default enabled in pengwyn_defconfig.
      Signed-off-by: NLothar Felten <lothar.felten@gmail.com>
      Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
      d8970dae
  4. 19 6月, 2018 1 次提交
    • I
      cmd: avb2.0: avb command for performing verification · 60b2f9e7
      Igor Opaniuk 提交于
      Enable a "avb" command to execute Android Verified
      Boot 2.0 operations. It includes such subcommands:
        avb init - initialize avb2 subsystem
        avb read_rb - read rollback index
        avb write_rb - write rollback index
        avb is_unlocked - check device lock state
        avb get_uuid - read and print uuid of a partition
        avb read_part - read data from partition
        avb read_part_hex - read data from partition and output to stdout
        avb write_part - write data to partition
        avb verify - run full verification chain
      Signed-off-by: NIgor Opaniuk <igor.opaniuk@linaro.org>
      60b2f9e7
  5. 26 5月, 2018 3 次提交
    • M
      tpm: prepare support for TPMv2.x commands · ff32245b
      Miquel Raynal 提交于
      Choice between v1 and v2 compliant functions is done with the
      configuration.
      
      Create the various files that will receive TPMv2-only code on the same
      scheme as for the TPMv1 code.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      ff32245b
    • M
      tpm: disociate TPMv1.x specific and generic code · d677bfe2
      Miquel Raynal 提交于
      There are no changes in this commit but a new organization of the code
      as follow.
      
      * cmd/ directory:
              > move existing code from cmd/tpm.c in cmd/tpm-common.c
      	> move specific code in cmd/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  commands only called cmd/tpm-user-utils.h
      
      * lib/ directory:
              > move existing code from lib/tpm.c in lib/tpm-common.c
      	> move specific code in lib/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  the library itself called lib/tpm-utils.h
      
      * include/ directory:
              > move existing code from include/tpm.h in include/tpm-common.h
      	> move specific code in include/tpm-v1.h
      
      Code designated as 'common' is compiled if TPM are used. Code designated
      as 'specific' is compiled only if the right specification has been
      selected.
      
      All files include tpm-common.h.
      Files in cmd/ include tpm-user-utils.h.
      Files in lib/ include tpm-utils.h.
      Depending on the specification, files may include either (not both)
      tpm-v1.h or tpm-v2.h.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      d677bfe2
    • M
      tpm: prepare introduction of TPMv2.x support in Kconfig · 9f9ce3c3
      Miquel Raynal 提交于
      Because both major revisions are not compatible at all, let's make them
      mutually exclusive in Kconfig. This way we will be sure, when using a
      command or a library function that it is supported by the right
      revision.
      
      Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
      files by "tpm2_" to make the distinction without moving everything.
      
      The Kconfig menu about TPM drivers is now divided into two sections, one
      for each specification. Compliant drivers with one specification will
      only show up if this specification _only_ has been selected, otherwise a
      comment is displayed.
      
      Once a driver is selected by the user, it selects automatically a
      boolean value, that is needed in order to activate the TPM commands.
      Selecting the TPM commands will automatically select the right
      command/library files.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
              drop TPM_DRIVER_SELECTED]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      9f9ce3c3
  6. 24 5月, 2018 1 次提交
  7. 09 5月, 2018 1 次提交
  8. 08 5月, 2018 1 次提交
  9. 07 5月, 2018 1 次提交
    • T
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini 提交于
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: NTom Rini <trini@konsulko.com>
      83d290c5
  10. 07 4月, 2018 1 次提交
    • M
      cmd: Add command for calculating binary operations · 55b25561
      Mario Six 提交于
      This patch adds a command that enables the calculation of bit operations
      (AND, OR, XOR) on binary data from the command line. Memory locations as
      well as the contents of environment variables are eligible as sources
      and destination of the binary data used in the operations.
      
      The possible applications are manifold: Setting specific bits in
      registers using the regular read-OR-write pattern, masking out bits in
      bit values, implementation of simple OTP encryption using the XOR
      operation, etc.
      Signed-off-by: NMario Six <mario.six@gdsys.cc>
      55b25561
  11. 06 2月, 2018 1 次提交
    • T
      cmd: Make CONFIG_CMD_FPGA depend on CONFIG_FPGA · a4fa8114
      Tuomas Tynkkynen 提交于
      cmd/Makefile has:
      
      ifdef CONFIG_FPGA
      obj-$(CONFIG_CMD_FPGA) += fpga.o
      endif
      
      which means that if CONFIG_FPGA is not set, CONFIG_CMD_FPGA silently
      does nothing. Let's remove that Makefile conditional and instead express
      this equivalent dependency in Kconfig, so a lot of redundant
      
       # CONFIG_CMD_FPGA is not set
      
      can be removed from board defconfigs that don't actually have an FPGA.
      Signed-off-by: NTuomas Tynkkynen <tuomas@tuxera.com>
      a4fa8114
  12. 20 1月, 2018 1 次提交
  13. 10 1月, 2018 1 次提交
  14. 08 1月, 2018 1 次提交
  15. 08 12月, 2017 2 次提交
  16. 03 10月, 2017 1 次提交
  17. 23 8月, 2017 1 次提交
  18. 17 8月, 2017 1 次提交
    • S
      dm: blk: Add a generic function for block device commands · 4395f667
      Simon Glass 提交于
      Most block devices provide a command (e.g. 'sata', 'scsi', 'ide') and
      these commands generally do the same thing. This makes it harder to
      maintain this code and keep it consistent.
      
      We now have a block device interface which is either implemented by driver
      model (when CONFIG_BLK is enabled) or with a legacy interface. Therefore
      it is possible to handle most of what these commands do with generic code.
      
      Add a new generic function to process block-device commands using the
      interface type and the current device number for that type.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      4395f667
  19. 14 8月, 2017 1 次提交
  20. 12 8月, 2017 3 次提交
  21. 04 7月, 2017 1 次提交
  22. 06 6月, 2017 1 次提交
    • T
      cmd/ethsw: Disable implicit enum conversion warning · 18b29165
      Tom Rini 提交于
      With clang-3.8 we see warnings like:
      cmd/ethsw.c:304:6: warning: implicit conversion from
            enumeration type 'enum ethsw_keyword_opt_id' to different enumeration type
            'enum ethsw_keyword_id' [-Wenum-conversion]
                                              ethsw_id_pvid_no,
                                              ^~~~~~~~~~~~~~~~
      
      Because we have one enum for ethsw_keyword_id and a second enum for
      ethsw_keyword_opt_id.  This ends up being safe as ethsw_keyword_opt_id
      explicitly starts after ethsw_keyword_id enum ends.   Disable the
      warning here rather than collapse these into one enum and rely on
      comments to denote where optional keywords begin.
      
      Cc: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
      18b29165
  23. 23 5月, 2017 2 次提交
  24. 22 5月, 2017 1 次提交
  25. 30 4月, 2017 1 次提交
  26. 18 4月, 2017 1 次提交
  27. 15 4月, 2017 2 次提交
  28. 06 4月, 2017 1 次提交
  29. 09 2月, 2017 2 次提交
    • M
      cmd: rework "license" command · d726f225
      Masahiro Yamada 提交于
      The previous commit ("add a new command to show .config contents")
      improves the basic infrastructure of "embed a compressed file into
      the U-Boot image, and print it by a command".  The same pattern for
      the "license" command.
      
      This commit reworks the command to improve the following:
      
      [1] Improve log style
      
      Kbuild style log
      
        GZIP    cmd/license_data.gz
        CHK     cmd/license_data_gz.h
        UPD     cmd/license_data_gz.h
        CHK     cmd/license_data_size.h
        UPD     cmd/license_data_size.h
      
      instead of the bare Make log:
      
      cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
      		tools/bin2header license_gzip > ./include/license.h
      
      [2] Collect related code into the "cmd" directory
      
      Prior to this commit, the license.h was created by tools/Makefile,
      placed under the "include" directory, included from cmd/license.c,
      and deleted by the top-level Makefile.  It is not a good idea to
      scatter related code.
      
      [3] Drop the fixed-malloc size LICENSE_MAX
      
      Just allocate the minimum required size of buffer because we know
      the size of the original gpl-2.0.txt.
      
      [4] Fix more issues
      
      Terminate the buffer with zero to prevent puts() from over-running.
      Add "static" to do_license.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      d726f225
    • M
      cmd: add a new command "config" to show .config contents · 61304dbe
      Masahiro Yamada 提交于
      This feature is inspired by /proc/config.gz of Linux.  In Linux,
      if CONFIG_IKCONFIG is enabled, the ".config" file contents are
      embedded in the kernel image.  If CONFIG_IKCONFIG_PROC is also
      enabled, the ".config" contents are exposed to /proc/config.gz.
      Users can do "zcat /proc/config.gz" to check which config options
      are enabled on the running kernel image.
      
      The idea is almost the same here; if CONFIG_CMD_CONFIG is enabled,
      the ".config" contents are compressed and saved in the U-Boot image,
      then printed by the new command "config".
      
      The usage is quite simple.  Enable CONFIG_CMD_CONFIG, then run
       > config
      from the command line interface.  The ".config" contents will be
      printed on the console.
      
      This feature increases the U-Boot image size by about 4KB (this is
      mostly due to the gzip-compressed .config file).  By default, it is
      enabled only for Sandbox because we do not care about the memory
      footprint on it.  Of course, this feature is architecture agnostic,
      so you can enable it on any board if the image size increase is
      acceptable for you.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      61304dbe
  30. 22 1月, 2017 1 次提交
    • U
      status_led: Kconfig migration · 2d8d190c
      Uri Mashiach 提交于
      Move all of the status LED feature to drivers/led/Kconfig.
      The LED status definitions were moved from the board configuration
      files to the defconfig files.
      
      TBD: Move all of the definitions in the include/status_led.h to the
      relevant board's defconfig files.
      
      Tested boards: CL-SOM-AM57x, CM-T335
      Signed-off-by: NUri Mashiach <uri.mashiach@compulab.co.il>
      2d8d190c
  31. 12 12月, 2016 1 次提交
  32. 12 10月, 2016 1 次提交