diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-03-23 08:50:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-25 13:25:51 +0100 |
commit | d44fdb7d9b8527c758deefc4262fedd6a121ffc6 (patch) | |
tree | 6d8f2c3218d1c745bda59eb6a9120c7ea6dadf3b /common/partitions/dos.c | |
parent | 41fd0332e797c0a3c6a0d9cbf14e7528f2a3209d (diff) | |
download | barebox-d44fdb7d9b8527c758deefc4262fedd6a121ffc6.tar.gz barebox-d44fdb7d9b8527c758deefc4262fedd6a121ffc6.tar.xz |
x86: drop legacy (PC BIOS) boot in favor of EFI
The 16-bit port has experienced bitrot and failed to compile with more
recent linkers for at least a year. Fixing the linker error is insufficient
to restore a barebox that can boot to shell. This continued breakage likely
means that there are no users interested in updating. As new x86 projects
should be using MACH_EFI_GENERIC anyway, retire support for 16-bit legacy
boot (MACH_X86_GENERIC).
Acked-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/partitions/dos.c')
-rw-r--r-- | common/partitions/dos.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/common/partitions/dos.c b/common/partitions/dos.c index 0012c48756..6c76aac371 100644 --- a/common/partitions/dos.c +++ b/common/partitions/dos.c @@ -36,31 +36,6 @@ static inline int is_extended_partition(struct partition *p) p->dos_partition_type == LINUX_EXTENDED_PARTITION); } -/** - * Guess the size of the disk, based on the partition table entries - * @param dev device to create partitions for - * @param table partition table - * @return sector count - */ -static uint64_t disk_guess_size(struct device_d *dev, - struct partition_entry *table) -{ - uint64_t size = 0; - int i; - - for (i = 0; i < 4; i++) { - if (get_unaligned_le32(&table[i].partition_start) != 0) { - uint64_t part_end = get_unaligned_le32(&table[i].partition_start) + - get_unaligned_le32(&table[i].partition_size); - - if (size < part_end) - size = part_end; - } - } - - return size; -} - static void *read_mbr(struct block_device *blk) { void *buf = malloc(SECTOR_SIZE); @@ -209,10 +184,6 @@ static void dos_partition(void *buf, struct block_device *blk, table = (struct partition_entry *)&buffer[446]; - /* valid for x86 BIOS based disks only */ - if (IS_ENABLED(CONFIG_DISK_BIOS) && blk->num_blocks == 0) - blk->num_blocks = disk_guess_size(blk->dev, table); - for (i = 0; i < 4; i++) { pentry.first_sec = get_unaligned_le32(&table[i].partition_start); pentry.size = get_unaligned_le32(&table[i].partition_size); |