1. 25 Jan, 2016 2 commits
  2. 26 Oct, 2015 1 commit
  3. 11 Sep, 2015 1 commit
    • Simon Glass's avatar
      Move malloc_cache_aligned() to its own header · 6e295186
      Simon Glass authored
      At present malloc.h is included everywhere since it recently was added to
      common.h in this commit:
      
         4519668b mtd/nand/ubi: assortment of alignment fixes
      
      This seems wasteful and unnecessary. We have been trying to trim down
      common.h and put separate functions into separate header files and that
      change goes in the opposite direction.
      
      Move malloc_cache_aligned() to a new header so that this can be avoided.
      The header would perhaps be better named as alignmem.h but it needs to be
      included after common.h and people might be confused by this. With the name
      memalign.h it fits nicely after malloc() in most cases.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarMarcel Ziswiler <marcel.ziswiler@toradex.com>
      6e295186
  4. 28 Aug, 2015 1 commit
  5. 10 Apr, 2015 1 commit
    • Stefan Agner's avatar
      common, ubi: use positive return values for ubi check · 6d0f4526
      Stefan Agner authored
      The ubi check command is expected to not fail and just check whether
      a volume exist or not. Currently, when a volume does not exist, the
      command fails which leads to an error:
      "exit not allowed from main input shell."
      
      Use 1 to indicate that a volume does not exist. This allows to use
      ubi check in an if statement, e.g.
      if ubi check rootfs; then; echo "exists"; else; echo "not there"; fi
      6d0f4526
  6. 25 Aug, 2014 1 commit
    • Heiko Schocher's avatar
      mtd, ubi, ubifs: resync with Linux-3.14 · ff94bc40
      Heiko Schocher authored
      resync ubi subsystem with linux:
      
      commit 455c6fdbd219161bd09b1165f11699d6d73de11c
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Sun Mar 30 20:40:15 2014 -0700
      
          Linux 3.14
      
      A nice side effect of this, is we introduce UBI Fastmap support
      to U-Boot.
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Joerg Krause <jkrause@posteo.de>
      ff94bc40
  7. 18 Jul, 2014 1 commit
  8. 21 Feb, 2014 1 commit
  9. 09 Oct, 2013 2 commits
    • Paul Burton's avatar
      cmd_ubi: add write.part command, to write a volume in multiple parts · cc734f5a
      Paul Burton authored
      This allows you to write data to an UBI volume when the amount of memory
      available to write that data from is less than the total size of the
      data. For example, you may split a root filesystem UBIFS image into
      parts, provide the total size of the image to the first write.part
      command and then use multiple write.part commands to write the
      subsequent parts of the volume. This results in a sequence of commands
      akin to:
      
        ext4load mmc 0:1 0x80000000 rootfs.ubifs.0
        ubi write.part 0x80000000 root 0x08000000 0x18000000
        ext4load mmc 0:1 0x80000000 rootfs.ubifs.1
        ubi write.part 0x80000000 root 0x08000000
        ext4load mmc 0:1 0x80000000 rootfs.ubifs.2
        ubi write.part 0x80000000 root 0x08000000
      
      This would write 384MiB of data to the UBI volume 'root' whilst only
      requiring 128MiB of said data to be held in memory at a time.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      cc734f5a
    • Paul Burton's avatar
      cmd_ubi: use int64_t volume size for 'ubi create' · dd7185f1
      Paul Burton authored
      int64_t matches the bytes field in struct ubi_mkvol_req to which the
      size is assigned. With the prior signed 32 bit integer, volumes were
      restricted to being less than 2GiB in size.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      dd7185f1
  10. 11 Apr, 2013 2 commits
  11. 06 Mar, 2012 1 commit
  12. 01 Oct, 2011 1 commit
  13. 21 Mar, 2011 1 commit
    • Stefan Roese's avatar
      UBI: Fix error code handling in ubi commands · 7f5d8a4d
      Stefan Roese authored
      Some ubi commands returned negative error codes, resulting in
      the following error message on the prompt:
      
      "exit not allowed from main input shell."
      
      Negative error codes are not allowed.
      
      This patch now changes the UBI code to return positive error codes.
      Additionally "better" error codes are used, for example "ENOMEM" when
      no memory is available for the UBI volume creation any more.
      
      Also the output of some commands is enhanced:
      
      Before:
      
      => ubi read 100000 testvol 100000
      Volume testvol found at volume id 0
      read 1048576 bytes from volume 0 to 100000(buf address)
      => ubi write 100000 testvol 1000
      Volume testvol found at volume id 0
      
      After:
      
      => ubi read 100000 testvol 100000
      Read 1048576 bytes from volume testvol to 00100000
      => ubi write 100000 testvol 1000
      4096 bytes written to volume testvol
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      7f5d8a4d
  14. 03 Dec, 2010 1 commit
  15. 08 Aug, 2010 1 commit
  16. 24 Jul, 2010 1 commit
  17. 04 Jul, 2010 1 commit
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  18. 09 Apr, 2010 1 commit
  19. 20 Jul, 2009 2 commits
  20. 09 Jul, 2009 1 commit
  21. 12 Jun, 2009 1 commit
    • Wolfgang Denk's avatar
      General help message cleanup · a89c33db
      Wolfgang Denk authored
      Many of the help messages were not really helpful; for example, many
      commands that take no arguments would not print a correct synopsis
      line, but "No additional help available." which is not exactly wrong,
      but not helpful either.
      
      Commit ``Make "usage" messages more helpful.'' changed this
      partially. But it also became clear that lots of "Usage" and "Help"
      messages (fields "usage" and "help" in struct cmd_tbl_s respective)
      were actually redundant.
      
      This patch cleans this up - for example:
      
      Before:
      	=> help dtt
      	dtt - Digital Thermometer and Thermostat
      
      	Usage:
      	dtt         - Read temperature from digital thermometer and thermostat.
      
      After:
      	=> help dtt
      	dtt - Read temperature from Digital Thermometer and Thermostat
      
      	Usage:
      	dtt
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      a89c33db
  22. 20 May, 2009 1 commit
  23. 27 Apr, 2009 1 commit
    • Stefan Roese's avatar
      ubi: Remove flash selection parameter (nor|nand|onenand) from "ubi part" · 2d579e50
      Stefan Roese authored
      This patch removes the now unnecessary flash type parameter from the
      "ubi part" command. Currently the user has to define the type of flash
      he will be using UBI on. Example:
      
      => ubi part nor partition1
      
      With this patch this type parameter is not needed anymore. The user can
      now select the partition directly without the flash type paramter.
      Example:
      
      => ubi part partition1
      
      This breaks backward compatibility right now because of the change in the
      command syntax. But UBI support is still quite fresh and the advantage of
      this new command is syntax big enough for this change. Additionally the
      code is much cleaner now.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      CC: Kyungmin Park <kyungmin.park@samsung.com>
      2d579e50
  24. 04 Apr, 2009 1 commit
  25. 28 Jan, 2009 2 commits
  26. 16 Dec, 2008 1 commit
  27. 10 Dec, 2008 1 commit
  28. 09 Dec, 2008 2 commits
  29. 24 Nov, 2008 2 commits
  30. 19 Nov, 2008 1 commit
    • Kyungmin Park's avatar
      UBI: Add UBI command support · 694a0b3f
      Kyungmin Park authored
      This patch adds these UBI commands:
      
      ubi part [nand|onenand] [part] - Show or set current partition
      ubi info [l[ayout]] -Display volume and UBI layout information
      ubi create[vol] volume [size] [type] - Create volume name with size
      ubi write[vol] address volume size - Write volume from address with size
      ubi read[vol] address volume [size] - Read volume to address with size
      ubi remove[vol] volume - Remove volume
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      694a0b3f