07 Nov, 2018
1 commit
-
Add local size_t variable to crypto_comp_decompress as intermediate
storage for destination length to avoid memory corruption and incorrect
results on 64 bit targets.This is what linux does for the various lz compression implementations.
Signed-off-by: Paul Davey
Cc: Heiko Schocher
Tested-by: Heiko Schocher
09 May, 2018
1 commit
-
This patch solves assert failed displayed in the console during a boot.
The root cause is that the ubifs_inode is not already allocated when
ubifs_printdir and ubifs_finddir functions are called.Trace showing the issue:
feed 'boot.scr.uimg', ino 94, new f_pos 0x17b40ece
dent->ch.sqnum '7132', creat_sqnum 3886945402880
UBIFS assert failed in ubifs_finddir at 436
INODE ALLOCATION: creat_sqnum '7129'
Found U-Boot script /boot.scr.uimgSigned-off-by: Christophe Kerello
Signed-off-by: Patrice Chotard
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
20 Nov, 2017
1 commit
-
kfree() calls free.
free() checks if the parameter is NULL.Signed-off-by: Heinrich Schuchardt
16 Aug, 2017
1 commit
-
We are now using an env_ prefix for environment functions. Rename these
commonly used functions, for consistency. Also add function comments in
common.h.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass
06 Jun, 2017
1 commit
-
This patch fixes the below warning by typecasting it properly
fs/ubifs/ubifs.c: In function 'ubifs_load':
fs/ubifs/ubifs.c:942:29: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
err = ubifs_read(filename, (void *)addr, 0, size, &actread);Signed-off-by: Siva Durga Prasad Paladugu
Signed-off-by: Michal Simek
Reviewed-by: Heiko Schocher
31 Oct, 2016
1 commit
-
Signed-off-by: Vagrant Cascadian
Reviewed-by: Simon Glass
15 Mar, 2016
2 commits
-
Rename this function to blk_get_device_part_str(). This is a better name
because it makes it clear that the function returns a block device and
parses a string.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren
19 Jan, 2016
1 commit
-
In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously. Convert all of these to the correct SPDX-License-Identifier
tag.Signed-off-by: Tom Rini
26 Oct, 2015
1 commit
-
sync with linux v4.2
commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds
Date: Sun Aug 30 11:34:09 2015 -0700Linux 4.2
This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.Signed-off-by: Heiko Schocher
Tested-by: Ezequiel Garcia
25 Oct, 2015
2 commits
-
Implement the necessary functions for implementing generic fs support
for ubifs.Signed-off-by: Hans de Goede
Reviewed-by: Heiko Schocher -
Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.Signed-off-by: Hans de Goede
Reviewed-by: Heiko Schocher
12 Sep, 2015
1 commit
-
At present malloc.h is included everywhere since it recently was added to
common.h in this commit:4519668 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: Simon Glass
Acked-by: Marcel Ziswiler
29 Aug, 2015
1 commit
-
Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer
alignment into account which led to failures of the following form:ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108Signed-off-by: Marcel Ziswiler
Reviewed-by: Simon Glass
Acked-by: Scott Wood
[trini: Add __UBOOT__ hunk to lib/zlib/zutil.c due to malloc.h in common.h]
Signed-off-by: Tom Rini
28 Jan, 2015
1 commit
-
This commit is a preperation for a subsequent UBIFS commit
which needs atomic_long operations.Therefor "include/asm-generic/atomic-long.h" is imported
from 1860e37 Linux 3.15Signed-off-by: Anton Habegger
17 Sep, 2014
1 commit
-
U-Boot has imported various source files from other projects,
mostly Linux.Something like
#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endifis an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.Signed-off-by: Masahiro Yamada
Acked-by: Marek Vasut
Acked-by: Heiko Schocher
26 Aug, 2014
1 commit
-
resync ubi subsystem with linux:
commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds
Date: Sun Mar 30 20:40:15 2014 -0700Linux 3.14
A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.Signed-off-by: Heiko Schocher
Signed-off-by: Tom Rini
Cc: Marek Vasut
Cc: Sergey Lapin
Cc: Scott Wood
Cc: Joerg Krause
01 Mar, 2013
1 commit
-
Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/
Signed-off-by: Simon Glass
10 Sep, 2012
1 commit
-
Using ZLIB compression with UBIFS fails if last data node is not a size of
UBIFS_BLOCK_SIZE (4096 bytes).Easiest way to test this is trying to read a file smaller than 4k:
=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
UBIFS error (pid 0): read_block: bad data node (block 0, inode 2506)
UBIFS error (pid 0): do_readpage: cannot read page 0 of inode 2506, error -22
Error reading file '/etc/fstab'
/etc/fstab not found!
exit not allowed from main input shell.
=>With this patch:
=> ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
Done
=>Signed-off-by: Veli-Pekka Peltola
Cc: kmpark@infradead.org
Tested-by: Andreas Bießmann
Signed-off-by: Stefan Roese
03 Sep, 2012
1 commit
-
This patch fixes a memory leak in ubifs_finddir().
Signed-off-by: Stefan Roese
Cc: dev.ma.dma@gmail.com
10 Sep, 2011
2 commits
-
Commit 46d7274 "UBIFS: Change ubifsload to set the filesize variable"
introduced the follwing compiler warning:ubifs.c: In function 'ubifs_load':
ubifs.c:742: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'u32'Signed-off-by: Wolfgang Denk
Cc: Bastian Ruppert -
This is the same behaviour like tftp or fatload command.
Signed-off-by: Bastian Ruppert
CC: kmpark@infradead.org
Acked-by: Detlev Zundel
19 Aug, 2011
1 commit
-
Free private_data member element before freeing file structure.
This was causing malloc to crash. Also remove unnecessary variable
assigments as file structure gets free'd as well.Signed-off-by: Rod Boyce
Signed-off-by: Wolfgang Denk
Cc: Stefan Roese
Signed-off-by: Stefan Roese
04 Dec, 2010
1 commit
-
The link_name variable is declared inside the if block and it is used
outside it through the name pointer.Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Stefan Roese
03 Dec, 2010
1 commit
-
Until now ubifsload pads the destination with 0 up to a multiple of
UBIFS_BLOCK_SIZE (4KiB) while reading a file to memory. This patch
changes this behaviour to only read to the requested length. This
is either the file length or the length/size provided as parameter
to the ubifsload command.Signed-off-by: Stefan Roese
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
09 Dec, 2009
1 commit
-
There is more and more usage of printing 64bit values,
so enable this feature generally, and delete the
CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL
defines.Signed-off-by: Heiko Schocher
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
28 Sep, 2009
1 commit
-
Files in directories which are symlinked to were not dereferenced
correctly in last commit. E.g., with a symlink/boot/lnk -> /boot/real_dir
loading
/boot/lnk/uImage
will fail. This patch fixes that by simply seeing to it that the target
base directory has a slash after it.Signed-off-by: Simon Kagstrom
Signed-off-by: Stefan Roese
23 Sep, 2009
1 commit
-
This patch adds support for resolving symlinks to directories as well as
relative symlinks. Symlinks are now always resolved during file lookup,
so the load stage no longer needs to special-case them.Signed-off-by: Simon Kagstrom
Signed-off-by: Stefan Roese
10 Jun, 2009
1 commit
-
In do_readpage(), don't free 'dn' if its allocation failed.
Signed-off-by: Daniel Mack
01 May, 2009
1 commit
-
Blocks compressed with zlib dont have the full gzip header.
Without this patch, block compressed with zlib cannot be readed!
Signed-off-by: Ricardo Ribalda Delgado
28 Apr, 2009
1 commit
-
If the memory used to copy the link_make is "dirty" the string wont
be ended with NULL, throwing out multiple memory bugs.Signed-off-by: Ricardo Ribalda Delgado
Acked-by: Stefan Roese
21 Mar, 2009
2 commits
-
On systems where U-Boot is linked to another address than it really lays
(e.g. backup image), calls via function pointers must be fixed with a
'+= gd->reloc_off'.
This was not done for none_compr in ubifs_compressors_init() what leads
to system crash on ubifsmount command.Signed-off-by: Michael Lawnick
Acked-by: Stefan Roese -
The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).Signed-off-by: Stefan Roese
CC: Artem Bityutskiy
CC: Adrian Hunter