summaryrefslogtreecommitdiff
path: root/disk/part_iso.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-19common: Drop part.h from common headerSimon Glass1-0/+2
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19part: Drop disk_partition_t typedefSimon Glass1-4/+4
We should not be using typedefs and these make it harder to use forward declarations (to reduce header file inclusions). Drop the typedef. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-09Move most CONFIG_HAVE_BLOCK_DEVICE to KconfigAdam Ford1-1/+1
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-16iso: Reduce verbosity on test and info callsAlexander Graf1-2/+2
The test and info callbacks into the partition callback struct are used by the "part list" command on the command line. That command is used by the distro script. With verb=1 set, "part list" thus throws a lot of warnings about partitions it can't find when an upper layer searches for partitions. So let's reduce verbosity to bring it to the same level of noise as the other partition targets. Signed-off-by: Alexander Graf <agraf@suse.de>
2017-08-26disk: part: align buffer so it can be used with DMA enabled driversStefan Agner1-1/+1
When using ISO partitions with a DMA enabled block device driver reading the ISO partition leads to unaligned DMA operations: CACHE: Misaligned operation at range [bffb7da8, bffb85a8] Align the buffer to make sure we pass a buffer which works for DMA operations. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-10-02disk: part: refactor generic name creation for DOS and ISOPetr Kulhavy1-24/+1
In both DOS and ISO partition tables the same code to create partition name like "hda1" was repeated. Code moved to into a new function part_set_generic_name() in part.c and optimized. Added recognition of MMC and SD types, name is like "mmcsda1". Signed-off-by: Petr Kulhavy <brain@jikos.cz> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-02disk: part: implement generic function part_get_info_by_name()Petr Kulhavy1-0/+1
So far partition search by name has been supported only on the EFI partition table. This patch extends the search to all partition tables. Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from part_efi.c into part.c and make it a generic function which traverses all part drivers and searches all partitions (in the order given by the linked list). For this a new variable struct part_driver.max_entries is added, which limits the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS. Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables. Signed-off-by: Petr Kulhavy <brain@jikos.cz> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com>
2016-07-22iso: Fix part info commandAlexander Graf1-2/+2
Partitions on the iso el torito partition table interpreter only start from partition 1. So when printing out the tables, let's also start counting at 1. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-04-19iso: Allow 512 byte sector sizeAlexander Graf1-5/+31
Real CD-ROMs are pretty obsolete these days. Usually people still keep iso files around, but just put them on USB sticks or SD cards and expect them to "just work". To support this use case with El Torito images, add support for 512 byte sector size to the iso parsing code. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-04-19iso: Start with partition 1Alexander Graf1-2/+2
The generic partition code treats partition 0 as "whole disk". So we should start with partition 1 as the first partition in the iso partition table. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-04-19iso: Make little endian and 64bit safeAlexander Graf1-6/+4
The iso partition table implementation has a few endian and 64bit problems. Clean it up a bit to become endian and bitness safe. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-03-22part_iso: Drop the customer unaligned access functionsSimon Glass1-23/+4
One of these is causing a coverity warning. Drop these functions and use the standard U-Boot ones instead. Reported-by: Coverity (CID: 138499) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-15part: Rename test_part_xx() and print_part_xx()Simon Glass1-4/+4
Rename these functions so that part_ is at the start. This more clearly identifies these functions as partition functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-15dm: block: Adjust device calls to go through helpers functionSimon Glass1-3/+3
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-15dm: block: Rename device number member dev to devnumSimon Glass1-19/+20
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-15dm: part: Rename some partition functionsSimon Glass1-8/+9
Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-15dm: part: Convert partition API use to linker listsSimon Glass1-5/+11
We can use linker lists instead of explicitly declaring each function. This makes the code shorter by avoiding switch() statements and lots of header file declarations. While this does clean up the code it introduces a few code issues with SPL. SPL never needs to print partition information since this all happens from commands. SPL mostly doesn't need to obtain information about a partition either, except in a few cases. Add these cases so that the code will be dropped from each partition driver when not needed. This avoids code bloat. I think this is still a win, since it is not a bad thing to be explicit about which features are used in SPL. But others may like to weigh in. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-15dm: Drop the block_dev_desc_t typedefSimon Glass1-4/+6
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2016-01-15Fix GCC format-security errors and convert sprintfs.Ben Whitten1-1/+1
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-14block: pass block dev not num to read/write/erase()Stephen Warren1-5/+5
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2013-10-15Coding Style cleanup: remove trailing white spaceWolfgang Denk1-1/+1
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-17/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-07-16Fix ext2/ext4 filesystem accesses beyond 2TiBFrederic Leroy1-2/+2
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type, which is required to represent block numbers for storage devices that exceed 2TiB (the block size usually is 512B), e.g. recent hard drives We now use lbaint_t for partition offset to reflect the lbaint_t change, and access partitions beyond or crossing the 2.1TiB limit. This required changes to signature of ext4fs_devread(), and type of all variables relatives to block sector. ext2/ext4 fs uses logical block represented by a 32 bit value. Logical block is a multiple of device block sector. To avoid overflow problem when calling ext4fs_devread(), we need to cast the sector parameter. Signed-off-by: Frédéric Leroy <fredo@starox.org>
2013-05-02disk/iso: Add Support for block sizes > 512 byte to ISO partition supportEgbert Eich1-0/+3
For ISO we check the block size of the device if this is != the CD sector size we assume that the device has no ISO partition. Signed-off-by: Egbert Eich <eich@suse.com>
2013-03-14disk: define HAVE_BLOCK_DEVICE in a common placeStephen Warren1-6/+1
This set of ifdefs is used in a number of places. Move its definition somewhere common so it doesn't have to be repeated. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-06-21Block: Remove MG DISK supportMarek Vasut1-1/+0
This driver is unused and obsolete. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: unsik Kim <donari75@gmail.com>
2009-08-10Partition support: remove newline from partition nameWolfgang Denk1-5/+10
Remove bogus newline character that got added to the .name field of the disk_partition_t structure. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04mflash: Initial mflash supportunsik Kim1-0/+1
Mflash is fusion memory device mainly targeted consumer eletronic and mobile phone. Internally, it have nand flash and other hardware logics and supports some different operation (ATA, IO, XIP) modes. IO mode is custom mode for the host that doesn't have IDE interface. (Many mobile targeted SoC doesn't have IDE bus) This driver support mflash IO mode. Followings are brief descriptions about IO mode. 1. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm) 2. IO mode uses SRAM bus interface. Signed-off-by: unsik Kim <donari75@gmail.com>
2009-02-18disk: convert part_* files to COBJ-$(CONFIG_XXX) styleMike Frysinger1-6/+6
Move the CONFIG_XXX out of the part_XXX.c file and into Makefile to avoid pointless compiles. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-05-21Big white-space cleanup.Wolfgang Denk1-3/+3
This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-03-27ata: add the support for SATA frameworkDave Liu1-0/+2
- add the SATA framework - add the SATA command line Signed-off-by: Dave Liu <daveliu@freescale.com>
2007-07-10disk/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger1-4/+4
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04disk/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger1-3/+3
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
2005-10-13Cleanup for GCC-4.xWolfgang Denk1-7/+7
2005-02-25Cleanup USB and partition defineswdenk1-2/+6
2003-06-30Fix some missing commands, cleanup header fileswdenk1-1/+0
(autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
2003-06-28* Code cleanup:wdenk1-1/+0
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2002-11-19* Patch by Thomas Frieden, 13 Nov 2002:wdenk1-0/+1
Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined.
2002-11-03Initial revisionwdenk1-0/+257