mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
part: Add a function to find the first bootable partition
If a disk has a bootable partition we are expected to use it to locate the boot files. Add a function to find it. To test this, update mmc1 to have two paritions, fixing up other tests accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4146c823fc
commit
dcffa4428d
6 changed files with 49 additions and 7 deletions
|
@ -303,6 +303,14 @@ part_get_info_by_dev_and_name_or_num(const char *dev_iface,
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* part_get_bootable() - Find the first bootable partition
|
||||
*
|
||||
* @desc: Block-device descriptor
|
||||
* @return first bootable partition, or 0 if there is none
|
||||
*/
|
||||
int part_get_bootable(struct blk_desc *desc);
|
||||
|
||||
struct udevice;
|
||||
/**
|
||||
* part_create_block_devices - Create block devices for disk partitions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue