| 79c5912e | 23-Aug-2017 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
part: efi: Disable overlap check
The current code checks that no partitions overlap with the GPT partition table using the offset of the first LBA usable for that partition.
This works fine, unless
part: efi: Disable overlap check
The current code checks that no partitions overlap with the GPT partition table using the offset of the first LBA usable for that partition.
This works fine, unless you have a partition entry that is further away than it usually is and you want to create partitions in the gap between the GPT header and the GPT partition entries, for example to reflash a bootloader that needs to be set there.
Rework the test to something a bit smarter that checks whether a partition would overlap with either the GPT header or the partition entries, no matter where it is on the disk.
Partitions that do not have a start LBA specified will still start at the first LBA usable set in the GPT header, to avoid weird behaviours.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 47d7ee47 | 23-Aug-2017 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
part: efi: make gpt_fill_pte take the device descriptor
The gpt_fill_pte will need to access the device block size. Let's pass the device descriptor as an argument.
Signed-off-by: Maxime Ripard <ma
part: efi: make gpt_fill_pte take the device descriptor
The gpt_fill_pte will need to access the device block size. Let's pass the device descriptor as an argument.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 5276e8b6 | 23-Aug-2017 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
part: efi: rework the partition start and size in gpt_fill_pte
The start variable is only used inside a loop, and is never affected inside it, so it's a purely local variable.
In the same way the p
part: efi: rework the partition start and size in gpt_fill_pte
The start variable is only used inside a loop, and is never affected inside it, so it's a purely local variable.
In the same way the partition size is accessed several times, so we can store it in a variable.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 73d6d18b | 25-Jun-2017 |
Alison Chaiken <alison@peloton-tech.com> |
GPT: add accessor function for disk GUID
In order to read the GPT, modify the partition name strings, and then write out a new GPT, the disk GUID is needed. While there is an existing accessor for
GPT: add accessor function for disk GUID
In order to read the GPT, modify the partition name strings, and then write out a new GPT, the disk GUID is needed. While there is an existing accessor for the partition UUIDs, there is none yet for the disk GUID.
Changes since v6: none.
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
show more ...
|
| e6faf21f | 25-Jun-2017 |
Alison Chaiken <alison@peloton-tech.com> |
partitions: increase MAX_SEARCH_PARTITIONS and move to part.h
Move MAX_SEARCH_PARTITIONS to part.h so that functions in cmd directory can find it. At the same time, increase the value to 64 since s
partitions: increase MAX_SEARCH_PARTITIONS and move to part.h
Move MAX_SEARCH_PARTITIONS to part.h so that functions in cmd directory can find it. At the same time, increase the value to 64 since some operating systems use many, and the resources consumed by a larger value are minimal.
Changes since v6: none.
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
show more ...
|