02 Oct, 2016

3 commits

  • 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
    Reviewed-by: Tom Rini
    Acked-by: Steve Rae
    Reviewed-by: Simon Glass

    Petr Kulhavy
     
  • Add special target "mbr" (otherwise configurable via CONFIG_FASTBOOT_MBR_NAME)
    to write MBR partition table.
    Partitions are now searched using the generic function which finds any
    partiiton by name. For MBR the partition names hda1, sda1, etc. are used.

    Signed-off-by: Petr Kulhavy
    Reviewed-by: Tom Rini
    Acked-by: Steve Rae
    Reviewed-by: Simon Glass

    Petr Kulhavy
     
  • 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
    Reviewed-by: Tom Rini
    Acked-by: Steve Rae

    Petr Kulhavy
     

15 Mar, 2016

6 commits

  • Rename these functions so that part_ is at the start. This more clearly
    identifies these functions as partition functions.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • 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
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • 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
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • Rename three partition functions so that they start with part_. This makes
    it clear what they relate to.

    Signed-off-by: Simon Glass
    Tested-by: Stephen Warren

    Simon Glass
     
  • 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
    Reviewed-by: Tom Rini
    Tested-by: Stephen Warren

    Simon Glass
     
  • 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
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     

15 Jan, 2016

1 commit


14 Jan, 2016

2 commits


12 Sep, 2015

1 commit


12 Jun, 2014

1 commit

  • Bug: SDCard with a messed up partition but still has a FAT signature
    intact is readable in Linux but unreadable in uboot with 'fatls'.

    Fix: When partition info checking fails, there is no checking for a
    FAT signature (DOS_PBR) which will fail 'fatls'. FAT signature checking
    is done when no valid partition is found in partition table. If FAT
    signature is found, the disk will be read as PBR and continue
    processing.

    Signed-off-by: Darwin Dingel

    Darwin Dingel
     

06 Jun, 2014

1 commit

  • - update the comments regarding lbaint_t usage
    - cleanup casting of values related to the lbaint_t type
    - cleanup of a type that requires a u64

    Tested on little endian ARMv7 and ARMv8 configurations

    Signed-off-by: Steve Rae

    Steve Rae
     

24 Jul, 2013

1 commit


02 May, 2013

1 commit

  • Devices that used to have a whole disk FAT filesystem but got then
    partitioned will most likely still have a FAT or FAT32 signature
    in the first sector as this sector does not get overwritten by
    a partitioning tool (otherwise the tool would risk to kill the mbr).

    The current partition search algorithm will erronously detects such
    a device as a raw FAT device.

    Instead of looking for the FAT or FAT32 signatures immediately we
    use the same algorithm as used by the Linux kernel and first check
    for a valid boot indicator flag on each of the 4 partitions.
    If the value of this flag is invalid for the first entry we then
    do the raw partition check.
    If the flag for any higher partition is wrong we assume the device
    is neiter a MBR nor PBR device.

    Signed-off-by: Egbert Eich

    Egbert Eich
     

15 Mar, 2013

1 commit


17 Oct, 2012

2 commits


09 Oct, 2012

1 commit

  • Logically, a disk that contains a raw FAT filesystem does not in fact
    have a partition table. However, test_part_dos() was claiming that such
    disks did in fact have a DOS-style partition table. This caused
    get_device_and_partition() not to return a whole-disk disk_partition_t,
    since part_type != PART_TYPE_UNKNOWN.

    part_dos.c's print_partition_extended() detected the raw FAT filesystem
    condition and printed a fake partition table that encompassed the whole
    disk.

    However, part_dos.c's get_partition_info_extended() did not return any
    valid partitions in this case. This combination caused
    get_device_and_partition() not to find any valid partitions, and hence
    to return an error.

    Fix test_part_dos() not to claim that raw FAT filesystems are DOS
    partition tables. In turn, this causes get_device_and_partition() to
    return a whole-disk disk_partition_t, and hence the following commands
    work:

    fatls mmc 0 /
    fatls mmc 0:auto /

    An alternative would be to modify print_partition_extended() to detect
    raw FAT filesystems, just like print_partition_extended() does, and to
    return a fake partition in this case. However, this seems logically
    incorrect, and also duplicates code, since get_device_and_partition()
    falls back to returning a whole-disk partition when there is no partition
    table on the device.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

26 Sep, 2012

2 commits


22 Jun, 2012

1 commit


30 Apr, 2012

1 commit


28 Jul, 2011

1 commit


25 Jul, 2010

1 commit


19 Oct, 2009

1 commit


10 Aug, 2009

1 commit


04 Apr, 2009

1 commit

  • 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

    unsik Kim
     

18 Feb, 2009

1 commit


27 Mar, 2008

1 commit


10 Jul, 2007

1 commit


04 Jul, 2007

1 commit

  • 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

    Jon Loeliger
     

13 Oct, 2005

1 commit


25 Feb, 2005

1 commit


24 Feb, 2004

1 commit

  • * Cleanup compiler warnings

    * Fix problem with side effects in macros in include/usb.h

    * Patch by David Benson, 13 Nov 2003:
    bug 841358 - fix TFTP download size limit

    * Fixing bug 850768:
    improper flush_cache() in load_serial()

    * Fixing bug 834943:
    MPC8540 - missing volatile declarations

    * Patch by Stephen Williams, 09 Feb 2004:
    Add support for Xilinx SystemACE chip:
    - New files common/cmd_ace.c and include/systemace.h
    - Hook systemace support into cmd_fat and the partition manager

    * Patch by Travis Sawyer, 09 Feb 2004:
    Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux

    wdenk
     

11 Sep, 2003

2 commits

  • add FAT support for IDE, SCSI and USB

    * Patches by Gleb Natapov, 2 Sep 2003:
    - cleanup of POST code for unsupported architectures
    - MPC824x locks way0 of data cache for use as initial RAM;
    this patch unlocks it after relocation to RAM and invalidates
    the locked entries.

    * Patch by Gleb Natapov, 30 Aug 2003:
    new I2C driver for mpc107 bridge. Now works from flash.

    * Patch by Dave Ellis, 11 Aug 2003:
    - JFFS2: fix typo in common/cmd_jffs2.c
    - JFFS2: fix CFG_JFFS2_SORT_FRAGMENTS option
    - JFFS2: remove node version 0 warning
    - JFFS2: accept JFFS2 PADDING nodes
    - SXNI855T: add AM29LV800 support
    - SXNI855T: move environment from EEPROM to flash
    - SXNI855T: boot from JFFS2 in NOR or NAND flash

    * Patch by Bill Hargen, 11 Aug 2003:
    fixes for I2C on MPC8240
    - fix i2c_write routine
    - fix iprobe command
    - eliminates use of global variables, plus dead code, cleanup.

    wdenk
     
  • (tested with USB memory sticks only)

    * Avoid flicker on TRAB's VFD

    wdenk
     

30 Jun, 2003

1 commit