09 Jan, 2014

1 commit

  • Provide a way to use any host file or device as a block device in U-Boot.
    This can be used to provide filesystem access within U-Boot to an ext2
    image file on the host, for example.

    The support is plumbed into the filesystem and partition interfaces.

    We don't want to print a message in the driver every time we find a missing
    device. Pass the information back to the caller where a message can be printed
    if desired.

    Signed-off-by: Henrik Nordström
    Signed-off-by: Simon Glass
    - Removed change to part.c get_device_and_partition()

    Signed-off-by: Simon Glass
    Reviewed-by: Simon Glass

    Henrik Nordström
     

24 Jul, 2013

1 commit


22 Jul, 2013

1 commit

  • The problem here is that uboot can't mount ext4 filesystem with
    commit "50ce4c07df1" applied. We use hard-coded "SECTOR_SIZE"(512)
    before this commit, now we introduce (block_dev_desc_t *)->log2blksz
    to replace this macro. And after we calling do_ls()->fs_set_blk_dev(),
    the variable log2blksz is not initialized, which it's not correct.

    And this patch try to solve the problem by caculating the value of
    log2blksz from variable blksz.

    Lan Yixun (dlan)
     

15 Mar, 2013

1 commit


05 Mar, 2013

1 commit


07 Dec, 2012

1 commit

  • In order to calculate the capability, we use the below expression to check:
    ((dev_desc->lba * dev_desc->blksz)>0L)
    If the capability is greater than 4GB (e.g. 8GB = 8 * 1024 * 104 * 1024),
    the result will overflow, the low 32bit may be zero.

    Therefore, change to check each variable to fix this potential issue.

    Signed-off-by: Jerry Huang

    Jerry Huang
     

22 Oct, 2012

1 commit

  • Currently, if the disk partition code is compiled with all of the parition
    types compiled out, it hits an #error which stops the build. This change
    adjusts that file so that those functions will fall through to their defaults
    in those cases instead of breaking the build. These functions are needed
    because other code calls them, and that code is needed because other config
    options are overly broad and bring in support we don't need along with
    support we do.

    Also reduce repetition of the 6-term #ifdef throughout the file.

    Signed-off-by: Gabe Black
    Signed-off-by: Simon Glass

    Gabe Black
     

20 Oct, 2012

1 commit

  • When get_device_and_partition() finds a disk without a partition table,
    under some conditions, it "returns" a disk_partition_t that describes
    the entire raw disk. Make sure to initialize all fields in the partition
    descriptor in that case.

    The value chosen for name is just some arbitrary descriptive string.

    The value chosen for info matches the check at the end of
    get_device_and_partition(). However, it's probably not that important;
    it's not obvious that the value is really used.

    Reported-by: Benoît Thébaudeau
    Signed-off-by: Stephen Warren
    Reviewed-by: Benoît Thébaudeau
    Signed-off-by: Tom Rini

    Stephen Warren
     

17 Oct, 2012

1 commit

  • When no valid partitions are found, guarantee that we return -1. This
    most likely already happens, since the most recent get_partition_info()
    will have returned an error. However, it's best to be explicit.

    Remove an unnecessary assignment of ret=0 in the success case; this value
    is over-written with the processed partition ID later.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

29 Sep, 2012

1 commit

  • Commit 10a37fd "disk: get_device_and_partition() "auto" partition"
    prevented the use of "-" on the command-line to request fallback to the
    $bootdevice environment variable instead. This patch allows that, or an
    empty string "" to be used.

    Tested:
    setenv bootfile /boot/zImage
    setenv bootdevice 0:1
    ext2load mmc 0:1
    ext2load mmc -
    ext2load mmc ""

    Signed-off-by: Stephen Warren

    Stephen Warren
     

26 Sep, 2012

5 commits

  • Each EFI partition table entry contains a UUID. Extend U-Boot's struct
    disk_partition to be able to store this information, and modify
    get_partition_info_efi() to fill it in.

    The implementation of uuid_string() was derived from the Linux kernel,
    tag v3.6-rc4 file lib/vsprintf.c function uuid_string().

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • Rework get_device_and_partition() to:
    a) Implement a new partition ID of "auto", which requests that U-Boot
    search for the first "bootable" partition, and fall back to the first
    valid partition if none is found. This way, users don't need to
    specify an explicit partition in their commands.
    b) Make use of get_device().
    c) Add parameter to indicate whether returning a whole device is
    acceptable, or whether a partition is mandatory.
    d) Make error-checking of the user's device-/partition-specification
    more complete. In particular, if strtoul() doesn't convert all
    characters, it's an error rather than just ignored.

    The resultant device/partition returned by the function will be as
    follows, based on whether the disk has a partition table (ptable) or not,
    and whether the calling command allows the whole device to be returned
    or not.

    (D and P are integers, P >= 1)

    D
    D:
    No ptable:
    !allow_whole_dev: error
    allow_whole_dev: device D
    ptable:
    device D partition 1
    D:0
    !allow_whole_dev: error
    allow_whole_dev: device D
    D:P
    No ptable: error
    ptable: device D partition P
    D:auto
    No ptable:
    !allow_whole_dev: error
    allow_whole_dev: device D
    ptable:
    first partition in device D with bootable flag set.
    If none, first valid paratition in device D.

    Note: In order to review this patch, it's probably easiest to simply
    look at the file contents post-application, rather than reading the
    patch itself.

    Signed-off-by: Rob Herring
    [swarren: Rob implemented scanning for bootable partitions. I fixed a
    couple of issues there, switched the syntax to ":auto", added the
    error-checking rework, and ":0" syntax for the whole device]
    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • This patch introduces function get_device(). This looks up a
    block_dev_desc_t from an interface name (e.g. mmc) and device number
    (e.g. 0). This function is essentially the non-partition-specific
    prefix of get_device_and_partition().

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • All block device related commands (scsiboot, fatload, ext2ls, etc.) have
    simliar duplicated device and partition parsing and selection code. This
    adds a common function to replace various implementations.

    The new function has an enhancement over current versions. If no device
    or partition is specified on the command line, the bootdevice env variable
    will be used (scsiboot does this).

    Signed-off-by: Rob Herring

    Rob Herring
     
  • Now that get_device_and_partition() always calls get_partition_info()
    when disk.c is compiled, we must always compile the function, rather
    than ifdef it away.

    The implementation must be conditional based on CONFIG_CMD_* etc., since
    that's what e.g. part_dos.c uses to ifdef out get_partition_info_dos();
    CONFIG_DOS_PARTITION can be enabled even without those commands being
    enabled.

    Technically, this change is required before Rob's "disk/part: introduce
    get_device_and_partition" patch. However, at least when the compiler
    optimizer is turned on, it isn't required before then in practice,
    since get_device_and_partition() calls get_dev(), which is stubbed out
    in disk.c under exactly the same conditions that get_partition_info()
    is not compiled, and hence the compiler never generates code for the
    call to the missing function. However, in my later patch "disk:
    get_device_and_partition() "auto" partition and cleanup", the optimizer
    doesn't succeed at this, and may attempt to reference the undefined
    function.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

22 Jun, 2012

1 commit


27 Mar, 2012

1 commit

  • The patch below fixes device enumeration through the U-Boot API.

    Device enumeration crashes when the system in question doesn't
    have any RAM mapped to address zero (I discovered this on a
    BeagleBone board), since the enumeration calls get_dev with a
    NULL ifname sometimes which then gets passed down to strncmp().

    This fix simply ensures that get_dev returns NULL when invoked
    with a NULL ifname.

    Signed-off-by: Tim Kientzle
    Signed-off-by: Anatolij Gustschin

    Tim Kientzle
     

13 Apr, 2011

1 commit


30 Oct, 2010

1 commit

  • By now, the majority of architectures have working relocation
    support, so the few remaining architectures have become exceptions.
    To make this more obvious, we make working relocation now the default
    case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.

    Signed-off-by: Wolfgang Denk
    Tested-by: Heiko Schocher
    Tested-by: Reinhard Meyer

    Wolfgang Denk
     

20 Sep, 2010

1 commit


19 Sep, 2010

1 commit


11 Aug, 2010

1 commit


09 Dec, 2009

1 commit


03 Oct, 2009

1 commit

  • Add #ifdefs where necessary to not perform relocation fixups. This
    allows boards/architectures which support relocation to trim a decent
    chunk of code.

    Note that this patch doesn't add #ifdefs to architecture-specific code
    which does not support relocation.

    Signed-off-by: Peter Tyser

    Peter Tyser
     

16 May, 2009

1 commit

  • Commit 574b319512 introduced a subtle bug by mixing a list of tests
    for "dev_desc->type" and "dev_desc->if_type" into one switch(), which
    then mostly did not work because "dev_desc->type" cannot take any
    "IF_*" type values. A later fix in commit 8ec6e332ea changed the
    switch() into testing "dev_desc->if_type", but at this point the
    initial test for unknown device types was completely lost, which
    resulted in output like that for IDE ports without device attached:

    Device 1: Model: Firm: Ser#:
    Type: # 1F #
    Capacity: not available

    This patch re-introduces the missing test for unknown device types.

    Signed-off-by: Wolfgang Denk
    Cc: Stefan Roese
    Cc: Detlev Zundel
    Tested-by: Stefan Roese

    Wolfgang Denk
     

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
     

21 Mar, 2009

1 commit

  • This brings in support for the %p modifier which allows us to easily print
    out things like ip addresses, mac addresses, and pointers.

    It also converts the rarely used 'q' length modifier to the common 'L'
    modifier when dealing with quad types.

    While this new code is a bit larger (~1k .text), most of it should be made
    up by converting the existing ip/mac address code to use format modifiers.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

19 Oct, 2008

2 commits


23 Sep, 2008

1 commit


09 Sep, 2008

1 commit


04 Jun, 2008

1 commit


10 May, 2008

2 commits


27 Mar, 2008

1 commit


03 Aug, 2007

1 commit


11 Jul, 2007

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
     

23 Jun, 2007

1 commit

  • - Show on the Status LEDs, some States of the board.
    - Get the MAC addresses from the EEProm
    - use PREBOOT
    - use the CF on the board.
    - check the U-Boot image in the Flash with a SHA1
    checksum.
    - use dynamic TLB entries generation for the SDRAM

    Signed-off-by: Heiko Schocher

    Heiko Schocher