20 Nov, 2017
1 commit
-
kfree() calls free.
free() checks if the parameter is NULL.Signed-off-by: Heinrich Schuchardt
24 Oct, 2017
1 commit
-
All users of this macro have been converted. Remove MTDDEBUG and
related CONFIG options.ubifs_dbg_msg_key() is kept. It is silent unless DEBUG is defined.
I am not touching scripts/config_whitelist.txt. The deprecated options
will be dropped by the next resync.Signed-off-by: Masahiro Yamada
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
22 Apr, 2016
1 commit
-
In list "super_blocks" ubifs collects allocated super_block
structs. U-Boot frees on unmount the allocated struct,
so the pointer stored in this list is free after the umount.
On a new ubifs mount, the new allocated super_block struct
get inserted into the super_blocks list ... which contains
now a freed pointer, and the list_add_tail() corrupts the
freed memory ...2 solutions are possible:
- remove the super_block from the super_blocks list
on umount- as U-Boot does not use the super_blocks list ...
remove it complete for U-Boot.Both solutions should not introduce problems for porting
to newer linux version, so this patch removes the unused
super_blocks list, as it saves code size and execution
time.Signed-off-by: Heiko Schocher
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
25 Jan, 2016
1 commit
-
BUILD_BUG_* macros have been defined in several headers. It would
be nice to collect them in include/linux/bug.h like Linux.This commit is cherry-picking useful macros from include/linux/bug.h
of Linux 4.4.I did not import BUILD_BUG_ON_MSG() because it would not work if it
is used with include/common.h in U-Boot. I'd like to postpone it
until the root cause (the "error()" macro in include/common.h causes
the name conflict with "__attribute__((error()))") is fixed.Signed-off-by: Masahiro Yamada
Reviewed-by: Tom Rini
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
06 Nov, 2015
1 commit
-
Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.Signed-off-by: Fabio Estevam
Reviewed-by: Tom Rini
Reviewed-by: Heiko Schocher
Reviewed-by: Jagan Teki
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
29 Jan, 2015
1 commit
-
Enable ubifs_replay_journal during mount_ubifs, which was
disabled before.This commit fix an issue with unrecoverable ubifs volumes
after power cut.Therefor the gc.c is imported now from 1860e37 Linux 3.15
hs: added SPDX-License-Identifier for fs/ubifs/gc.c
Signed-off-by: Anton Habegger
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
21 Nov, 2014
1 commit
-
U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.Moreover, we are suffering from too cluttered include/common.h.
This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.Signed-off-by: Masahiro Yamada
25 Sep, 2014
1 commit
-
This would be useful to start moving various config options.
Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass
Tested-by: Simon Glass
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
3 commits
-
snyc with linux v3.15:
commit 1860e379875dfe7271c649058aeddffe5afd9d0d
Author: Linus Torvalds
Date: Sun Jun 8 11:19:54 2014 -0700Linux 3.15
Signed-off-by: Heiko Schocher
Cc: Scott Wood
Cc: Tom Rini -
while playing with the new mtd/ubi/ubifs sync, found some
small updates for it:- add del_mtd_partition() to include/linux/mtd/mtd
- mtd: add a debug_printf
- remove some not used functionsSigned-off-by: Heiko Schocher
Cc: Scott Wood
Cc: Tom Rini -
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
13 May, 2014
1 commit
-
__DATE__ and __TIME__ makes the build non-deterministic.
Drop the debug message using them.Signed-off-by: Masahiro Yamada
27 Feb, 2014
2 commits
-
Conflicts:
arch/arm/cpu/armv7/config.mk
board/ti/am43xx/mux.c
include/configs/am43xx_evm.hSigned-off-by: Tom Rini
-
When we tell the compiler to optimize for ARMv7 (and ARMv6 for that
matter) it assumes a default of SCTRL.A being cleared and unaligned
accesses being allowed and fast at the hardware level. We set this bit
and must pass along -mno-unaligned-access so that the compiler will
still breakdown accesses and not trigger a data abort.To better help understand the requirements of the project with respect
to unaligned memory access, the
Documentation/unaligned-memory-access.txt file has been added as
doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1
tag of the kernel.Cc: Albert ARIBAUD
Cc: Mans Rullgard
Signed-off-by: Tom Rini
22 Feb, 2014
1 commit
-
Fix the following checkpatch warning:-
WARNING: externs should be avoided in .c files
Signed-off-by: Murali Karicheri
20 Feb, 2014
2 commits
-
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build objWe need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.Additionally, we need to fix compiler flags which are
locally added or removed.In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig -
This commit changes the working directory
where the build process occurs.Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
$(obj)u-boot.bin: $(obj)u-bootHere, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.And our old build system changes the current working directory
with "make -C " syntax when descending into the
sub-directories.On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj="
syntax for descending into sub-directories.
(We can write it like "make $(obj)=" with a shorthand.)
This means the current working directory is always the top
of the output directory.Signed-off-by: Masahiro Yamada
Tested-by: Gerhard Sittig
18 Nov, 2013
1 commit
-
Signed-off-by: Masahiro Yamada
01 Nov, 2013
1 commit
-
Signed-off-by: Masahiro Yamada
15 Oct, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Drop changes for PEP 4 following python tools]
Signed-off-by: Tom Rini
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
12 Apr, 2013
1 commit
-
The prints are out of control. SILENCE!
Signed-off-by: Joe Hershberger
05 Mar, 2013
1 commit
-
UBI can mount volumes by name or number The current code forces you
to name the volume by prepending every name with "ubi:".>From fs/ubifs/super.c
* There are several ways to specify UBI volumes when mounting UBIFS:
* o ubiX_Y - UBI device number X, volume Y;
* o ubiY - UBI device number 0, volume Y;
* o ubiX:NAME - mount UBI device X, volume with name NAME;
* o ubi:NAME - mount UBI device 0, volume with name NAME.Now any name passed in any of the above forms are allowed.
Also update the configs that referenced ubifsmount.
Signed-off-by: Joe Hershberger
01 Mar, 2013
1 commit
-
Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/
Signed-off-by: Simon Glass
16 Oct, 2012
1 commit
-
Under option -munaligned-access, gcc can perform local char
or 16-bit array initializations using misaligned native
accesses which will throw a data abort exception. Fix files
where these array initializations were unneeded, and for
files known to contain such initializations, enforce gcc
option -mno-unaligned-access.Signed-off-by: Albert ARIBAUD
[trini: Switch to usign call cc-option for -mno-unaligned-access as
Albert had done previously as that's really correct]
Signed-off-by: Tom Rini
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