This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UBIFS boots only once!

Other Parts Discussed in Thread: TPS65910

Hello everyone,

 

 

I've managed to boot a "small" rootfs from my nand ( ~32 MB ), by using UBIFS ( UBI-FruStrations? ). Now when I create a larger rootfs ( ~64 MB ) it boots the first time, but afterwards no more.

 

I've tried almost everything but nothing seems to help me! I notice read errors the first time, but it continues to boot... I really don't know what I'm doing wrong here and I'm getting really frustrated too because of this weird behaviour!

 

-- Ubinize.cfg

     [RFS-volume]

     mode=ubi

     image=ubifs.img

     vol_id=0

     vol_size=192MiB

     vol_type=dynamic

     vol_name=rootfs

     vol_flags=autoresize

 

commands i've used to create UBI:

     mkfs.ubifs -r rootfs/ -o ubifs.img -m 2048 -e 126976 -c 1580 –F

     ubinize -o ubi.img -m 2048 -p 128KiB -O 2048 ubinize.cfg

 

 

I write my ubi image from within uboot:

     U-Boot# mw.b ${loadaddr} 0xFF {partition-size}

     U-Boot# tftp ${loadaddr} ubi.img

     U-boot# nand erase 0x00780000 {partition-size}

     U-boot# nand write ${loadaddr} 0x00780000 {filesize}

 

...and afterwards boot from nand...

     Booting from nand ...

     NAND read: device 0 offset 0x280000, size 0x500000

     5242880 bytes read: OK

     ## Booting kernel from Legacy Image at 80007fc0 ...

     Image Name: Linux-3.2.0

     Image Type: ARM Linux Kernel Image (uncompressed)

     Data Size: 2843304 Bytes = 2.7 MiB

     Load Address: 80008000

     Entry Point: 80008000

     XIP Kernel Image ... OK

     OK

 

     Starting kernel ...

 

     Uncompressing Linux... done, booting the kernel.

     [ 0.077850] tps65910 1-002d: could not be detected

     [ 0.404754] mtdoops: mtd device (mtddev=name/number) must be supplied

     INIT: version 2.88 booting

     Using makefile-style concurrent boot in runlevel S.

     Setting the system clock.

     Cannot access the Hardware Clock via any known method.

     Use the --debug option to see the details of our search for an access method.

     Unable to set System Clock to: Thu Jan 1 00:00:07 UTC 1970 ... (warning).

     Activating swap...done.

     Checking root file system...fsck from util-linux-ng 2.17.2

     fsck: fsck.auto: not found

     fsck: Error 2 while executing fsck.auto for /lib/init/rw/rootdev

     done.

     [ 8.200195] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 495:51200, read 64 bytes

     Setting the system clock.

     Cannot access the Hardware Clock via any known method.

     Use the --debug option to see the details of our search for an access method.

     Unable to set System Clock to: Thu Jan 1 00:00:08 UTC 1970 ... (warning).

     Cleaning up ifupdown....

     Setting up networking....

     [ 8.813323] UBI error: ubi_io_read: error -74 (ECC error) while reading 66 bytes from PEB 495:57120, read 66 bytes

     [ 8.905944] UBI error: ubi_io_read: error -74 (ECC error) while reading 66 bytes from PEB 495:58672, read 66 bytes

     [ 8.936309] UBI error: ubi_io_read: error -74 (ECC error) while reading 62 bytes from PEB 495:59064, read 62 bytes

     [ 9.022216] UBI error: ubi_io_read: error -74 (ECC error) while reading 62 bytes from PEB 495:60616, read 62 bytes

     [ 9.072296] UBI error: ubi_io_read: error -74 (ECC error) while reading 62 bytes from PEB 495:62384, read 62 bytes

     Activating lvm and md swap...done.

     Checking file systems...fsck from util-linux-ng 2.17.2

     done.

     Mounting local filesystems...done.

     Activating swapfile swap...done.

     Cleaning up temporary files...[ 9.483398] UBI error: ubi_io_read: error -74 (ECC error) while reading 63 bytes from PEB 495:65312, read 63 bytes

     .

     Cleaning up temporary files....

     [ 9.938079] UBI error: ubi_io_read: error -74 (ECC error) while reading 63 bytes from PEB 495:66080, read 63 bytes

     [ 9.953125] UBI error: ubi_io_read: error -74 (ECC error) while reading 63 bytes from PEB 495:66464, read 63 bytes

     INIT: Entering runlevel: 2

     Using makefile-style concurrent boot in runlevel 2.

     [ 10.550659] UBI error: ubi_io_read: error -74 (ECC error) while reading 66 bytes from PEB 495:68992, read 66 bytes

     Starting nginx: [ 10.899200] UBI error: ubi_io_read: error -74 (ECC error) while reading 74 bytes from PEB 495:71008, read 74 bytes

     the configuration file /etc/nginx/nginx.conf syntax is ok

     [emerg]: socket() [::]:80 failed (97: Address family not supported by protocol)

     configuration file /etc/nginx/nginx.conf test failed

     startpar: service(s) returned failure: nginx ... failed!

 

     Debian GNU/Linux 6.0 wcap ttyO0

 

     wcap login: root

     Password:

     Linux wcap 3.2.0 #8 Fri Jul 5 13:09:48 CEST 2013 armv7l

 

     The programs included with the Debian GNU/Linux system are free software;

     the exact distribution terms for each program are described in the

     individual files in /usr/share/doc/*/copyright.

 

     Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

     permitted by applicable law.

     root@wcap:~# reboot

 

     Broadcast message from root@wcap (ttyO0) (Thu Jan 1 00:00:36 1970):

 

     The system is going down for reboot NOW!

     INIT: Sending proUsing makefile-style concurrent boot in runlevel 6.

     Saving the system clock.

     Cannot access the Hardware Clock via any known method.

     Use the --debug option to see the details of our search for an access method.

     Stopping nginx: nginx.

     Asking all remaining processes to terminate...done.

     All processes ended within 1 seconds....done.

     Cleaning up ifupdown...[ 37.352661] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 495:55184, read 64 bytes

     .

     Deactivating swap...done.

     Will now restart.

     [ 39.636932] Restarting system.

     CCCCCCCC

     U-Boot SPL 2013.01.01 (Jul 03 2013 - 15:25:44)

     No AC power, disabling frequency switch

     musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

     musb-hdrc: MHDRC RTL version 2.0

     musb-hdrc: setup fifo_mode 4

     musb-hdrc: 28/31 max ep, 16384/16384 memory

     USB Peripheral mode controller at 47401000 using PIO, IRQ 0

     musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

     musb-hdrc: MHDRC RTL version 2.0

     musb-hdrc: setup fifo_mode 4

     musb-hdrc: 28/31 max ep, 16384/16384 memory

     USB Host mode controller at 47401800 using PIO, IRQ 0

     SF: Detected M25P32 with page size 64 KiB, total 4 MiB

 

 

     U-Boot 2013.01.01 (Jul 05 2013 - 15:11:37)

 

     I2C: ready

     DRAM: 256 MiB

     WARNING: Caches not enabled

     NAND: 512 MiB

     Using default environment

 

     musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

     musb-hdrc: MHDRC RTL version 2.0

     musb-hdrc: setup fifo_mode 4

     musb-hdrc: 28/31 max ep, 16384/16384 memory

     USB Peripheral mode controller at 47401000 using PIO, IRQ 0

     musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

     musb-hdrc: MHDRC RTL version 2.0

     musb-hdrc: setup fifo_mode 4

     musb-hdrc: 28/31 max ep, 16384/16384 memory

     USB Host mode controller at 47401800 using PIO, IRQ 0

     Net: <ethaddr> not set. Validating first E-fuse MAC

     cpsw

     Hit any key to stop autoboot: 0

     Recovering from network ...

     cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !

     Using cpsw device

     cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !

     cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !

 

     ARP Retry count exceeded; halting

     ping failed; host 223.254.254.1 is not alive

     Booting from nand ...

 

     NAND read: device 0 offset 0x280000, size 0x500000

     5242880 bytes read: OK

     ## Booting kernel from Legacy Image at 80007fc0 ...

     Image Name: Linux-3.2.0

     Image Type: ARM Linux Kernel Image (uncompressed)

     Data Size: 2843304 Bytes = 2.7 MiB

     Load Address: 80008000

     Entry Point: 80008000

     XIP Kernel Image ... OK

     OK

 

     Starting kernel ...

 

     Uncompressing Linux... done, booting the kernel.

     [ 0.077911] tps65910 1-002d: could not be detected

     [ 0.404907] mtdoops: mtd device (mtddev=name/number) must be supplied

     [ 5.595153] UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 3:4096, read 126976 bytes

     [ 5.745269] UBI error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 4:4096, read 126976 bytes

     [ 5.760162] UBI error: ubi_io_read: error -74 (ECC error) while reading 11 bytes from PEB 10:14336, read 11 bytes

     [ 5.771118] UBIFS error (pid 1): ubifs_leb_read: reading 11 bytes from LEB 8:10240 failed, error -74

     [ 5.781890] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

     [ 5.790679] Backtrace:

     [ 5.793365] [<c0018c00>] (dump_backtrace+0x0/0x10c) from [<c03a65f0>] (dump_stack+0x18/0x1c)

     [ 5.802337] r7:00008000 r6:c05259fc r5:c0597388 r4:c0597388

     [ 5.808410] [<c03a65d8>] (dump_stack+0x0/0x1c) from [<c03a6658>] (panic+0x64/0x198)

     [ 5.816558] [<c03a65f4>] (panic+0x0/0x198) from [<c04f9d50>] (mount_block_root+0x1f8/0x2bc)

     [ 5.825439] r3:00000000 r2:00000000 r1:cf01df78 r0:c046a568

     [ 5.831512] [<c04f9b58>] (mount_block_root+0x0/0x2bc) from [<c04f9f10>] (prepare_namespace+0x94/0x1cc)

     [ 5.841430] [<c04f9e7c>] (prepare_namespace+0x0/0x1cc) from [<c04f92f8>] (kernel_init+0xf0/0x124)

     [ 5.850860] r5:c052e5cc r4:c05946c0

     [ 5.854705] [<c04f9208>] (kernel_init+0x0/0x124) from [<c0043b6c>] (do_exit+0x0/0x69c)

     [ 5.863128] r5:c04f9208 r4:00000000

 

Kind regards!