1. 12 8月, 2019 1 次提交
  2. 03 5月, 2019 1 次提交
  3. 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
  4. 24 10月, 2017 1 次提交
  5. 07 10月, 2017 1 次提交
    • T
      cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for Coverity · bf52fcde
      Tom Rini 提交于
      The recent changes to these files did not completely fix the previous
      issues, or introduced different (minor) issues.  In cmd/gpt.c we need to
      dereference str_disk_guid to be sure that malloc worked.  In
      cmd/nvedit.c we need to be careful that we can also fit in that leading
      space when adding to the string.  And in tools/fit_image.c we need to
      re-work the error handling slightly in fit_import_data() so that we only
      call munmap() once.  We have two error paths here, one where we have an
      fd to close and one where we do not.  Adjust labels to match this.
      
      Reported-by: Coverity (CID: 167366, 167367, 167370)
      Signed-off-by: NTom Rini <trini@konsulko.com>
      bf52fcde
  6. 06 10月, 2017 1 次提交
  7. 27 9月, 2017 1 次提交
  8. 16 8月, 2017 2 次提交
  9. 05 8月, 2017 3 次提交
    • A
      gpt: harden set_gpt_info() against non NULL-terminated strings · 2fcaa413
      Alison Chaiken 提交于
      Strings read from devices may sometimes fail to be
      NULL-terminated.   The functions in lib/string.c are subject to
      failure in this case.   Protect against observed failures in
      set_gpt_info() by switching to length-checking variants with a length
      limit of the maximum possible partition table length.  At the same
      time, add a few checks for NULL string pointers.
      
      Here is an example as observed in sandbox under GDB:
      
          => gpt verify host 0 $partitions
          Program received signal SIGSEGV, Segmentation fault.
          0x0000000000477747 in strlen (s=0x0) at lib/string.c:267
          267             for (sc = s; *sc != '\0'; ++sc)
          (gdb) bt
          #0  0x0000000000477747 in strlen (s=0x0) at lib/string.c:267
          #1  0x00000000004140b2 in set_gpt_info (str_part=<optimized out>,
          str_disk_guid=str_disk_guid@entry=0x7fffffffdbe8, partitions=partitions@entry=0x7fffffffdbd8,
          parts_count=parts_count@entry=0x7fffffffdbcf "", dev_desc=<optimized out>) at cmd/gpt.c:415
          #2  0x00000000004145b9 in gpt_verify (str_part=<optimized out>, blk_dev_desc=0x7fffef09a9d0) at cmd/gpt.c:580
          #3  do_gpt (cmdtp=<optimized out>, flag=<optimized out>, argc=<optimized out>, argv=0x7fffef09a8f0)
          at cmd/gpt.c:783
          #4  0x00000000004295b0 in cmd_call (argv=0x7fffef09a8f0, argc=0x5, flag=<optimized out>,
          cmdtp=0x714e20 <_u_boot_list_2_cmd_2_gpt>) at common/command.c:500
          #5  cmd_process (flag=<optimized out>, argc=0x5, argv=0x7fffef09a8f0,
          repeatable=repeatable@entry=0x726c04 <flag_repeat>, ticks=ticks@entry=0x0) at common/command.c:539
      Suggested-by: NLothar Waßmann <LW@karo-electronics.de>
      Signed-off-by: NAlison Chaiken <alison@peloton-tech.com>
      2fcaa413
    • A
      GPT: provide commands to selectively rename partitions · 203f9b48
      Alison Chaiken 提交于
      This patch provides support in u-boot for renaming GPT
      partitions.  The renaming is accomplished via new 'gpt swap'
      and 'gpt rename' commands.
      
      The 'swap' mode returns an error if no matching partition names
      are found, or if the number of partitions with one name does not equal
      the number with the second name.   The 'rename' variant always
      succeeds as long as a partition with the provided number exists.
      
      Rewriting the partition table has the side-effect that all partitions
      end up with "msftdata" flag set.  The reason is that partition type
      PARTITION_BASIC_DATA_GUID is hard-coded in the gpt_fill_pte()
      function.  This does not appear to cause any harm.
      Signed-off-by: NAlison Chaiken <alison@peloton-tech.com>
      203f9b48
    • A
      GPT: read partition table from device into a data structure · 09a49930
      Alison Chaiken 提交于
      Make the partition table available for modification by reading it from
      the user-specified device into a linked list.   Provide an accessor
      function for command-line testing.
      Signed-off-by: NAlison Chaiken <alison@peloton-tech.com>
      [trini: Make this depend on CMD_GPT_RENAME, as it is the user of this
      code]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      09a49930
  10. 04 8月, 2017 1 次提交
  11. 18 3月, 2017 1 次提交
  12. 28 1月, 2017 1 次提交
  13. 06 8月, 2016 1 次提交
  14. 13 6月, 2016 1 次提交
  15. 15 3月, 2016 2 次提交
  16. 25 1月, 2016 2 次提交
  17. 24 11月, 2015 3 次提交
    • P
      part:efi: add bootable parameter in gpt command · cfdaf4ca
      Patrick Delaunay 提交于
      The optional parameter bootable is added in gpt command to set the
      partition attribute flag "Legacy BIOS bootable"
      
      This flag is used in extlinux and so in with distro to select
      the boot partition where is located the configuration file
      (please check out doc/README.distro for details).
      
      With this parameter, U-Boot can be used to create the boot partition
      needed for device using distro.
      
      example of use:
      
      setenv partitions "name=u-boot,size=60MiB;name=boot,size=60Mib,bootable;\
                         name=rootfs,size=0"
      
      > gpt write mmc 0 $partitions
      
      > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part	Start LBA	End LBA		Name
      	Attributes
      	Type GUID
      	Partition GUID
        1	0x00000022	0x0001e021	"u-boot"
      	attrs:	0x0000000000000000
      	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      	guid:	cceb0b18-39cb-d547-9db7-03b405fa77d4
        2	0x0001e022	0x0003c021	"boot"
      	attrs:	0x0000000000000004
      	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      	guid:	d4981a2b-0478-544e-9607-7fd3c651068d
        3	0x0003c022	0x003a9fde	"rootfs"
      	attrs:	0x0000000000000000
      	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      	guid:	6d6c9a36-e919-264d-a9ee-bd00379686c7
      
      > part list mmc 0 -bootable devplist
      
      > printenv devplist
      
      devplist=2
      
      Then the distro scripts will search extlinux in partition 2
      and not in the first partition.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay73@gmail.com>
      cfdaf4ca
    • L
      gpt: command: Extend gpt command to support GPT table verification · bbb9ffac
      Lukasz Majewski 提交于
      This commit adds support for "gpt verify" command, which verifies
      correctness of on-board stored GPT partition table.
      As the optional parameter one can provide '$partitons' environment variable
      to check if partition data (size, offset, name) is correct.
      
      This command should be regarded as complementary one to "gpt restore".
      Signed-off-by: NLukasz Majewski <l.majewski@majess.pl>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NPrzemyslaw Marczak <p.marczak@samsung.com>
      bbb9ffac
    • L
      74f889b0
  18. 23 11月, 2015 1 次提交
  19. 13 11月, 2015 1 次提交
  20. 06 3月, 2015 2 次提交
  21. 03 4月, 2014 1 次提交
  22. 09 11月, 2013 1 次提交
  23. 20 9月, 2013 1 次提交
  24. 24 7月, 2013 1 次提交
  25. 20 2月, 2013 1 次提交
  26. 14 12月, 2012 1 次提交