20 Jan, 2014

5 commits

  • The summary already has other verification. This one is not needed.

    The check caused summaries to be ignored if they were not on the
    numbered block. This caused problems when a summary was embedded in an
    image and the image is written to a flash with bad blocks.

    Signed-off-by: Charles Manning

    Charles Manning
     
  • For files where we actually have extent indexes following
    an extent header (ext_block->eh_depth != 0), the do/while
    loop from ext4fs_get_extent_block() does not select the
    proper extent index structure.

    For example, if we have:

    ext_block->eh_depth = 1
    ext_block->eh_entries = 1
    fileblock = 0
    index[0].ei_block = 0

    the do/while loop will exit with i set to 0 and the
    ext4fs_get_extent_block() function will return 0, even if
    there was a valid extent index structure following the
    header.

    Signed-off-by: Ionut Nicu
    Signed-off-by: Mathias Rulf

    Ionut Nicu
     
  • Using fs->blksz in ext4fs_get_extent_block() is not
    correct since fs->blksz is not initialized on the
    read path. Use EXT2_BLOCK_SIZE() instead which will
    produce the desired output.

    Signed-off-by: Ionut Nicu
    Signed-off-by: Mathias Rulf

    Ionut Nicu
     
  • Curently, we are using 32 bit multiplication to calculate the offset,
    so the result will always be 32 bit.
    This can silently cause file system corruption when performing a write
    operation on partition larger than 4 GiB.

    This patch address the issue by simply promoting the terms to 64 bit,
    and let compilers decide how to do the multiplication efficiently.

    Signed-off-by: Ma Haijun

    Ma Haijun
     
  • It may cause file system corruption when do a write operation.
    This issue only affects boards that use 32 bit lbaint_t.

    Signed-off-by: Ma Haijun

    Ma Haijun
     

13 Dec, 2013

2 commits


18 Nov, 2013

2 commits


09 Nov, 2013

1 commit

  • Curently memcpy copies string without null terminating char because
    function strlen returns only number of characters excluding
    null terminating character. Replace memcpy with strcpy.

    Signed-off-by: Piotr Wilczek
    Signed-off-by: Kyungmin Park
    CC: Tom Rini

    Piotr Wilczek
     

01 Nov, 2013

2 commits


16 Oct, 2013

1 commit

  • commit 39ac34473f3c96e77cbe03a49141771ed1639486 ("cmd_mtdparts: use 64
    bits for flash size, partition size & offset") introduced warnings
    in a couple places due to printf formats or pointer casting.

    This patch fixes the warnings pointed out here:
    http://lists.denx.de/pipermail/u-boot/2013-October/164981.html

    Signed-off-by: Scott Wood
    Cc: York Sun
    Cc: Stefan Roese
    Cc: Paul Burton
    Cc: Tom Rini

    Scott Wood
     

15 Oct, 2013

1 commit


08 Oct, 2013

1 commit

  • As documented, almost all U-Boot commands expect numbers to be entered
    in hexadecimal input format. (Exception: for historical reasons, the
    "sleep" command takes its argument in decimal input format.)

    This rule was broken for the "load" command; for details please see
    especially commits 045fa1e "fs: add filesystem switch libary,
    implement ls and fsload commands" and 3f83c87 "fs: fix number base
    behaviour change in fatload/ext*load". In the result, the load
    command would always require an explicit "0x" prefix for regular
    (i. e. base 16 formatted) input.

    Change this to use the standard notation of base 16 input format.
    While strictly speaking this is a change of the user interface, we
    hope that it will not cause trouble. Stephen Warren comments (see
    [1]):

    I suppose you can change the behaviour if you want; anyone
    writing "0x..." for their values presumably won't be
    affected, and if people really do assume all values in U-Boot
    are in hex, presumably nobody currently relies upon using
    non-prefixed values with the generic load command, since it
    doesn't work like that right now.

    [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/171172

    Acked-by: Tom Rini
    Acked-by: Stephen Warren
    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

07 Sep, 2013

1 commit

  • In the set_cluster() function, it will convert the buffer size to sector
    numbers. Then call disk_write() to write by sector.
    For remaining buffer, the size is less than a sector, call disk_write()
    again to write them in one sector.

    But if the total buffer size is less then one sector, the original code
    will call disk_write() with zero sector number. It is unnecessary.
    So this patch fix this. Now it will not call disk_write() if total buffer size
    is less than one sector.

    Signed-off-by: Josh Wu

    Wu, Josh
     

20 Aug, 2013

1 commit


24 Jul, 2013

1 commit


22 Jul, 2013

1 commit

  • Fix reading ext4_extent_header struture on BE machines. Some 16 bit
    fields where converted to 32 bit fields, due to the byte swap on BE
    machines the containing value was corrupted. Therefore reading ext4
    filesystems on BE machines where broken before.

    Signed-off-by: Rommel Custodio
    [sent via git-send-email; rework commit message]
    Signed-off-by: Andreas Bießmann
    Reviewed-by: Simon Glass
    Tested-by: Simon Glass
    Tested-by: Lukasz Majewski

    Rommel Custodio
     

16 Jul, 2013

2 commits

  • 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

    Frederic Leroy
     
  • "cramfsload uImage_1" succeeds even though the actual file is named
    "uImage".

    Fix file name comparison when one name is the prefix of the other.

    Signed-off-by: Holger Brunck
    cc: Wolfgang Denk
    cc: Albert ARIBAUD

    Holger Brunck
     

01 Jun, 2013

2 commits

  • Tom Rini
     
  • This patch is essentially an update of u-boot MTD subsystem to
    the state of Linux-3.7.1 with exclusion of some bits:

    - the update is concentrated on NAND, no onenand or CFI/NOR/SPI
    flashes interfaces are updated EXCEPT for API changes.

    - new large NAND chips support is there, though some updates
    have got in Linux-3.8.-rc1, (which will follow on top of this patch).

    To produce this update I used tag v3.7.1 of linux-stable repository.

    The update was made using application of relevant patches,
    with changes relevant to U-Boot-only stuff sticked together
    to keep bisectability. Then all changes were grouped together
    to this patch.

    Signed-off-by: Sergey Lapin
    [scottwood@freescale.com: some eccstrength and build fixes]
    Signed-off-by: Scott Wood

    Sergey Lapin
     

24 May, 2013

1 commit

  • Commit 50ce4c0 "fs/ext4: Support device block sizes != 512 bytes"
    modified ext4fs_set_blk_dev() to calculate total_sect based on
    get_fs()->dev_desc->log2blksz rather than SECTOR_SIZE. However, this
    value wasn't yet assigned. Move the assignment earlier so the code
    doesn't crash or hang.

    Cc: Egbert Eich
    Tested-by: Tom Rini
    Signed-off-by: Stephen Warren

    Stephen Warren
     

10 May, 2013

1 commit


02 May, 2013

1 commit


01 May, 2013

2 commits


12 Apr, 2013

1 commit


02 Apr, 2013

1 commit

  • 'bool' is defined in random places. This patch consolidates them into a
    single header file include/linux/types.h, using stdbool.h introduced in C99.

    All other #define, typedef and enum are removed. They are all consistent with
    true = 1, false = 0.

    Replace FALSE, False with false. Replace TRUE, True with true.
    Skip *.py, *.php, lib/* files.

    Signed-off-by: York Sun

    York Sun
     

05 Mar, 2013

8 commits


01 Mar, 2013

1 commit


04 Feb, 2013

1 commit

  • ifdefs in the code are making it harder to read.
    The use of simple if(vfat_enabled) makes no more code and is cleaner.
    (the code is discarded by the compiler instead of the preprocessor.)
    NB: if -O0 is used, the code won't be discarded

    and bonus, now the code compiles even if CONFIG_SUPPORT_VFAT is not
    defined.

    Signed-off-by: Richard Genoud

    Richard Genoud