16 Jan, 2019

1 commit


22 Nov, 2018

1 commit

  • Its only called from this file, so make it static. While at it, remove
    some occurances of multiple blank lines as well.

    Signed-off-by: Stefan Roese
    Cc: Boris Brezillon
    Cc: Miquel Raynal
    Reviewed-by: Miquel Raynal
    Reviewed-by: Boris Brezillon
    Reviewed-by: Jagan Teki

    Stefan Roese
     

13 Nov, 2018

1 commit

  • Commit c58fb2cdb3e4 ("cmd: ubi: clean the partition handling")
    introduced a call to mtd_probe_devices() in the ubi_attach() path
    and this function takes care of parsing mtdparts/mtdids and
    creating/registering the associated mtd partitions.

    The mtdparts_init() call in the ubi_detach() path is not only
    unnecessary but can sometimes print error messages even when things
    work properly (that's the case with SPI NAND devices that have not
    been probed with 'mtd list'), which is misleading.

    Remove this call to mtdparts_init() and drop the dependency on
    CMD_MTDPARTS.

    Fixes: c58fb2cdb3e4 ("cmd: ubi: clean the partition handling")
    Reported-by: Stefan Roese
    Signed-off-by: Boris Brezillon
    Tested-by: Stefan Roese
    Reviewed-by: Lukasz Majewski
    Reviewed-by: Jagan Teki

    Boris Brezillon
     

03 Oct, 2018

2 commits


29 Sep, 2018

1 commit

  • cmd_ubifs_umount() function would be called directly instead of involving
    whole command machinery in generic firmware loader, so checking on
    ubifs_initialized status need to be done in cmd_ubifs_umount() without
    breaking original functionality design.

    Signed-off-by: Tien Fong Chee
    Reviewed-by: Marek Vasut
    Reviewed-by: Heiko Schocher
    [trini: Fix conflicting type error in cmd/ubi.c]
    Signed-off-by: Tom Rini

    Tien Fong Chee
     

20 Sep, 2018

1 commit

  • These definitions are simply not used and are misleading because similar
    definitions exist in jffs2/load_kernel.h and are used widely to define
    MTD device types (which is, by the way, totally redundant with what the
    MTD core does). Remove these definitions.

    Signed-off-by: Miquel Raynal
    Acked-by: Jagan Teki
    Reviewed-by: Boris Brezillon

    Miquel Raynal
     

26 Jul, 2018

1 commit

  • On 64bit platforms we would otherwise see:
    ../cmd/ubi.c: In function 'ubi_volume_read':
    ../cmd/ubi.c:359:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]

    Fixes: 68c7025d99db ("cmd: ubi: print load size after establishing volume size")
    Signed-off-by: Tom Rini

    Tom Rini
     

12 Jul, 2018

2 commits

  • When trying to attach an UBI MTD partition via "ubi part", it may happen
    that the MTD partition defined in U-Boot (via mtdparts) is not big
    enough than the one, where the UBI device has been created on. This
    may lead to errors, which are not really descriptive to debug and
    solve this issue, like:

    ubi0 error: vtbl_check: too large reserved_pebs 1982, good PEBs 1020
    ubi0 error: vtbl_check: volume table check failed: record 0, error 9

    or:

    ubi0 error: init_volumes: not enough PEBs, required 1738, available 1020
    ubi0 error: ubi_wl_init: no enough physical eraseblocks (-718, need 1)
    ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -12

    Lets add an additional message upon attach failure, to aid the U-Boot
    user to solve this problem.

    Signed-off-by: Stefan Roese
    Cc: Stefano Babic
    Cc: Heiko Schocher

    Stefan Roese
     
  • When using static volumes, the file size stored in the volume is
    determined at runtime. Currently the ubi command prints the file
    size specified on the console, which leads to a rather confusing
    series of messages:
    # ubi read ${fdt_addr_r} testvol
    Read 0 bytes from volume testvol to 82000000
    No size specified -> Using max size (179924992)

    Make sure to print the actual size read in any case:
    # ubi read ${fdt_addr_r} testvol
    No size specified -> Using max size (179924992)
    Read 179924992 bytes from volume testvol to 82000000

    Signed-off-by: Stefan Agner

    Stefan Agner
     

12 Sep, 2017

1 commit

  • After a successful read of a UBI volume, the variable filesize is set
    to the number of read bytes. To boot linux with a raw initramfs/initrd,
    you must specify the exact size of the initramfs/initrd image in boot
    command. If the initramfs/inird is read from UBI volume, $filesize is
    required to access the number of read bytes.

    Example:
    ubi read ${loadaddr} kernelvol
    ubi read ${fdtaddr} dtbvol
    ubi read ${initrd_addr} initrdvol
    bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr}

    Signed-off-by: Holger Dengler
    Reviewed-by: Heiko Schocher

    Holger Dengler
     

18 Apr, 2017

1 commit


26 Jan, 2017

1 commit


27 Sep, 2016

1 commit


24 Sep, 2016

1 commit


10 Jun, 2016

1 commit


25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass