* [U-Boot] [PATCH] cmd: ubi: Add additional message upon UBI attach error
@ 2018-06-26 6:12 Stefan Roese
2018-07-12 9:14 ` Heiko Schocher
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2018-06-26 6:12 UTC (permalink / raw)
To: u-boot
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 9
or:
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 -12
Lets add an additional message upon attach failure, to aid the U-Boot
user to solve this problem.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
---
cmd/ubi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/ubi.c b/cmd/ubi.c
index ac9a582437..3fd6dbf07f 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -510,6 +510,7 @@ int ubi_part(char *part_name, const char *vid_header_offset)
vid_header_offset);
if (err) {
printf("UBI init error %d\n", err);
+ printf("Please check, if the correct MTD partition is used (size big enough?)\n");
ubi_dev.selected = 0;
return err;
}
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] cmd: ubi: Add additional message upon UBI attach error
2018-06-26 6:12 [U-Boot] [PATCH] cmd: ubi: Add additional message upon UBI attach error Stefan Roese
@ 2018-07-12 9:14 ` Heiko Schocher
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Schocher @ 2018-07-12 9:14 UTC (permalink / raw)
To: u-boot
Hello Stefan,
Am 26.06.2018 um 08:12 schrieb Stefan Roese:
> 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 9
>
> or:
>
> 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 -12
>
> Lets add an additional message upon attach failure, to aid the U-Boot
> user to solve this problem.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Heiko Schocher <hs@denx.de>
> ---
> cmd/ubi.c | 1 +
> 1 file changed, 1 insertion(+)
applied to u-boot-ubi.git master
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-12 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-26 6:12 [U-Boot] [PATCH] cmd: ubi: Add additional message upon UBI attach error Stefan Roese
2018-07-12 9:14 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox