10 Oct, 2013
2 commits
-
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 0x08000000This 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: Paul Burton
Acked-by: Stefan Roese -
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: Paul Burton
Acked-by: Stefan Roese
12 Apr, 2013
2 commits
-
The prints are out of control. SILENCE!
Signed-off-by: Joe Hershberger
-
Part, Read, and Write functionality that will be used by env_ubi.
Signed-off-by: Joe Hershberger
07 Mar, 2012
1 commit
-
Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.Signed-off-by: Simon Glass
02 Oct, 2011
1 commit
-
cmd_ubi.c: In function ‘ubi_volume_read’:
cmd_ubi.c:319:9: warning: variable ‘count_save’ set but not used
[-Wunused-but-set-variable]Signed-off-by: Marek Vasut
Acked-by: Mike Frysinger
21 Mar, 2011
1 commit
-
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 0After:
=> ubi read 100000 testvol 100000
Read 1048576 bytes from volume testvol to 00100000
=> ubi write 100000 testvol 1000
4096 bytes written to volume testvolSigned-off-by: Stefan Roese
Cc: Wolfgang Denk
04 Dec, 2010
1 commit
-
Automatically unmount UBIFS partition when user changes the UBI device.
Otherwise the following UBIFS commands will crash.Signed-off-by: Stefan Roese
09 Aug, 2010
1 commit
-
Most of the files have U_BOOT_CMD on a separate line,
but a few didn't and had the first line on the same line
as U_BOOT_CMD.This changes these files by adding a line break and a tab
Signed-off-by: Frans Meulenbroeks
25 Jul, 2010
1 commit
-
Lots of code use this construct:
cmd_usage(cmdtp);
return 1;Change cmd_usage() let it return 1 - then we can replace all these
ocurrances byreturn cmd_usage(cmdtp);
This fixes a few places with incorrect return code handling, too.
Signed-off-by: Wolfgang Denk
05 Jul, 2010
1 commit
-
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: Wolfgang Denk
Acked-by: Mike Frysinger
09 Apr, 2010
1 commit
-
gcc 3.4.6 previously reported the following error on many MIPS boards
which utilize UBI:
cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this functionThe current code is structured such that 'vol' will never be used when
it is NULL anyway, but gcc isn't smart enough to figure this out.Signed-off-by: Peter Tyser
Signed-off-by: Stefan Roese
21 Jul, 2009
1 commit
-
Fix incorrect information about size units and correct typo.
Signed-off-by: Andrzej Wolski
Signed-off-by: Stefan Roese
09 Jul, 2009
1 commit
-
The VID header offset is sometimes needed to initialize the UBI
partition. This patch adds it (optionally) to the command line
for the ubi part command.(Lines have been properly wrapped since last version)
Signed-off-by: Simon Kagstrom
Acked-by: Stefan Roese
Signed-off-by: Stefan Roese
13 Jun, 2009
1 commit
-
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 ThermostatUsage:
dtt - Read temperature from digital thermometer and thermostat.After:
=> help dtt
dtt - Read temperature from Digital Thermometer and ThermostatUsage:
dttSigned-off-by: Wolfgang Denk
20 May, 2009
1 commit
-
Return -ENODEV instead of 0 when trying to read from a non existing volume.
Signed-off-by: Andreas Huber
Signed-off-by: Stefan Roese
28 Apr, 2009
1 commit
-
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: Stefan Roese
CC: Kyungmin Park
05 Apr, 2009
1 commit
-
On platforms with multiple NOR chips, currently only the first one
can be selected using the "ubi part" command. This patch fixes this
problem by using different names for the NOR "mtd devices".It also changes the name of the NOR MTD device from "cfi-mtd" to
"norX" (X indexing the device numer) to better match the mtdparts
defaults.Signed-off-by: Stefan Roese
Signed-off-by: Andreas Huber
28 Jan, 2009
2 commits
-
Remove command name from all command "usage" fields and update
common/command.c to display "name - usage" instead of
just "usage". Also remove newlines from command usage fields.Signed-off-by: Peter Tyser
-
Signed-off-by: Peter Tyser
16 Dec, 2008
1 commit
-
Signed-off-by: Wolfgang Denk
10 Dec, 2008
1 commit
-
With this patch we set the type back to NONE upon failing UBI partition
initialization. Otherwise further calls to the UBI subsystem would try
to really access the non-existing UBI partition.Thanks to Michael Lawnick for pointing this out.
Signed-off-by: Stefan Roese
09 Dec, 2008
2 commits
-
Signed-off-by: Stefan Roese
-
With this patch now, the user can call "ubi part" multiple times to
re-connect the UBI device to another MTD partition.Signed-off-by: Stefan Roese
24 Nov, 2008
2 commits
-
With this patch UBI can be used on CFI flash chips.
Signed-off-by: Piotr Ziecik
Signed-off-by: Stefan Roese -
Currently the size parameters of the UBI commands (e.g. "ubi write") are
decoded as decimal instead of hex as default. This patch now interprets
all these values consistantly as hex, as all other standard U-Boot commands
do.Signed-off-by: Stefan Roese
20 Nov, 2008
1 commit
-
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 volumeSigned-off-by: Kyungmin Park
Signed-off-by: Stefan Roese