1. 26 9月, 2012 17 次提交
    • S
      disk: part_efi: parse and store partition UUID · 894bfbbf
      Stephen Warren 提交于
      Each EFI partition table entry contains a UUID. Extend U-Boot's struct
      disk_partition to be able to store this information, and modify
      get_partition_info_efi() to fill it in.
      
      The implementation of uuid_string() was derived from the Linux kernel,
      tag v3.6-rc4 file lib/vsprintf.c function uuid_string().
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      894bfbbf
    • S
      disk: part_efi: range-check partition number · c04d68c6
      Stephen Warren 提交于
      Enhance get_partition_info_efi() to range-check the partition number.
      This prevents invalid partitions being accessed, and prevents access
      beyond the end of the gpt_pte[] array.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      c04d68c6
    • S
      disk: get_device_and_partition() "auto" partition and cleanup · 10a37fd7
      Stephen Warren 提交于
      Rework get_device_and_partition() to:
      a) Implement a new partition ID of "auto", which requests that U-Boot
         search for the first "bootable" partition, and fall back to the first
         valid partition if none is found. This way, users don't need to
         specify an explicit partition in their commands.
      b) Make use of get_device().
      c) Add parameter to indicate whether returning a whole device is
         acceptable, or whether a partition is mandatory.
      d) Make error-checking of the user's device-/partition-specification
         more complete. In particular, if strtoul() doesn't convert all
         characters, it's an error rather than just ignored.
      
      The resultant device/partition returned by the function will be as
      follows, based on whether the disk has a partition table (ptable) or not,
      and whether the calling command allows the whole device to be returned
      or not.
      
      (D and P are integers, P >= 1)
      
      D
      D:
        No ptable:
          !allow_whole_dev: error
          allow_whole_dev: device D
        ptable:
          device D partition 1
      D:0
        !allow_whole_dev: error
        allow_whole_dev: device D
      D:P
        No ptable: error
        ptable: device D partition P
      D:auto
        No ptable:
          !allow_whole_dev: error
          allow_whole_dev: device D
        ptable:
          first partition in device D with bootable flag set.
          If none, first valid paratition in device D.
      
      Note: In order to review this patch, it's probably easiest to simply
      look at the file contents post-application, rather than reading the
      patch itself.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      [swarren: Rob implemented scanning for bootable partitions. I fixed a
      couple of issues there, switched the syntax to ":auto", added the
      error-checking rework, and ":0" syntax for the whole device]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      10a37fd7
    • S
      disk: introduce get_device() · 2023e608
      Stephen Warren 提交于
      This patch introduces function get_device(). This looks up a
      block_dev_desc_t from an interface name (e.g. mmc) and device number
      (e.g. 0). This function is essentially the non-partition-specific
      prefix of get_device_and_partition().
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      2023e608
    • R
      cmd_reiser: use common get_device_and_partition function · 650f3664
      Rob Herring 提交于
      Convert reiserload and reiserls to use common device and partition parsing
      function. With the common function "dev:part" can come from the
      environment and a '-' can be used in that case.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      650f3664
    • R
      cmd_zfs: use common get_device_and_partition function · 41204570
      Rob Herring 提交于
      Convert zfsload and zfsls to use common device and partition parsing
      function. With the common function "dev:part" can come from the
      environment and a '-' can be used in that case.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      41204570
    • R
      475c7970
    • R
      cmd_fat: use common get_device_and_partition function · cfda5aea
      Rob Herring 提交于
      Convert fatload, fatls, and fatinfo to use common device and partition
      parsing function. With the common function "dev:part" can come from the
      environment and a '-' can be used in that case.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      cfda5aea
    • R
      cmd_extX: use common get_device_and_partition function · 81180819
      Rob Herring 提交于
      Convert ext2/4 load, ls, and write functions to use common device and
      partition parsing function. With the common function "dev:part" can come
      from the environment and a '-' can be used in that case.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      81180819
    • R
      ext4: remove init_fs/deinit_fs · 94501062
      Rob Herring 提交于
      There's no real need to expose this and it can be removed by using a static
      allocation.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      94501062
    • R
      disk/part: introduce get_device_and_partition · 99d2c205
      Rob Herring 提交于
      All block device related commands (scsiboot, fatload, ext2ls, etc.) have
      simliar duplicated device and partition parsing and selection code. This
      adds a common function to replace various implementations.
      
      The new function has an enhancement over current versions. If no device
      or partition is specified on the command line, the bootdevice env variable
      will be used (scsiboot does this).
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      99d2c205
    • R
      disk/part: check bootable flag for DOS partitions · 40e0e568
      Rob Herring 提交于
      Determine which partitions are bootable/active. In the partition listing,
      print "Boot" for partitions with the bootable/active flag set.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      40e0e568
    • R
      combine block device load commands into common function · 7405a133
      Rob Herring 提交于
      All the raw block load commands duplicate the same code. Starting with
      the ide version as it has progress updates convert ide, usb, and scsi boot
      commands to all use a common version.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      7405a133
    • S
      disk: make get_partition_info() always available to disk.c · 2f501646
      Stephen Warren 提交于
      Now that get_device_and_partition() always calls get_partition_info()
      when disk.c is compiled, we must always compile the function, rather
      than ifdef it away.
      
      The implementation must be conditional based on CONFIG_CMD_* etc., since
      that's what e.g. part_dos.c uses to ifdef out get_partition_info_dos();
      CONFIG_DOS_PARTITION can be enabled even without those commands being
      enabled.
      
      Technically, this change is required before Rob's "disk/part: introduce
      get_device_and_partition" patch. However, at least when the compiler
      optimizer is turned on, it isn't required before then in practice,
      since get_device_and_partition() calls get_dev(), which is stubbed out
      in disk.c under exactly the same conditions that get_partition_info()
      is not compiled, and hence the compiler never generates code for the
      call to the missing function. However, in my later patch "disk:
      get_device_and_partition() "auto" partition and cleanup", the optimizer
      doesn't succeed at this, and may attempt to reference the undefined
      function.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      2f501646
    • A
      MAKEALL: fix per arch board lists · cce5d210
      Allen Martin 提交于
      The LIST_arm rule included the Atmel boards twice (by virtue of
      including both LIST_at91 and LIST_ARM9) and was missing all the
      arm720t, arm946es, and arm1176 boards.  Change this list to use
      boards_by_arch() which is less error prone.  After this change
      "./MAKEALL arm" and "./MAKEALL -a arm" build the same boards.
      
      Also fix up some missing and duplicate boards to arm, mips, and m68k.
      Signed-off-by: NAllen Martin <amartin@nvidia.com>
      Acked-by: NTom Rini <trini@ti.com>
      cce5d210
    • S
      ARM: arm1176: Define arch_cpu_init() at the SoC level · 59d63f7d
      Stephen Warren 提交于
      Commit 86c63265 "ARM: arm1176: enable instruction cache in
      arch_cpu_init()" defined arch_cpu_init() in a file that is shared across
      all arm1176 SoCs. tnetv107x already implemented this function, which
      caused linking to break. Move the new conflicting arch_cpu_init() into
      arm1176/bcm2835/init.c so that it doesn't conflict; grep indicates this
      function is usually defined at the SoC-level, not the CPU-level, at least
      for ARM.
      Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
      Acked-by: NMarek Vasut <marex@denx.de>
      59d63f7d
    • T
      5675b509
  2. 22 9月, 2012 8 次提交
  3. 21 9月, 2012 7 次提交
  4. 20 9月, 2012 8 次提交