0

Recently I started a project involving a at91sam9261ek and samsung K9F2G08U0M nand flash (256mb) (http://ww1.microchip.com/downloads/en/AppNotes/doc6255.pdf).

I used buildroot to build bootstrap, uboot, a linux kernel and a filesystem. bootstrap and uboot are located on dataflash, the linux kernel and filesystem are located on nandflash. Flashing is done through the tool sam-ba that's supplied by Atmel.

Nand
0x0 - 0x3c0000   Linux kernel
0x400000 >       UBI Image:    

I managed to learn and understand most things and everything seems to work... except ubifs...

ubi0: attaching mtd5
ubi0: scanning is finished
ubi0 error: vtbl_check: too large reserved_pebs 1788, good PEBs 48
ubi0 error: vtbl_check: volume table check failed: record 0, error 9
Volume table record 0 dump:
        reserved_pebs   1788
        alignment       1
        data_pad        0
        vol_type        1
        upd_marker      0
        name_len        6
        name            rootfs
        crc             0xb10386c2
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
UBI error: cannot attach mtd5

I have tried everything to lower reserved_pebs or to increase good PEBs... However, I'm not to be able to improve the PEB situation. Of course I tried to find a solution online and I understand the idea behind pebs / lebs...

The first thing I tried was to add vol_size to my ubinize.cfg, this did not have any influence on the filesize of ubifs (or ubi).

files:

rootfs.ubi            13MB  
rootfs.ubifs          12MB  
u-boot.bin            418KB 
uImage.at91sam9261ek  3946KB

ubinize.cfg:

[ubifs]
mode=ubi
vol_id=0
vol_size=220MiB
vol_type=dynamic
vol_name=rootfs
vol_alignment=1
vol_flags=autoresize
image=BR2_ROOTFS_UBIFS_PATH

Then I started to fiddle with the ubi settings. However, this only had a negative impact on the situation (I even increased -c to 99999, no dice)

buildroot make menuconfig

[*] ubi image containing an ubifs root filesystem
(0x20000) physical eraseblock size 
(512) sub-page size     
[ ]   Use custom config file 
()    Additional ubinize options   

-*- ubifs root filesystem        
(0x1f800) logical eraseblock size    
(0x800) minimum I/O unit size      
(2048) maximum logical eraseblock count  
ubifs runtime compression (lzo)  --->   
Compression method (no compression)  --->   

I have no idea how to solve this problem, this is the first time that I'm trying to build everything myself with buildroot.

The only thing that I can think of right now is that my way of flashing nandflash might be incorrect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.