Skip to content
Snippets Groups Projects
  1. Aug 05, 2017
    • Wenyou.Yang@microchip.com's avatar
      board: at91sam9261ek: Update to support DT and DM · 324873e7
      Wenyou.Yang@microchip.com authored
      
      Add the dts files to support deivce tree, update the configuration
      files to support the device tree and driver model. The peripheral
      clock and pins configuration are handled by the clock and the pinctrl
      drivers respectively.
      
      Enable the early debug UART to debug problems when an ICE or other
      debug mechanism is not available.
      
      Signed-off-by: default avatarWenyou Yang <wenyou.yang@microchip.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      324873e7
    • Alison Chaiken's avatar
      gpt: harden set_gpt_info() against non NULL-terminated strings · 2fcaa413
      Alison Chaiken authored
      
      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: default avatarLothar Waßmann <LW@karo-electronics.de>
      Signed-off-by: default avatarAlison Chaiken <alison@peloton-tech.com>
      2fcaa413
    • Alison Chaiken's avatar
      GPT: provide commands to selectively rename partitions · 203f9b48
      Alison Chaiken authored
      
      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: default avatarAlison Chaiken <alison@peloton-tech.com>
      203f9b48
    • Alison Chaiken's avatar
      GPT: read partition table from device into a data structure · 09a49930
      Alison Chaiken authored
      
      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: default avatarAlison Chaiken <alison@peloton-tech.com>
      [trini: Make this depend on CMD_GPT_RENAME, as it is the user of this
      code]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      09a49930
  2. Aug 04, 2017
  3. Aug 03, 2017
  4. Aug 02, 2017
Loading