e2e9b378 | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_dos: print partition UUID in partition list
This information may be useful to compare against command "part uuid", or if you want to manually paste the information into the kernel command
disk: part_dos: print partition UUID in partition list
This information may be useful to compare against command "part uuid", or if you want to manually paste the information into the kernel command-line.
Signed-off-by: Stephen Warren <swarren@nvidia.com> [trini: print_one_part / print_part_dos output strings didn't quite match before the changes] Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|
b4414f4a | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: set bootable flag in partition objects
A partition is considered bootable if it either has the "legacy BIOS bootable" flag set, or if the partition type UUID matches the standard "sy
disk: part_efi: set bootable flag in partition objects
A partition is considered bootable if it either has the "legacy BIOS bootable" flag set, or if the partition type UUID matches the standard "system" type.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
13bf2f55 | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: print raw partition attributes
When printing the EFI partition table, print the raw attributes. Convert struct gpt_entry_attributes to a union to allow raw access.
Signed-off-by: St
disk: part_efi: print raw partition attributes
When printing the EFI partition table, print the raw attributes. Convert struct gpt_entry_attributes to a union to allow raw access.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
1c8346ab | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: add new partition attribute definitions
Add no_block_io_protocol and legacy_bios_bootable attribute definitions. These are sourced from UEFI Spec 2.3, page 105, table 19. Credits to
disk: part_efi: add new partition attribute definitions
Add no_block_io_protocol and legacy_bios_bootable attribute definitions. These are sourced from UEFI Spec 2.3, page 105, table 19. Credits to the libparted source for the specification pointer.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
f07cd2c4 | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: print partition UUIDs
When printing the partition table, print the partition type UUID and the individual partition UUID. Do this unconditionally, since partition UUIDs are useful.
disk: part_efi: print partition UUIDs
When printing the partition table, print the partition type UUID and the individual partition UUID. Do this unconditionally, since partition UUIDs are useful.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
788a8c1f | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: re-order partition list printf, change case
The partition name is a long variable-length string. Move it last on the line to ensure consistent layout and that the entries align with
disk: part_efi: re-order partition list printf, change case
The partition name is a long variable-length string. Move it last on the line to ensure consistent layout and that the entries align with the "header" line. Also, surround it in quotes, so if it's empty, it's obvious that something is still being printed.
Also, change the case of the LBA numbers; lower-case looks nicer in my opinion, and will be more consistent with the UUID printing that is added later in this series.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
38a3021e | 08-Oct-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: remove indent level from loop
Simplify the partition printing loop in print_part_efi() to bail out early when the first invalid partition is found, rather than indenting the whole bo
disk: part_efi: remove indent level from loop
Simplify the partition printing loop in print_part_efi() to bail out early when the first invalid partition is found, rather than indenting the whole body of the loop. This simplifies later patches.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
d27b5f93 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_msdos: parse and store partition UUID
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred to as the NT disk signature. When combined with a partition number within t
disk: part_msdos: parse and store partition UUID
The MSDOS/MBR partition table includes a 32-bit unique ID, often referred to as the NT disk signature. When combined with a partition number within the table, this can form a unique ID similar in concept to EFI/GPT's partition UUID.
This patch generates UUIDs in the format 0002dd75-01, which matches the format expected by the Linux kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
894bfbbf | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: parse and store partition UUID
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_in
disk: part_efi: parse and store partition UUID
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: Stephen Warren <swarren@nvidia.com>
show more ...
|
c04d68c6 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: part_efi: range-check partition number
Enhance get_partition_info_efi() to range-check the partition number. This prevents invalid partitions being accessed, and prevents access beyond the end
disk: part_efi: range-check partition number
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: Stephen Warren <swarren@nvidia.com>
show more ...
|
10a37fd7 | 21-Sep-2012 |
Stephen Warren <swarren@nvidia.com> |
disk: get_device_and_partition() "auto" partition and cleanup
Rework get_device_and_partition() to: a) Implement a new partition ID of "auto", which requests that U-Boot search for the first "boo
disk: get_device_and_partition() "auto" partition and cleanup
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: Rob 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: Stephen Warren <swarren@nvidia.com>
show more ...
|
99d2c205 | 20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
disk/part: introduce get_device_and_partition
All block device related commands (scsiboot, fatload, ext2ls, etc.) have simliar duplicated device and partition parsing and selection code. This adds a
disk/part: introduce get_device_and_partition
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: Rob Herring <rob.herring@calxeda.com>
show more ...
|