
Dear Dimax,
On 29.10.2012 20:05, Dimax wrote:
U-boot will _not_ recover your UBIFS partition like the Linux kernel.
CMIIW. In other words it is not possible to use UBIFS on embedded Linux boards with u-boot unless you can provide unterminated power supply.
NAK
I invested some time to reproduce this, however see following scenario:
---8<--- DockStar> ubi part root; ubifsmount root Creating 1 MTD partitions on "nand0": 0x000000100000-0x000010000000 : "mtd=1" UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=1" UBI: MTD device size: 255 MiB UBI: number of good PEBs: 2040 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 20 UBI: total number of reserved PEBs: 2020 UBI: number of PEBs reserved for bad PEB handling: 20 UBI: max/mean erase counter: 4/2 UBIFS: recovery needed UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'ubi:root' errno=-12!
ubifsmount - mount UBIFS volume
Usage: ubifsmount <volume-name> - mount 'volume-name' volume DockStar> ver
U-Boot 2012.10 (Oct 30 2012 - 00:46:13) Seagate FreeAgent DockStar arm-v5te-linux-gnueabi-gcc (OSELAS.Toolchain-2011.11.0) 4.6.2 GNU ld (GNU Binutils) 2.21.1 DockStar> --->8---
---8<--- DockStar> ubi part root; ubifsmount root Creating 1 MTD partitions on "nand0": 0x000000100000-0x000010000000 : "mtd=1" UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=1" UBI: MTD device size: 255 MiB UBI: number of good PEBs: 2040 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 20 UBI: total number of reserved PEBs: 2020 UBI: number of PEBs reserved for bad PEB handling: 20 UBI: max/mean erase counter: 4/2 UBIFS: recovery needed UBIFS: recovery deferred UBIFS: mounted UBI device 0, volume 0, name "root" UBIFS: mounted read-only UBIFS: file system size: 255854592 bytes (249858 KiB, 244 MiB, 1983 LEBs) UBIFS: journal size: 12773376 bytes (12474 KiB, 12 MiB, 99 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: LZO UBIFS: reserved for root: 5182151 bytes (5060 KiB) DockStar> ver
U-Boot 2012.10-00001-g65cc68e (Oct 30 2012 - 00:50:51) Seagate FreeAgent DockStar arm-v5te-linux-gnueabi-gcc (OSELAS.Toolchain-2011.11.0) 4.6.2 GNU ld (GNU Binutils) 2.21.1 DockStar> --->8---
---8<--- andreas@andreas-pc % git describe v2012.10-1-g65cc68e andreas@andreas-pc % git show | commit 65cc68eb06df0c957a17a611bc3f3756e91108b2 (HEAD, test-malloc) | Author: Andreas Bießmann andreas.devel@googlemail.com | Date: Mon Oct 29 21:36:53 2012 +0100 | | mv-common.h: increase malloc arena to 4MiB | | Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com | | diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h | index 7086d1d..405a842 100644 | --- a/include/configs/mv-common.h | +++ b/include/configs/mv-common.h | @@ -92,7 +92,7 @@ | /* | * Size of malloc() pool | */ | -#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* 1MiB for malloc() */ | +#define CONFIG_SYS_MALLOC_LEN (1024 * 1024 * 4) /* 4MiB for malloc() */ | | /* | * Other required minimal configurations --->8---
Best regards
Andreas Bießmann