06 Feb, 2020
2 commits
-
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass
-
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.Signed-off-by: Simon Glass
Reviewed-by: Anatolij Gustschin
16 Oct, 2019
2 commits
-
U-Boot now supports the "skip_check" flag to optionally skip the CRC
check at open time. Currently its only possible to set this bit upon
UBI volume creation. But it might be very useful to also set this bit
on already installed systems (e.g. field upgrade) to make also use of
the boot-time decrease on those systems.This patch now adds a new "ubi" command "ubi skipcheck" to set or clear
this bit in the UBI volume header:=> ubi skipcheck rootfs0 on
Setting skip_check on volume rootfs0BTW: This saves approx. 10 seconds Linux bootup time on a MT7688 based
target with 128MiB of SPI NAND.Signed-off-by: Stefan Roese
Reviewed-by: Heiko Schocher
Cc: Quentin Schulz
Cc: Boris Brezillon
Cc: Heiko Schocher
Cc: Andreas Dannenberg -
Some users of static UBI volumes implement their own integrity check,
thus making the volume CRC check done at open time useless. For
instance, this is the case when one use the ubiblock + dm-verity +
squashfs combination, where dm-verity already checks integrity of the
block device but this time at the block granularity instead of verifying
the whole volume.Skipping this test drastically improves the boot-time.
Adapted to U-Boot by Stefan Roese.
Signed-off-by: Quentin Schulz
Signed-off-by: Stefan Roese
Reviewed-by: Heiko Schocher
Cc: Quentin Schulz
Cc: Boris Brezillon
12 Aug, 2019
1 commit
-
Move env_set_hex() over to the new header file along with env_set_addr()
which uses it.Signed-off-by: Simon Glass
Acked-by: Joe Hershberger
16 Jan, 2019
1 commit
-
It does not make sense to check if argc < 2 a second time, especially after
accessing argv[1].Signed-off-by: Heinrich Schuchardt
22 Nov, 2018
1 commit
-
Its only called from this file, so make it static. While at it, remove
some occurances of multiple blank lines as well.Signed-off-by: Stefan Roese
Cc: Boris Brezillon
Cc: Miquel Raynal
Reviewed-by: Miquel Raynal
Reviewed-by: Boris Brezillon
Reviewed-by: Jagan Teki
13 Nov, 2018
1 commit
-
Commit c58fb2cdb3e4 ("cmd: ubi: clean the partition handling")
introduced a call to mtd_probe_devices() in the ubi_attach() path
and this function takes care of parsing mtdparts/mtdids and
creating/registering the associated mtd partitions.The mtdparts_init() call in the ubi_detach() path is not only
unnecessary but can sometimes print error messages even when things
work properly (that's the case with SPI NAND devices that have not
been probed with 'mtd list'), which is misleading.Remove this call to mtdparts_init() and drop the dependency on
CMD_MTDPARTS.Fixes: c58fb2cdb3e4 ("cmd: ubi: clean the partition handling")
Reported-by: Stefan Roese
Signed-off-by: Boris Brezillon
Tested-by: Stefan Roese
Reviewed-by: Lukasz Majewski
Reviewed-by: Jagan Teki
03 Oct, 2018
2 commits
-
This is the PR for SPI-NAND changes along with few spi changes.
[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig]
Signed-off-by: Tom Rini -
UBI should not mess with MTD partitions, now that the partitions are
handled in a clean way, clean the ubi command and avoid using this
uneeded extra-glue to reference the devices.Signed-off-by: Miquel Raynal
Reviewed-by: Stefan Roese
Reviewed-by: Boris Brezillon
29 Sep, 2018
1 commit
-
cmd_ubifs_umount() function would be called directly instead of involving
whole command machinery in generic firmware loader, so checking on
ubifs_initialized status need to be done in cmd_ubifs_umount() without
breaking original functionality design.Signed-off-by: Tien Fong Chee
Reviewed-by: Marek Vasut
Reviewed-by: Heiko Schocher
[trini: Fix conflicting type error in cmd/ubi.c]
Signed-off-by: Tom Rini
20 Sep, 2018
1 commit
-
These definitions are simply not used and are misleading because similar
definitions exist in jffs2/load_kernel.h and are used widely to define
MTD device types (which is, by the way, totally redundant with what the
MTD core does). Remove these definitions.Signed-off-by: Miquel Raynal
Acked-by: Jagan Teki
Reviewed-by: Boris Brezillon
26 Jul, 2018
1 commit
-
On 64bit platforms we would otherwise see:
../cmd/ubi.c: In function 'ubi_volume_read':
../cmd/ubi.c:359:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=]Fixes: 68c7025d99db ("cmd: ubi: print load size after establishing volume size")
Signed-off-by: Tom Rini
12 Jul, 2018
2 commits
-
When trying to attach an UBI MTD partition via "ubi part", it may happen
that the MTD partition defined in U-Boot (via mtdparts) is not big
enough than the one, where the UBI device has been created on. This
may lead to errors, which are not really descriptive to debug and
solve this issue, like:ubi0 error: vtbl_check: too large reserved_pebs 1982, good PEBs 1020
ubi0 error: vtbl_check: volume table check failed: record 0, error 9or:
ubi0 error: init_volumes: not enough PEBs, required 1738, available 1020
ubi0 error: ubi_wl_init: no enough physical eraseblocks (-718, need 1)
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -12Lets add an additional message upon attach failure, to aid the U-Boot
user to solve this problem.Signed-off-by: Stefan Roese
Cc: Stefano Babic
Cc: Heiko Schocher -
When using static volumes, the file size stored in the volume is
determined at runtime. Currently the ubi command prints the file
size specified on the console, which leads to a rather confusing
series of messages:
# ubi read ${fdt_addr_r} testvol
Read 0 bytes from volume testvol to 82000000
No size specified -> Using max size (179924992)Make sure to print the actual size read in any case:
# ubi read ${fdt_addr_r} testvol
No size specified -> Using max size (179924992)
Read 179924992 bytes from volume testvol to 82000000Signed-off-by: Stefan Agner
12 Sep, 2017
1 commit
-
After a successful read of a UBI volume, the variable filesize is set
to the number of read bytes. To boot linux with a raw initramfs/initrd,
you must specify the exact size of the initramfs/initrd image in boot
command. If the initramfs/inird is read from UBI volume, $filesize is
required to access the number of read bytes.Example:
ubi read ${loadaddr} kernelvol
ubi read ${fdtaddr} dtbvol
ubi read ${initrd_addr} initrdvol
bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr}Signed-off-by: Holger Dengler
Reviewed-by: Heiko Schocher
18 Apr, 2017
1 commit
-
A size_t variable can never be negative.
The problem was indicated by cppcheck.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Tom Rini
Reviewed-by: Heiko Schocher
26 Jan, 2017
1 commit
-
Currently maximum volume size can be specified only if no other
arguments are used. Use '-' placeholder as volume size to allow
maximum volume size to be specified together with volume id and
type.Signed-off-by: Ladislav Michl
27 Sep, 2016
1 commit
-
Signed-off-by: Ladislav Michl
24 Sep, 2016
1 commit
-
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content. (both just wrap )Replace all include directives for with .
Signed-off-by: Masahiro Yamada
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini
10 Jun, 2016
1 commit
-
simple detachs ubi from the mtd partition.
Signed-off-by: Heiko Schocher
25 Jan, 2016
1 commit
-
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Reviewed-by: Heiko Schocher
Acked-by: Stefan Roese
Acked-by: Przemyslaw Marczak