Hello,
the idea is, to give the user a possibility to update its system without tftp
or a second partition. First, the user saves the update file (rootfs.ubifs) to
its rootfs, and on the next reboot the uboot loads the update file to the RAM
and flashes the update file.
Problem: After booting linux once, I cannot mount my ubifs from uboot any
more. (But: On linux it is still working fine...)
I receive once again:
UBIFS error (pid 0): ubifs_read_node: bad node type
(255 but expected 6)
UBIFS error (pid 0): ubifs_read_node: bad node at LEB 0:0
Error reading superblock on volume 'ubi:rootfs'!
Best regards,
Charly
U-Boot 2010.03 (Jun 17 2010 - 14:18:23) MPC512X
CPU: MPC5121e rev. 2.0, Core e300c4 at 400 MHz, CSB at 200 MHz (RSR=0x1003)
Board: ADS5121 rev. 0x0400 (CPLD rev. 0x06)
I2C: ready
DRAM: 512 MB
FLASH: 64 MB
NAND: 1024 MiB
[...]
= mtdparts
device nor0 fc00.flash, # parts = 5
[...]
device nand0 mpc5121.nand, # parts = 1
#: namesizeoffset mask_flags
0: ubi-data0x2000 0x 0
[...]
= ubi part ubi-data
Creating 1 MTD partitions on nand0:
0x-0x2000 : mtd=0
Bad block table found at page 261952, version 0x01
Bad block table found at page 261888, version 0x01
nand_read_bbt: Bad block at 0x0004
[...]
nand_read_bbt: Bad block at 0x1ffe
UBI: attaching mtd3 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 mtd3 to ubi0
UBI: MTD device name:mtd=0
UBI: MTD device size:512 MiB
UBI: number of good PEBs:4064
UBI: number of bad PEBs: 32
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: 0
UBI: total number of reserved PEBs: 4064
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 6/1
= tftp rootfs.ubifs
Using FEC ETHERNET device
TFTP from server 10.1.1.83; our IP address is 10.1.1.84
Filename 'rootfs.ubifs'.
Load address: 0x40
Loading: *
##
[...]
##
done
Bytes transferred = 22966272 (15e7000 hex)
= ubi write ${fileaddr} rootfs ${filesize}
Volume rootfs found at volume id 0
= ubifsmount rootfs
UBIFS: mounted UBI device 0, volume 0, name rootfs
UBIFS: mounted read-only
UBIFS: file system size: 262821888 bytes (256662 KiB, 250 MiB, 2037 LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
= ubifsls
DIR5232 Fri Jul 09 11:54:31 2010 bin
DIR 11344 Fri Jun 25 11:51:19 2010 dev
DIR1840 Fri Jul 09 11:54:33 2010 etc
DIR1864 Fri Jul 09 11:54:33 2010 lib
DIR 160 Fri Jun 25 09:42:48 2010 mnt
[...]
DIR 440 Fri Jun 25 09:42:48 2010 root
LNK 11 Fri Jun 25 10:21:56 2010 linuxrc
= run flash_ubi
## Booting kernel from Legacy Image at ff90 ...
[...]
brd: module loaded
fc00.flash: Found 2 x16 devices at 0x0 in 32-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
fc00.flash: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
RedBoot partition parsing not available
Creating 5 MTD partitions on fc00.flash:
0x-0x0004 : protected
0x0004-0x03c4 : filesystem
0x03c4-0x03ec : kernel
0x03ec-0x03f0 : device-tree
0x03f0-0x0400 : u-boot
mpc5121_nfc 4000.nfc: Configured for 8-bit NAND, page size 2048 with 64
spare.
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V
8-bit)
2 NAND chips detected
Creating 1 MTD partitions on MPC5121 NAND:
0x-0x4000 : nand
UBI: attaching mtd5 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 mtd5 to ubi0
UBI: MTD device name:nand
UBI: MTD device size:1024 MiB
UBI: number of good PEBs:8140
UBI: number of bad PEBs: 52
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: 4035
UBI: total number of reserved PEBs: 4105
UBI: number of PEBs reserved for bad PEB handling: 81
UBI: max/mean erase counter: 7/1
UBI: