From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Problem with attaching UBI partition
Date: Tue, 23 Feb 2016 19:11:44 +0100 [thread overview]
Message-ID: <56CCA0E0.6050902@denx.de> (raw)
In-Reply-To: <BFEE4BD273371E48B6EB70F96CEC5B5404098AF2@DEMUMBX007.nsn-intra.net>
Hello Dennis,
Am 22.02.2016 um 15:17 schrieb Bakhvalov, Denis (Nokia - PL/Wroclaw):
> Dear U-Boot support,
>
> I have problems while running following commands in U-Boot:
Which U-Boot version? Which board?
> U-Boot => sf probe 0 0 0
> SF: Detected S25FL512S with page size 512, total: 67108864
>
> U-Boot => mtdparts
> device nor0 <snor0>, # parts = 4
> #: name size offset mask_flags
> 0: boot 0x00100000 0x00000000 0
> 1: bootenv 0x00080000 0x00100000 0
> 2: SomeInfo 0x01980000 0x00180000 0
> 3: ubifspart 0x02500000 0x01b00000 0
>
> U-Boot => ubi part ubifspart
> mtd: Giving out device 1 to mtd=3
> ubi0: attaching mtd1
> UBI DBG gen (pid 1): sizeof(struct ubi_ainf_peb) 48
> UBI DBG gen (pid 1): sizeof(struct ubi_wl_entry) 20
> UBI DBG gen (pid 1): min_io_size 1
> UBI DBG gen (pid 1): max_write_size 512
> UBI DBG gen (pid 1): hdrs_min_io_size 1
> UBI DBG gen (pid 1): ec_hdr_alsize 64
> UBI DBG gen (pid 1): vid_hdr_alsize 64
> UBI DBG gen (pid 1): vid_hdr_offset 64
> UBI DBG gen (pid 1): vid_hdr_aloffset 64
> UBI DBG gen (pid 1): vid_hdr_shift 0
> UBI DBG gen (pid 1): leb_start 128
> UBI DBG gen (pid 1): max_erroneous 16
> UBI DBG gen (pid 1): process PEB 0
> UBI DBG bld (pid 1): scan PEB 0
> UBI DBG io (pid 1): read EC header from PEB 0
> UBI DBG io (pid 1): read 64 bytes from PEB 0:0
> ubi0 warning: ubi_io_read_ec_hdr: bad magic number at PEB 0: ff554249 instead of 55424923
> Erase counter header dump:
> magic 0xff554249
Where does this leading 0xff come from? There seems a problem
with your spi nor flash driver?
I am currently on the EW 2016 in nuernberg, I could not look
deeper here... I think try to check your spi nor flash
driver...
bye,
Heiko
> version 35
> ec 0
> vid_hdr_offset 16777216
> data_offset 1073741824
> image_seq -2142856561
> hdr_crc 0xe046ed
> erase counter header hexdump:
> UBI DBG bld (pid 1): bad magic number at PEB 0: ff554249 instead of 55424923
> UBI DBG io (pid 1): read VID header from PEB 0
> UBI DBG io (pid 1): read 64 bytes from PEB 0:64
> UBI DBG bld (pid 1): no VID header found at PEB 0, only 0xFF bytes
> UBI DBG bld (pid 1): add to erase: PEB 0, EC -1
>
> ... // this warning goes for all PEBs from 1 to 147
>
> ubi0: scanning is finished
> UBI DBG gen (pid 1): max. sequence number: 0
> ubi0 error: ubi_read_volume_table: the layout volume was not found
> ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -22
> UBI error: cannot attach mtd1
> UBI error: cannot initialize UBI, error -22
> UBI init error 22
> UBI init error 22
>
> For me it looks like this magic number is shifted one byte right, although I can't understand why.
>
> Here is how I create UBI partition in Linux env:
>
> Linux Env #> mtdinfo -a
>
> mtd5
> Name: data
> Type: nor
> Eraseblock size: 262144 bytes, 256.0 KiB
> Amount of eraseblocks: 148 (38797312 bytes, 37.0 MiB)
> Minimum input/output unit size: 1 byte
> Sub-page size: 1 byte
> Character device major/minor: 90:10
> Bad blocks are allowed: false
> Device is writable: true
>
> Linux Env #> ubiformat /dev/mtd5
>
> ubiformat: mtd5 (nor), size 38797312 bytes (37.0 MiB), 148 eraseblocks of 262144 bytes (256.0 KiB), min. I/O size 1 bytes
> libscan: scanning eraseblock 147 -- 100 % complete
> ubiformat: 148 eraseblocks are supposedly empty
> ubiformat: formatting eraseblock 147 -- 100 % complete 797312
>
> Linux Env #> ubiattach -m 5 /dev/ubi_ctrl
>
> UBI: attaching mtd5 to ubi0
> UBI: scanning is finished
> UBI: attached mtd5 (name "part5", size 37 MiB) to ubi0
> UBI: PEB size: 262144 bytes (256 KiB), LEB size: 262016 bytes
> UBI: min./max. I/O unit sizes: 1/256, sub-page size 1
> UBI: VID header offset: 64 (aligned 64), data offset: 128
> UBI: good PEBs: 148, bad PEBs: 0, corrupted PEBs: 0
> UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
> UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1371523162
> UBI: available PEBs: 144, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0
> UBI: background thread "ubi_bgt0d" started, PID 1003
>
> Linux Env #> ubimkvol -N data -m /dev/ubi0
>
> Linux Env #> mount -t ubifs ubi0:data /mnt
>
> Linux Env #> mount -t ubifs ubi0:data /mnt
>
> UBIFS: default file-system created
> UBIFS: background thread "ubifs_bgt0_0" started, PID 1010
> UBIFS: mounted UBI device 0, volume 0, name "data"
> UBIFS: LEB size: 262016 bytes (255 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
> UBIFS: FS size: 35110144 bytes (33 MiB, 134 LEBs), journal size 2096129 bytes (1 MiB, 7 LEBs)
> UBIFS: reserved for root: 1658338 bytes (1619 KiB)
> UBIFS: media format: w4/r0 (latest is w4/r0), UUID 696FFD7B-1957-4ABD-9FDC-ED0EEB674D9D, small LPT model
>
> It's perfectly working from Linux env, however U-Boot don't want to attach UBI partition.
>
> Please help me identify the problem!
>
> Best regards,
> Denis Bakhvalov
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2016-02-23 18:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 14:17 [U-Boot] Problem with attaching UBI partition Bakhvalov, Denis
2016-02-23 18:11 ` Heiko Schocher [this message]
2016-02-24 8:59 ` Bakhvalov, Denis
2016-02-29 6:36 ` Heiko Schocher
2016-02-29 6:47 ` Jagan Teki
2016-02-29 16:44 ` Bakhvalov, Denis
2016-02-29 17:17 ` Jagan Teki
2016-02-29 22:44 ` Marek Vasut
2016-03-01 13:04 ` Bakhvalov, Denis
2016-03-01 13:32 ` Jagan Teki
2016-03-01 13:53 ` Bakhvalov, Denis
2016-03-01 13:58 ` Marek Vasut
2016-03-04 9:03 ` Bakhvalov, Denis
2016-03-04 12:20 ` Marek Vasut
2016-03-04 12:24 ` Bakhvalov, Denis
2016-03-04 12:28 ` Marek Vasut
2016-03-22 13:18 ` Bakhvalov, Denis
2016-03-22 14:24 ` Marek Vasut
2016-03-01 13:46 ` Marek Vasut
2016-02-29 22:55 ` Marek Vasut
2016-03-01 6:53 ` Chin Liang See
2016-03-01 7:23 ` Stefan Roese
2016-03-01 13:38 ` Chin Liang See
2016-03-01 15:35 ` Stefan Roese
2016-03-02 12:24 ` Chin Liang See
2016-03-03 11:51 ` Stefan Roese
2016-03-03 12:43 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2016-02-23 13:31 Bakhvalov, Denis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56CCA0E0.6050902@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.