- Aug 16, 2016
-
-
Yaroslav K authored
This fixes incorrect filenames in cbfsls output. Signed-off-by:
Yaroslav K. <yar444@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org> [clean up checkpatch errors and warnings] Signed-off-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Aug 05, 2016
-
-
Tom Rini authored
With e2fsprogs after 1.43 the 64bit and metadata_csum features are enabled by default. The metadata_csum feature changes how ext4_group_desc->bg_checksum is calculated, which would break write support. The 64bit feature however introduces changes such that it cannot be read by implementations that do not support it. Since we do not support this, we must not mount it. Cc: Stephen Warren <swarren@nvidia.com> Cc: Simon Glass <sjg@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stefan Roese <sr@denx.de> Reported-by:
Andrew Bradford <andrew.bradford@kodakalaris.com> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Jun 19, 2016
-
-
Guillaume GARDET authored
Fix the following build errors when building sandbox on x86 32-bit: In file included from fs/cbfs/cbfs.c:8:0: include/malloc.h:364:7: error: conflicting types for 'memset' void* memset(void*, int, size_t); ^ In file included from include/compiler.h:123:0, from include/cbfs.h:10, from fs/cbfs/cbfs.c:7: include/linux/string.h:78:15: note: previous declaration of 'memset' was here extern void * memset(void *,int,__kernel_size_t); ^ In file included from fs/cbfs/cbfs.c:8:0: include/malloc.h:365:7: error: conflicting types for 'memcpy' void* memcpy(void*, const void*, size_t); ^ In file included from include/compiler.h:123:0, from include/cbfs.h:10, from fs/cbfs/cbfs.c:7: include/linux/string.h:81:15: note: previous declaration of 'memcpy' was here extern void * memcpy(void *,const void *,__kernel_size_t); ^ scripts/Makefile.build:280: recipe for target 'fs/cbfs/cbfs.o' failed Signed-off-by:
Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jun 04, 2016
-
-
Scott Wood authored
These functions are part of the Linux 4.6 sync. They are being added before the main sync patch in order to make it easier to address the issue across all NAND drivers (many/most of which do not closely track their Linux counterparts) separately from other merge issues. Signed-off-by:
Scott Wood <oss@buserror.net>
-
Scott Wood authored
nand_info[] is now an array of pointers, with the actual mtd_info instance embedded in struct nand_chip. This is in preparation for syncing the NAND code with Linux 4.6, which makes the same change to struct nand_chip. It's in a separate commit due to the large amount of changes required to accommodate the change to nand_info[]. Signed-off-by:
Scott Wood <oss@buserror.net>
-
Scott Wood authored
This typedef serves no purpose other than causing confusion with struct nand_chip. Signed-off-by:
Scott Wood <oss@buserror.net>
-
- May 17, 2016
-
-
Simon Glass authored
This option currently enables both the command and the SCSI functionality. Rename the existing option to CONFIG_SCSI since most of the code relates to the feature. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 02, 2016
-
-
Ronald Zachariah authored
The function ext4fs_read_symlink was unable to handle a symlink which had target name of exactly 60 characters. Signed-off-by:
Ronald Zachariah <rozachar@cisco.com> Signed-off-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Stephen Warren <swarren@nvidia.com> Cc: Tom Rini <trini@konsulko.com>
-
- Apr 22, 2016
-
-
Heiko Schocher authored
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 <hs@denx.de>
-
- Apr 01, 2016
-
-
Tom Rini authored
We only use 'ofs' in jffs2_sum_scan_sumnode when debugging as it's part of a dbg_summary call. Mark this as __maybe_unused. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Mar 22, 2016
-
-
Vagrant Cascadian authored
Signed-off-by:
Vagrant Cascadian <vagrant@debian.org> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Peter Griffin <peter.griffin@linaro.org>
-
- Mar 14, 2016
-
-
Simon Glass authored
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
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 <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
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 <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
- Jan 25, 2016
-
-
Masahiro Yamada authored
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 <yamada.masahiro@socionext.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Jan 19, 2016
-
-
Tom Rini authored
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 <trini@konsulko.com>
-
- Jan 14, 2016
-
-
Tom Rini authored
As noted by Coverity, when we have an error in alloc_triple_indirect_block we will leak ti_pbuff_start_addr as it's not being freed. Further inspection here shows that we could also leak ti_cbuff_start_addr in one corner case so free that as well. Reported-by: Coverity (CID 131205, 131206) Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Stephen Warren authored
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Jan 08, 2016
-
-
David Müller (ELSOFT AG) authored
Signed-off-by:
David Müller <d.mueller@elsoft.ch>
-
- Nov 23, 2015
-
-
Thomas Fitzsimmons authored
If the ext3 journal gets out of sync with what is written on disk, for example because of an unexpected power cut, ext4fs_read_file can return an all-zero directory entry. In that case, ext4fs_iterate_dir would infinite loop. This patch detects when a directory entry's direntlen member is 0 and returns a failure status, which breaks out of the infinite loop. As a result, U-Boot will not find files that may subsequently be recovered when the journal is replayed. This is better behaviour than hanging in an infinite loop, but as a further improvement maybe U-Boot could interpret the ext3 journal and actually find the unsynced entries. Signed-off-by:
Thomas Fitzsimmons <fitzsim@cisco.com> Reviewed-by:
Stefan Roese <sr@denx.de>
-
- Nov 10, 2015
-
-
Tom Rini authored
After consulting with some of the SPDX team, the conclusion is that Makefiles are worth adding SPDX-License-Identifier tags too, and most of ours have one. This adds tags to ones that lack them and converts a few that had full (or in one case, very partial) license blobs into the equivalent tag. Cc: Kate Stewart <kstewart@linuxfoundation.org> Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Nov 05, 2015
-
-
Fabio Estevam authored
Use the is_power_of_2() definition from log2.h to align with the kernel implementation. Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Jagan Teki <jteki@openedev.com>
-
- Oct 26, 2015
-
-
Heiko Schocher authored
sync with linux v4.2 commit 64291f7db5bd8150a74ad2036f1037e6a0428df2 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Aug 30 11:34:09 2015 -0700 Linux 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 <hs@denx.de> Tested-by:
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
- Oct 24, 2015
-
-
Hans de Goede authored
Add generic fs support, so that commands like ls, load and test -e can be used on ubifs. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Hans de Goede authored
Implement the necessary functions for implementing generic fs support for ubifs. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Hans de Goede authored
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 <hdegoede@redhat.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
- Oct 11, 2015
-
-
Benoît Thébaudeau authored
Overwriting an empty file not created by U-Boot did not work, and it could even corrupt the FAT. Moreover, creating empty files or emptying existing files allocated a cluster, which is not standard. Fix this by always keeping empty files clusterless as specified by Microsoft (the start cluster must be set to 0 in the directory entry in that case), and by supporting overwriting such files. Signed-off-by:
Benoît Thébaudeau <benoit@wsystem.com>
-
Benoît Thébaudeau authored
Signed-off-by:
Benoît Thébaudeau <benoit@wsystem.com>
-
Benoît Thébaudeau authored
curclust was used instead of newclust in the debug() calls and in one CHECK_CLUST() call, which could skip a failure case. Signed-off-by:
Benoît Thébaudeau <benoit@wsystem.com>
-
Benoît Thébaudeau authored
set_contents() had uselessly split calls to set_cluster(). Merge these calls, which removes some cases of set_cluster() being called with a size of zero. Signed-off-by:
Benoît Thébaudeau <benoit@wsystem.com>
-
Benoît Thébaudeau authored
set_cluster() was using a temporary buffer without enforcing its alignment for DMA and cache. Moreover, it did not check the alignment of the passed buffer, which can come directly from applicative code or from the user. This could cause random data corruption, which has been observed on i.MX25 writing to an SD card. Fix this by only passing ARCH_DMA_MINALIGN-aligned buffers to disk_write(), which requires the introduction of a buffer bouncing mechanism for the misaligned buffers passed to set_cluster(). By the way, improve the handling of the corresponding return values from disk_write(): - print them with debug() in case of error, - consider that there is an error is disk_write() returns a smaller block count than the requested one, not only if its return value is negative. After this change, set_cluster() and get_cluster() are almost symmetrical. Signed-off-by:
Benoît Thébaudeau <benoit@wsystem.com>
-
- Sep 11, 2015
-
-
Gary Bisson authored
Since last API changes for files >2GB, the read of symlink is broken as ext4fs_read_file now returns 0 instead of the length of the actual read. Signed-off-by:
Gary Bisson <gary.bisson@boundarydevices.com>
-
Stephen Warren authored
root_first_block_buffer should be free()d in all cases, not just when an error occurs. Fix the success exit path of the function to do this. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com>
-
Stephen Warren authored
parse_path() malloc()s the entries in the array it's passed. Those allocations must be free()d by the caller, ext4fs_get_parent_inode_num(). Add code to do this. For this to work, all the array entries must be dynamically allocated, rather than a mix of dynamic and static allocations. Fix parse_path() not to over-write arr[0] with a pointer to statically allocated data. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com>
-
Stephen Warren authored
ext4_write_file() is only called from the "fs" layer, which calls both ext4fs_mount() and ext4fs_close() before/after calling ext4_write_file(). Fix ext4_write_file() not to call ext4fs_mount() again, since the mount operation malloc()s some RAM which is leaked when a second mount call over-writes the pointer to that data, if no intervening close call is made. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Lukasz Majewski <l.majewski@samsung.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com>
-
Łukasz Majewski authored
It is very common that FAT code is using following pattern: if (disk_{read|write}() < 0) return -1; Up till now the above code was dead, since disk_{read|write) could only return value >= 0. As a result some errors from medium layer (i.e. eMMC/SD) were not caught. The above behavior was caused by block_{read|write|erase} declared at struct block_dev_desc (@part.h). It returns unsigned long, where 0 indicates error and > 0 indicates that medium operation was correct. This patch as error regards 0 returned from block_{read|write|erase} when nr_blocks is grater than zero. Read/Write operation with nr_blocks=0 should return 0 and hence is not considered as an error. Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Test HW: Odroid XU3 - Exynos 5433
-
Simon Glass authored
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
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:
Simon Glass <sjg@chromium.org> Acked-by:
Marcel Ziswiler <marcel.ziswiler@toradex.com>
-