ubifsmount p2020ds-rootfs error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ubifsmount p2020ds-rootfs error

4,165 Views
xiaonanpeng
Contributor II

my demo board is  P2020DS ,  i  use the sdk1.6,  mount  one  mtd  , ubifsmount p2020ds-rootfs                                                   
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22     
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-ro
otfs' errno=-22!  

     how  to deal with   this  error?   thank  U.

 the  detail  as  bellow : 

=> mtd

device nand0 <s8313.nand>, # parts = 13
 #: name  size  offset  mask_flags
 0: stage0              0x00020000 0x00000000 0
 1: boot                0x000e0000 0x00020000 0
 2: factory             0x00100000 0x00100000 0
 3: control             0x00100000 0x00200000 0
 4: os.1                0x01000000 0x00300000 0
 5: uImage.1            0x00800000 0x01300000 0
 6: os.2                0x01000000 0x01b00000 0
 7: uImage.2            0x00800000 0x02b00000 0
 8: p2020ds-rootfs      0x06400000 0x03300000 0
 9: appl.2              0x06400000 0x09700000 0
10: config.1            0x00800000 0x0fb00000 0
11: config.2            0x00800000 0x10300000 0
12: pst                 0x2f500000 0x10b00000 0

active partition: nand0,0 - (stage0) 0x00020000 @ 0x00000000

defaults:
mtdids  : nand0=s8313.nand
mtdparts: mtdparts=s8313.nand:128k(stage0),896k(boot),1m(factory),1m(control),16m(os.1),8m(uImage.1),16m(os.2),8m(uImage.2),100m(p2020ds-rootfs),100m(appl.2),8m(config.1),8m(config.2),-(pst)
=> nand erase.part p2020ds-rootfs

NAND erase.part: device 0 offset 0x3300000, size 0x6400000

Erasing at 0x3300000 --   0% complete.
Erasing at 0x33e0000 --   1% complete.
Erasing at 0x34e0000 --   2% complete.
Erasing at 0x35e0000 --   3% complete.
Erasing at 0x36e0000 --   4% complete.
Erasing at 0x37e0000 --   5% complete.
Erasing at 0x38e0000 --   6% complete.
Erasing at 0x39e0000 --   7% complete.
Erasing at 0x3ae0000 --   8% complete.
Erasing at 0x3be0000 --   9% complete.
Erasing at 0x3ce0000 --  10% complete.
Erasing at 0x3de0000 --  11% complete.
Erasing at 0x3ee0000 --  12% complete.
Erasing at 0x3fe0000 --  13% complete.
Erasing at 0x40e0000 --  14% complete.
Erasing at 0x41e0000 --  15% complete.
Erasing at 0x42e0000 --  16% complete.
Erasing at 0x43e0000 --  17% complete.
Erasing at 0x44e0000 --  18% complete.
Erasing at 0x45e0000 --  19% complete.
Erasing at 0x46e0000 --  20% complete.
Erasing at 0x47e0000 --  21% complete.
Erasing at 0x48e0000 --  22% complete.
Erasing at 0x49e0000 --  23% complete.
Erasing at 0x4ae0000 --  24% complete.
Erasing at 0x4be0000 --  25% complete.
Erasing at 0x4ce0000 --  26% complete.
Erasing at 0x4de0000 --  27% complete.
Skipping bad block at  0x04ee0000                                         

Erasing at 0x4f00000 --  28% complete.
Erasing at 0x4fe0000 --  29% complete.
Erasing at 0x50e0000 --  30% complete.
Erasing at 0x51e0000 --  31% complete.
Erasing at 0x52e0000 --  32% complete.
Erasing at 0x53e0000 --  33% complete.
Erasing at 0x54e0000 --  34% complete.
Erasing at 0x55e0000 --  35% complete.
Erasing at 0x56e0000 --  36% complete.
Erasing at 0x57e0000 --  37% complete.
Erasing at 0x58e0000 --  38% complete.
Erasing at 0x59e0000 --  39% complete.
Erasing at 0x5ae0000 --  40% complete.
Erasing at 0x5be0000 --  41% complete.
Erasing at 0x5ce0000 --  42% complete.
Erasing at 0x5de0000 --  43% complete.
Erasing at 0x5ee0000 --  44% complete.
Skipping bad block at  0x05f00000                                         

Erasing at 0x5fe0000 --  45% complete.
Erasing at 0x60e0000 --  46% complete.
Erasing at 0x61e0000 --  47% complete.
Erasing at 0x62e0000 --  48% complete.
Erasing at 0x63e0000 --  49% complete.
Erasing at 0x64e0000 --  50% complete.
Erasing at 0x65e0000 --  51% complete.
Erasing at 0x66e0000 --  52% complete.
Erasing at 0x67e0000 --  53% complete.
Erasing at 0x68e0000 --  54% complete.
Erasing at 0x69e0000 --  55% complete.
Erasing at 0x6ae0000 --  56% complete.
Erasing at 0x6be0000 --  57% complete.
Erasing at 0x6ce0000 --  58% complete.
Erasing at 0x6de0000 --  59% complete.
Erasing at 0x6ee0000 --  60% complete.
Erasing at 0x6fe0000 --  61% complete.
Erasing at 0x70e0000 --  62% complete.
Erasing at 0x71e0000 --  63% complete.
Erasing at 0x72e0000 --  64% complete.
Erasing at 0x73e0000 --  65% complete.
Erasing at 0x74e0000 --  66% complete.
Erasing at 0x75e0000 --  67% complete.
Erasing at 0x76e0000 --  68% complete.
Erasing at 0x77e0000 --  69% complete.
Erasing at 0x78e0000 --  70% complete.
Skipping bad block at  0x079e0000                                         

Erasing at 0x7a00000 --  71% complete.
Erasing at 0x7ae0000 --  72% complete.
Erasing at 0x7be0000 --  73% complete.
Erasing at 0x7ce0000 --  74% complete.
Erasing at 0x7de0000 --  75% complete.
Erasing at 0x7ee0000 --  76% complete.
Erasing at 0x7fe0000 --  77% complete.
Erasing at 0x80e0000 --  78% complete.
Erasing at 0x81e0000 --  79% complete.
Erasing at 0x82e0000 --  80% complete.
Erasing at 0x83e0000 --  81% complete.
Erasing at 0x84e0000 --  82% complete.
Erasing at 0x85e0000 --  83% complete.
Erasing at 0x86e0000 --  84% complete.
Erasing at 0x87e0000 --  85% complete.
Erasing at 0x88e0000 --  86% complete.
Erasing at 0x89e0000 --  87% complete.
Erasing at 0x8ae0000 --  88% complete.
Erasing at 0x8be0000 --  89% complete.
Erasing at 0x8ce0000 --  90% complete.
Erasing at 0x8de0000 --  91% complete.
Erasing at 0x8ee0000 --  92% complete.
Erasing at 0x8fe0000 --  93% complete.
Erasing at 0x90e0000 --  94% complete.
Erasing at 0x91e0000 --  95% complete.
Erasing at 0x92e0000 --  96% complete.
Erasing at 0x93e0000 --  97% complete.
Erasing at 0x94e0000 --  98% complete.
Skipping bad block at  0x09560000                                         

Erasing at 0x95e0000 --  99% complete.
Erasing at 0x96e0000 -- 100% complete.
OK
=> ubi part p2020ds-rootfs
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=8"
UBI: MTD device size:            100 MiB
UBI: number of good PEBs:        796
UBI: number of bad PEBs:         4
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             785
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/0
=> ubi create p2020ds-rootfs
No size specified -> Using max size (99676160)
Creating dynamic volume p2020ds-rootfs of size 99676160
=> tftp 0x2000000   fsl-image-flash-p2020ds-20200806091353.rootfs.ubifs
eTSEC1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC1: No link.
eTSEC2 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC2: No link.
eTSEC3 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC3: No link.
=> tftp 0x2000000   fsl-image-flash-p2020ds-20200806091353.rootfs.ubifs
eTSEC1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC1: No link.
Speed: 1000, full duplex
Using eTSEC2 device
TFTP from server 192.168.1.188; our IP address is 192.168.1.254
Filename 'fsl-image-flash-p2020ds-20200806091353.rootfs.ubifs'.
Load address: 0x2000000
Loading: *#################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  ###########################
  5.8 MiB/s
done
Bytes transferred = 9937920 (97a400 hex)
=> ubi write 0x2000000   p2020ds-rootfs 0x97a400
9937920 bytes written to volume p2020ds-rootfs
=> ubifsmount
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
=> ubifsmount  p2020ds-rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
=> ubifsmount p2020ds-rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
=> nand erase.part p2020ds-rootfs

NAND erase.part: device 0 offset 0x3300000, size 0x6400000

Erasing at 0x3300000 --   0% complete.
Erasing at 0x33e0000 --   1% complete.
Erasing at 0x34e0000 --   2% complete.
Erasing at 0x35e0000 --   3% complete.
Erasing at 0x36e0000 --   4% complete.
Erasing at 0x37e0000 --   5% complete.
Erasing at 0x38e0000 --   6% complete.
Erasing at 0x39e0000 --   7% complete.
Erasing at 0x3ae0000 --   8% complete.
Erasing at 0x3be0000 --   9% complete.
Erasing at 0x3ce0000 --  10% complete.
Erasing at 0x3de0000 --  11% complete.
Erasing at 0x3ee0000 --  12% complete.
Erasing at 0x3fe0000 --  13% complete.
Erasing at 0x40e0000 --  14% complete.
Erasing at 0x41e0000 --  15% complete.
Erasing at 0x42e0000 --  16% complete.
Erasing at 0x43e0000 --  17% complete.
Erasing at 0x44e0000 --  18% complete.
Erasing at 0x45e0000 --  19% complete.
Erasing at 0x46e0000 --  20% complete.
Erasing at 0x47e0000 --  21% complete.
Erasing at 0x48e0000 --  22% complete.
Erasing at 0x49e0000 --  23% complete.
Erasing at 0x4ae0000 --  24% complete.
Erasing at 0x4be0000 --  25% complete.
Erasing at 0x4ce0000 --  26% complete.
Erasing at 0x4de0000 --  27% complete.
Skipping bad block at  0x04ee0000                                         

Erasing at 0x4f00000 --  28% complete.
Erasing at 0x4fe0000 --  29% complete.
Erasing at 0x50e0000 --  30% complete.
Erasing at 0x51e0000 --  31% complete.
Erasing at 0x52e0000 --  32% complete.
Erasing at 0x53e0000 --  33% complete.
Erasing at 0x54e0000 --  34% complete.
Erasing at 0x55e0000 --  35% complete.
Erasing at 0x56e0000 --  36% complete.
Erasing at 0x57e0000 --  37% complete.
Erasing at 0x58e0000 --  38% complete.
Erasing at 0x59e0000 --  39% complete.
Erasing at 0x5ae0000 --  40% complete.
Erasing at 0x5be0000 --  41% complete.
Erasing at 0x5ce0000 --  42% complete.
Erasing at 0x5de0000 --  43% complete.
Erasing at 0x5ee0000 --  44% complete.
Skipping bad block at  0x05f00000                                         

Erasing at 0x5fe0000 --  45% complete.
Erasing at 0x60e0000 --  46% complete.
Erasing at 0x61e0000 --  47% complete.
Erasing at 0x62e0000 --  48% complete.
Erasing at 0x63e0000 --  49% complete.
Erasing at 0x64e0000 --  50% complete.
Erasing at 0x65e0000 --  51% complete.
Erasing at 0x66e0000 --  52% complete.
Erasing at 0x67e0000 --  53% complete.
Erasing at 0x68e0000 --  54% complete.
Erasing at 0x69e0000 --  55% complete.
Erasing at 0x6ae0000 --  56% complete.
Erasing at 0x6be0000 --  57% complete.
Erasing at 0x6ce0000 --  58% complete.
Erasing at 0x6de0000 --  59% complete.
Erasing at 0x6ee0000 --  60% complete.
Erasing at 0x6fe0000 --  61% complete.
Erasing at 0x70e0000 --  62% complete.
Erasing at 0x71e0000 --  63% complete.
Erasing at 0x72e0000 --  64% complete.
Erasing at 0x73e0000 --  65% complete.
Erasing at 0x74e0000 --  66% complete.
Erasing at 0x75e0000 --  67% complete.
Erasing at 0x76e0000 --  68% complete.
Erasing at 0x77e0000 --  69% complete.
Erasing at 0x78e0000 --  70% complete.
Skipping bad block at  0x079e0000                                         

Erasing at 0x7a00000 --  71% complete.
Erasing at 0x7ae0000 --  72% complete.
Erasing at 0x7be0000 --  73% complete.
Erasing at 0x7ce0000 --  74% complete.
Erasing at 0x7de0000 --  75% complete.
Erasing at 0x7ee0000 --  76% complete.
Erasing at 0x7fe0000 --  77% complete.
Erasing at 0x80e0000 --  78% complete.
Erasing at 0x81e0000 --  79% complete.
Erasing at 0x82e0000 --  80% complete.
Erasing at 0x83e0000 --  81% complete.
Erasing at 0x84e0000 --  82% complete.
Erasing at 0x85e0000 --  83% complete.
Erasing at 0x86e0000 --  84% complete.
Erasing at 0x87e0000 --  85% complete.
Erasing at 0x88e0000 --  86% complete.
Erasing at 0x89e0000 --  87% complete.
Erasing at 0x8ae0000 --  88% complete.
Erasing at 0x8be0000 --  89% complete.
Erasing at 0x8ce0000 --  90% complete.
Erasing at 0x8de0000 --  91% complete.
Erasing at 0x8ee0000 --  92% complete.
Erasing at 0x8fe0000 --  93% complete.
Erasing at 0x90e0000 --  94% complete.
Erasing at 0x91e0000 --  95% complete.
Erasing at 0x92e0000 --  96% complete.
Erasing at 0x93e0000 --  97% complete.
Erasing at 0x94e0000 --  98% complete.
Skipping bad block at  0x09560000                                         

Erasing at 0x95e0000 --  99% complete.
Erasing at 0x96e0000 -- 100% complete.
OK
=> ubi part p2020ds-rootfs
UBI: mtd1 is detached from ubi0
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=8"
UBI: MTD device size:            100 MiB
UBI: number of good PEBs:        796
UBI: number of bad PEBs:         4
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             785
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/0
=> ubi create p2020ds-rootfs
No size specified -> Using max size (99676160)
Creating dynamic volume p2020ds-rootfs of size 99676160
=> ubifsmount p2020ds-rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
=> tftp 0x2000000   fsl-image-flash-p2020ds.ubi
eTSEC2 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC2: No link.
eTSEC3 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC3: No link.
eTSEC1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC1: No link.
=> tftp 0x2000000   fsl-image-flash-p2020ds.ubi
Speed: 1000, full duplex
Using eTSEC2 device
TFTP from server 192.168.1.188; our IP address is 192.168.1.254
Filename 'fsl-image-flash-p2020ds.ubi'.
Load address: 0x2000000
Loading: *#################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  ##########
  5.8 MiB/s
done
Bytes transferred = 10633216 (a24000 hex)
=> ubi write 0x2000000   p2020ds-rootfs 0xa24000
10633216 bytes written to volume p2020ds-rootfs
=> ubifsmount p2020ds-rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume

Tags (2)
0 Kudos
13 Replies

4,025 Views
yipingwang
NXP TechSupport
NXP TechSupport

=> setenv bootargs "ubi.mtd=6 root=ubi0:p2020ds-rootfs rw rootfstype=ubifs console=ttyS0,115200"

=> setenv bootcmd "run bootargs;tftp 1000000 uImage-p2020ds.bin;tftp c00000 uImage-p2020ds.dtb;bootm 1000000 - c00000"

0 Kudos

4,025 Views
xiaonanpeng
Contributor II

hi      when  I  save  the rootfs.ubifs in the mtd5   and  start up     in  the up  layer    the error   happen ,  can  u  tell  the problem

=> ubifsmount ubi0:p2020ds-rootfs
UBIFS: mounted UBI device 0, volume 0, name "p2020ds-rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   197701632 bytes (193068 KiB, 188 MiB, 1557 LEBs)
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
=> ubifsmount
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
=> ubifsls
<DIR>     10296  Fri Aug 14 09:16:35 2020  bin
<DIR>       160  Fri Aug 14 09:16:34 2020  dev
<DIR>      5320  Fri Aug 14 09:16:34 2020  etc
<DIR>      5144  Fri Aug 14 09:16:34 2020  lib
<DIR>       160  Fri Aug 14 09:16:35 2020  mnt
<DIR>       296  Fri Aug 14 09:16:34 2020  opt
<DIR>       160  Fri Aug 14 09:16:35 2020  run
<DIR>       160  Fri Aug 14 09:16:34 2020  tmp
<DIR>       160  Fri Aug 14 09:16:35 2020  sys
<DIR>       808  Fri Aug 14 09:16:31 2020  var
<DIR>       672  Fri Aug 14 09:16:33 2020  usr
<DIR>       160  Fri Aug 14 09:16:35 2020  patches
<DIR>       160  Fri Aug 14 09:16:35 2020  boot
<DIR>       224  Fri Aug 14 09:16:35 2020  home
<DIR>       160  Fri Aug 14 09:16:34 2020  proc
<DIR>     10768  Fri Aug 14 09:16:31 2020  sbin
<LNK>        12  Fri Aug 14 09:16:35 2020  linuxrc
<DIR>       160  Fri Aug 14 09:16:35 2020  media
=> ubifsmount ubi0:p2020ds-rootfs
UBIFS: mounted UBI device 0, volume 0, name "p2020ds-rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   197701632 bytes (193068 KiB, 188 MiB, 1557 LEBs)
UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
=> ubifsls
<DIR>     10296  Fri Aug 14 09:16:35 2020  bin
<DIR>       160  Fri Aug 14 09:16:34 2020  dev
<DIR>      5320  Fri Aug 14 09:16:34 2020  etc
<DIR>      5144  Fri Aug 14 09:16:34 2020  lib
<DIR>       160  Fri Aug 14 09:16:35 2020  mnt
<DIR>       296  Fri Aug 14 09:16:34 2020  opt
<DIR>       160  Fri Aug 14 09:16:35 2020  run
<DIR>       160  Fri Aug 14 09:16:34 2020  tmp
<DIR>       160  Fri Aug 14 09:16:35 2020  sys
<DIR>       808  Fri Aug 14 09:16:31 2020  var
<DIR>       672  Fri Aug 14 09:16:33 2020  usr
<DIR>       160  Fri Aug 14 09:16:35 2020  patches
<DIR>       160  Fri Aug 14 09:16:35 2020  boot
<DIR>       224  Fri Aug 14 09:16:35 2020  home
<DIR>       160  Fri Aug 14 09:16:34 2020  proc
<DIR>     10768  Fri Aug 14 09:16:31 2020  sbin
<LNK>        12  Fri Aug 14 09:16:35 2020  linuxrc
<DIR>       160  Fri Aug 14 09:16:35 2020  media
=> setenv bootargs "ubi.mtd=5 root=ubi0:p2020ds-rootfs rwmt rootfstype=ubifs console=ttyS0,115200"
=> uImage-
Unknown command 'uImage-' - try 'help'
=> setenv bootcmd "run bootargs;tftp 3000000 uImage-p2020ds.bin;tftp c00000 uImage-p2020ds.dtb;bootm 3000000 - c00000"
=> run bootcmd
Please see usage
eTSEC1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
eTSEC1: No link.
Speed: 1000, full duplex
Using eTSEC2 device
TFTP from server 192.168.1.188; our IP address is 192.168.1.254
Filename 'uImage-p2020ds.bin'.
Load address: 0x3000000
Loading: *#################################################################
  #################################################################
  #################################################################
  #################################################################
  ##########################
  6.1 MiB/s
done
Bytes transferred = 4195090 (400312 hex)
Speed: 1000, full duplex
Using eTSEC2 device
TFTP from server 192.168.1.188; our IP address is 192.168.1.254
Filename 'uImage-p2020ds.dtb'.
Load address: 0xc00000
Loading: *#
  173.8 KiB/s
done
Bytes transferred = 14094 (370e hex)
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.12.19-rt30-QorIQ-SDK-V1.
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    4195026 Bytes = 4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00c00000
   Booting using the fdt blob at 0xc00000
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 03ff9000, end 03fff70d ... OK
Using P2020 DS machine description
Memory CAM mapping: 256/256/256 Mb, residual: 1280Mb
Linux version 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a (xpeng@ubuntu) (gcc version 4.8.1 (GCC) ) #2 SMP Wed Aug 26 06:21:26 PDT 2020
CPU maps initialized for 1 thread per core
bootconsole [udbg0] enabled
setup_arch: bootmem
mpc85xx_ds_setup_arch()
MPC85xx DS board from Freescale Semiconductor
arch: exit
Zone ranges:
  DMA      [mem 0x00000000-0x2fffffff]
  Normal   empty
  HighMem  [mem 0x30000000-0x7fffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x00000000-0x7fffffff]
MMU: Allocated 1088 bytes of context maps for 255 contexts
PERCPU: Embedded 7 pages/cpu @c1971000 s7104 r8192 d13376 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
Kernel command line: ubi.mtd=5 root=ubi0:p2020ds-rootfs rwmt rootfstype=ubifs console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Sorting __ex_table...
Memory: 2004176K/2097152K available (6000K kernel code, 316K rwdata, 1792K rodata, 268K init, 1217K bss, 92976K reserved, 1310712K highmem)
Kernel virtual memory layout:
  * 0xfff5f000..0xfffff000  : fixmap
  * 0xffc00000..0xffe00000  : highmem PTEs
  * 0xffbfd000..0xffc00000  : early ioremap
  * 0xf1000000..0xffbfd000  : vmalloc & ioremap
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
 RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC  " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
clocksource: timebase mult[14000000] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
mpic: requesting IPIs...
Brought up 2 CPUs
devtmpfs: initialized
NET: Registered protocol family 16
            
Found FSL PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe08000 (primary) ranges:
 MEM 0x0000000080000000..0x000000009fffffff -> 0x0000000080000000
  IO 0x00000000ffc00000..0x00000000ffc0ffff -> 0x0000000000000000
/pcie@ffe08000: PCICSRBAR @ 0xfff00000
Found FSL PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->0
PCI host bridge /pcie@ffe0a000  ranges:
 MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000
  IO 0x00000000ffc20000..0x00000000ffc2ffff -> 0x0000000000000000
/pcie@ffe0a000: PCICSRBAR @ 0xfff00000
PCI: Probing PCI hardware
fsl-pci ffe08000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x80000000-0x9fffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: ignoring class 0x0b2000 (doesn't match header type 01)
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
fsl-pci ffe0a000.pcie: PCI host bridge to bus 0001:02
pci_bus 0001:02: root bus resource [io  0x20000-0x2ffff] (bus address [0x0000-0xffff])
pci_bus 0001:02: root bus resource [mem 0xc0000000-0xdfffffff]
pci_bus 0001:02: root bus resource [bus 02-ff]
pci 0001:02:00.0: ignoring class 0x0b2000 (doesn't match header type 01)
pci 0001:02:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0001:02:00.0: PCI bridge to [bus 03-ff]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0:   bridge window [io  0x0000-0xffff]
pci 0000:00:00.0:   bridge window [mem 0x80000000-0x9fffffff]
pci 0001:02:00.0: PCI bridge to [bus 03]
pci 0001:02:00.0:   bridge window [io  0x20000-0x2ffff]
pci 0001:02:00.0:   bridge window [mem 0xc0000000-0xdfffffff]
fsl-l2ctlr ffe20000.l2-cache-controller: Entire L2 as cache, provide valid sram address and size
fsl-l2ctlr: probe of ffe20000.l2-cache-controller failed with error -22
bio: create slab <bio-0> at 0
Freescale Elo series DMA driver
fsl-elo-dma ffe0c300.dma: #0 (fsl,eloplus-dma-channel), irq 76
fsl-elo-dma ffe0c300.dma: #1 (fsl,eloplus-dma-channel), irq 77
fsl-elo-dma ffe0c300.dma: #2 (fsl,eloplus-dma-channel), irq 78
fsl-elo-dma ffe0c300.dma: #3 (fsl,eloplus-dma-channel), irq 79
fsl-elo-dma ffe21300.dma: #0 (fsl,eloplus-dma-channel), irq 20
fsl-elo-dma ffe21300.dma: #1 (fsl,eloplus-dma-channel), irq 21
fsl-elo-dma ffe21300.dma: #2 (fsl,eloplus-dma-channel), irq 22
fsl-elo-dma ffe21300.dma: #3 (fsl,eloplus-dma-channel), irq 23
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Freescale PMC driver
audit: initializing netlink socket (disabled)
type=2000 audit(0.308:1): initialized
bounce pool size: 64 pages
HugeTLB registered 1 MB page size, pre-allocated 0 pages
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.30 [Flags: R/O].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1485
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xffe04500 (irq = 42, base_baud = 25000000) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xffe04600 (irq = 42, base_baud = 25000000) is a 16550A
Generic non-volatile memory driver v1.1
brd: module loaded
loop: module loaded
nbd: registered device at major 43
st: Version 20101219, fixed bufsize 32768, s/g segs 256
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: bad block at 0x000001b60000
nand_read_bbt: bad block at 0x0000031a0000
nand_read_bbt: bad block at 0x000004ee0000
nand_read_bbt: bad block at 0x000005f00000
nand_read_bbt: bad block at 0x0000079e0000
nand_read_bbt: bad block at 0x000009560000
nand_read_bbt: bad block at 0x00000ace0000
nand_read_bbt: bad block at 0x000018b00000
nand_read_bbt: bad block at 0x00001e8c0000
6 ofpart partitions found on MTD device ffa00000.flash
Creating 6 MTD partitions on "ffa00000.flash":
0x000000000000-0x000002000000 : "u-boot"
ftl_cs: FTL header not found.
0x000002000000-0x000012000000 : "jffs2"
ftl_cs: FTL header not found.
0x000012000000-0x00001a000000 : "ramdisk"
ftl_cs: FTL header not found.
0x00001a000000-0x00001e000000 : "kernel"
ftl_cs: FTL header not found.
0x00001e000000-0x00001f000000 : "dtb"
ftl_cs: FTL header not found.
0x00001f000000-0x00002b800000 : "p2020ds-rootfs"
ftl_cs: FTL header not found.
eLBC NAND device at 0xffa00000, bank 2
fsl_espi ffe07000.spi: master is unqueued, this is deprecated
fsl_espi ffe07000.spi: at 0xf10de000 (irq = 59)
libphy: Fixed MDIO Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
mdio_bus mdio@ffe24520: cannot get PHY at address 28
mdio_bus mdio@ffe24520: cannot get PHY at address 29
mdio_bus mdio@ffe24520: cannot get PHY at address 17
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
fsl-gianfar ffe24000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar ffe24000.ethernet eth0: mac: 00:00:00:00:00:00
fsl-gianfar ffe24000.ethernet eth0: Running with NAPI enabled
fsl-gianfar ffe24000.ethernet eth0: RX BD ring size for Q[0]: 256
fsl-gianfar ffe24000.ethernet eth0: TX BD ring size for Q[0]: 256
fsl-gianfar ffe25000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar ffe25000.ethernet eth1: mac: 00:00:00:00:00:00
fsl-gianfar ffe25000.ethernet eth1: Running with NAPI enabled
fsl-gianfar ffe25000.ethernet eth1: RX BD ring size for Q[0]: 256
fsl-gianfar ffe25000.ethernet eth1: TX BD ring size for Q[0]: 256
fsl-gianfar ffe26000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar ffe26000.ethernet eth2: mac: 00:00:00:00:00:00
fsl-gianfar ffe26000.ethernet eth2: Running with NAPI enabled
fsl-gianfar ffe26000.ethernet eth2: RX BD ring size for Q[0]: 256
fsl-gianfar ffe26000.ethernet eth2: TX BD ring size for Q[0]: 256
pps pps0: new PPS source ptp0
ucc_geth_driver: QE UCC Gigabit Ethernet Controller
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 28, io mem 0xffe22000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
mpc-i2c ffe03000.i2c: timeout 1000000 us
mpc-i2c ffe03100.i2c: timeout 1000000 us
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc@ffe00000/sdhc@2e000: voltage-ranges unspecified
mmc0: SDHCI controller on ffe2e000.sdhc [ffe2e000.sdhc] using DMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
snd-soc-p1022ds: missing/invalid global utils node
ipip: IPv4 over IPv4 tunneling driver
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
UBI: attaching mtd5 to ubi0
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
Erase counter header dump:
 magic          0x55424923
 version        1
 ec             4
 vid_hdr_offset 2048
 data_offset    4096
 image_seq      0
 hdr_crc        0x3f05d0a6
erase counter header hexdump:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #2
Call Trace:
[ef04dcb0] [c0006fdc] show_stack+0x44/0x15c (unreliable)
[ef04dcf0] [c05d8f90] dump_stack+0x78/0xa0
[ef04dd00] [c0390a38] validate_ec_hdr+0x148/0x1cc
[ef04dd30] [c0391574] ubi_io_read_ec_hdr+0x1d8/0x29c
[ef04dd60] [c0396568] ubi_attach+0x174/0x16c0
[ef04dde0] [c038addc] ubi_attach_mtd_dev+0x6b0/0xcf8
[ef04de30] [c07c0ea4] ubi_init+0x288/0x328
[ef04de80] [c00021d8] do_one_initcall+0x154/0x1a4
[ef04def0] [c07a08ec] kernel_init_freeable+0x134/0x1d4
[ef04df20] [c00027dc] kernel_init+0x18/0x174
[ef04df40] [c000efc8] ret_from_kernel_thread+0x5c/0x64
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
UBI error: ubi_init: cannot attach mtd5
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
snd-soc-p1022rdk: missing/invalid global utils node
ALSA device list:
  No soundcards found.
UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:p2020ds-rootfs", error -19
VFS: Cannot open root device "ubi0:p2020ds-rootfs" or unknown-block(0,0): error -19
Please append a correct "root=" boot option; here are the available partitions:
1f00           32768 mtdblock0  (driver?)
1f01          262144 mtdblock1  (driver?)
1f02          131072 mtdblock2  (driver?)
1f03           65536 mtdblock3  (driver?)
1f04           16384 mtdblock4  (driver?)
1f05          204800 mtdblock5  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #2
Call Trace:
[ef04ddd0] [c0006fdc] show_stack+0x44/0x15c (unreliable)
[ef04de10] [c05d8f90] dump_stack+0x78/0xa0
[ef04de20] [c05d65dc] panic+0xdc/0x1fc
[ef04de70] [c07a0d14] mount_block_root+0x1bc/0x268
[ef04ded0] [c07a10b4] prepare_namespace+0xa4/0x1d8
[ef04def0] [c07a0978] kernel_init_freeable+0x1c0/0x1d4
[ef04df20] [c00027dc] kernel_init+0x18/0x174
[ef04df40] [c000efc8] ret_from_kernel_thread+0x5c/0x64

0 Kudos

4,025 Views
yipingwang
NXP TechSupport
NXP TechSupport

You should use the bootargs as "ubi.mtd=6 root=ubi0:p2020ds-rootfs rw rootfstype=ubifs console=ttyS0,115200" according to the following information on your target board.

root@p2020ds:~# cat /proc/mtd                                                  
dev:    size   erasesize  name                                                 
mtd0: 02000000 00020000 "u-boot"                                               
mtd1: 10000000 00020000 "jffs2"                                                
mtd2: 08000000 00020000 "ramdisk"                                              
mtd3: 04000000 00020000 "kernel"                                               
mtd4: 01000000 00020000 "dtb"                                                  
mtd5: 03200000 00020000 "appl.1"                                               
mtd6: 0c800000 00020000 "p2020ds-rootfs"                                       
mtd7: 40000000 00020000 "ffa80000.flash"                                       
mtd8: 40000000 00020000 "ffac0000.flash"   

Please check the following command

# ubidetach /dev/ubi_ctrl -m 6

# ubiformat /dev/mtd6 -f ./ubi.img 

# ubiattach /dev/ubi_ctrl -m 6

# mount -t ubifs ubi0_0 /mnt

# ls /mnt/

   

0 Kudos

3,980 Views
xiaonanpeng
Contributor II

hi        yipingwang 

 

  the command flash_eraseall /dev/mtd5  operation  success,   but  the    ubiformat /dev/mtd5 -y  fail  and aome  excptin  ocuuue   pls  help  me  to slove this  problem  thank  u.

0 Kudos

3,945 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check whether you configured Linux Kernel as the following.

Device Drivers --->

     <*> Memory Technology Device (MTD) support  --->

     < > Parallel port support  --->

     <*> Enable UBI - Unsorted block images  --->

     <*> NAND Device Support  --->

Please try whether you could use ubiformat  to format other partition.

0 Kudos

4,023 Views
xiaonanpeng
Contributor II

hi

     I  follow  this  operation .  can  u  tell   me   the  MTDIDS_DEFAULT  and   MTDPARTS_DEFAULT  the value string.

as  example.

0 Kudos

4,023 Views
xiaonanpeng
Contributor II

hi

   i   donot know  the   reason  of the bellow   error  in the  uboot .       can  I  use  ubifsmount   command  in the uboot?

ubifsmount p2020ds-rootfs
UBIFS error (pid 0): ubifs_get_sb: cannot open "p2020ds-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'p2020ds-rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume

0 Kudos

4,023 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the above procedure, please format the rootfs into the MTD block with command ubiformat  in Linux.

0 Kudos

4,023 Views
xiaonanpeng
Contributor II

hi Yiping Wang

      when  ubiformat: formatting eraseblock 2 --  0 % complete              it is  still         0 % complete.  It can  not  complete.    what's   the  problem ?   thank  U                     

root@p2020ds:~# cat /proc/mtd                                                  
dev:    size   erasesize  name                                                 
mtd0: 02000000 00020000 "u-boot"                                               
mtd1: 10000000 00020000 "jffs2"                                                
mtd2: 08000000 00020000 "ramdisk"                                              
mtd3: 04000000 00020000 "kernel"                                               
mtd4: 01000000 00020000 "dtb"                                                  
mtd5: 03200000 00020000 "appl.1"                                               
mtd6: 0c800000 00020000 "p2020ds-rootfs"                                       
mtd7: 40000000 00020000 "ffa80000.flash"                                       
mtd8: 40000000 00020000 "ffac0000.flash"                                       
root@p2020ds:~#                                                                
root@p2020ds:~#                                                                
root@p2020ds:~#                                                                
root@p2020ds:~# ubiformat /dev/mtd5 -y                                         
ubiformat: mtd5 (nand), size 52428800 bytes (50.0 MiB), 400 eraseblocks of 13107
2 bytes (128.0 KiB), min. I/O size 2048 bytes                                  
libscan: scanning Unable to handle kernel paging request for instruction fetch 
eraseblock 343 -Faulting instruction address: 0x00000000                       
- 86 % complete Oops: Kernel access of bad area, sig: 11 [#1]                  
libscan: scannSMP NR_CPUS=8 ing eraseblock 3P2020 DS                           
libscan: s complModules linked in:ete                                          
canning erasebloCPU: 1 PID: 2337 Comm: ubiformat Not tainted 3.12.19-rt30-QorIQ-
SDK-V1.6+gc29fe1a #1                                                           
ck 345 -- 86 % ctask: ed988000 ti: eda20000 task.ti: eda20000                  
libscaNIP: 00000000 LR: c037da6c CTR: 00000000                                 
n: scanning erasREGS: eda21cb0 TRAP: 0400   Not tainted  (3.12.19-rt30-QorIQ-SDK
-V1.6+gc29fe1a)                                                                
libscan: scanning eraseblock 3  CR: 24002624  XER: 00000000                    
48 -- 87 % compl                                                               
li000001ff bscan: scanning ed96c5d0 eraseblock 351 -- 8700000000  % complete   
libsca00000000 n: scanning eraseblo10028abc ck 353 -- 88 % c00000000 omplete   
lieda21e48 bscan: scanning ffffffff eras0eblock 355 -0000004 - 89 % complete c08
libscan: scann00000000 ing eraseblock 300000000 56 -- 89 % compl00000010 ete   
lied96c000 bscan: scanning ed81f9f8 eraseblock 359 -00000000 - 90 % complete   
libscan: scannNIP [00000000]   (null)                                          
ing eraseblock 3LR [c037da6c] nand_write_subpage_hwecc+0xbc/0x19c              
60 -- 90 % complCall Trace:                                                    
61 -- 90 % cda21d60] [eda21d64] 0xeda21d64 canning eraseblo(unreliable)ck 3    
 scanning eras0] [c037d98c] nand_write_page+0x174/0x198n:                      
              eblock 362 -- 90[eda21dd0] [c037f074] nand_do_write_ops+0x224/0x3c
liomplete                                                                      
aseblock 363 -ing [eda21e40] [c037f3d8] nand_write+0x58/0x84er                 
libscan: scann- 91 % complete [eda21e80] [c036539c] mtdchar_write+0x128/0x2c8  
 -- 91 % compling eraseblock 3[eda21ef0] [c00f5028] vfs_write+0xc8/0x1b064     
nning eraseblo21f10] [c00f5698] SyS_write+0x4c/0xacca                          
libscae       ck 365 -- 91 % c[eda21f40] [c000ee90] ret_from_syscall+0x0/0x3c  
      n: scanning eras--- Exception: c01 at 0xff0bac4                          
    LR = 0x1000aa78                                                            
lilock 366 -- 91Instruction dump: % complete                                   
libscan: sXXXXXXX Xcanning erasebloXXXXXXX ck 369 -- 92 % c complXXXXXXX ete X 
liXXXXXXX Xbscan: scanning XXXXXXX erasXeblock 371 -XXXXXXX -X 93 % complete XXX
liXbscan: scannXXXXXXX ing eraseblock 3                                        
72 -- 93 % compl---[ end trace eb9c0c13fad128f5 ]---                           
libscan: s                                                                     
libscan: scanning eraseblock 399 -- 100 % complete                             
ubiformat: 400 eraseblocks are supposedly empty                                
ubiformat: formatting eraseblock 2 --  0 % complete                            
                                                                               
                                                                               
                                                                               
                                   

0 Kudos

4,023 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check whether "UBIFS file system support" is enabled in your Linux Kernel configuration file.

Please try to execute the following commands.

# flash_eraseall /dev/mtd6
# ubiformat /dev/mtd6 -y

0 Kudos

4,023 Views
xiaonanpeng
Contributor II

Hi  Yiping Wang

 

   in  the  uboot      I  start up  as  the  follow  error.  can  u  tell   the  "bootcmd"  and  "bootargs "  as  example

=> printenv
baudrate=115200
bdev=sda3
bootargs=ubi.mtd=6 root=ubi0 rw rootfstype=ubifs console=ttyS0,115200
bootcmd=run bootargs;tftp 1000000 uImage-p2020ds.bin;tftp c00000 uImage-p2020ds.dtb;bootm 1000000 c00000
bootdelay=10
bootfile=uImage
eth1addr=00:0c:29:4d:e4:f4
ethact=eTSEC2
ethprime=eTSEC1
fdtaddr=c00000
fdtfile=p2020ds/p2020ds.dtb
fileaddr=c00000
filesize=37f0
gatewayip=192.168.1.1
hostname=unknown
hwconfig=fsl_ddr:ctlr_intlv=bank,bank_intlv=cs0_cs1;usb1:dr_mode=host,phy_type=ulpi
ipaddr=192.168.1.254
loadaddr=1000000
loads_echo=1
mtddevname=p2020ds-rootfs
mtddevnum=6
mtdids=nand0=s8313.nand
mtdparts=mtdparts=s8313.nand:32m(u-boot),256m(jffs2),128m(ramdisk),64m(kernel),16m(dtb),50m(appl.1),200m(p2020ds-rootfs),
netdev=eth0
netmask=255.255.255.0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
othbootargs=cache-sram-size=0x10000
partition=nand0,6
perf_mode=performance
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
ramdiskaddr=2000000
ramdiskfile=p2020ds/ramdisk.uboot
rootpath=/opt/nfsroot
satabootcmd=setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddrconsoledev=ttyS0
serverip=192.168.1.188
stderr=serial
stdin=serial
stdout=serial
tftpflash=tftpboot $loadaddr $uboot; protect off 0xeff40000 +$filesize; erase 0xeff40000 +$filesize; cp.b $loadaddr 0xeff40000 $filesize; protect on 0xeff40000 +$filesize; cmp.b $loadaddr 0xeff40000 $filesize
uboot=u-boot.bin

Environment size: 1907/8188 bytes
=> ubi part
Device 0: nand0, partition p2020ds-rootfs
=>
Device 0: nand0, partition p2020ds-rootfs
=>
Device 0: nand0, partition p2020ds-rootfs
=> setenv bootargs ubi.mtd=6 root=ubi0:p2020ds-rootfs rootfstype=ubifs console=ttymxc0,115200 wvga calibration init=/init rw
=> setenv bootcmd 'run bootargs;tftp 1000000 uImage-p2020ds.bin;tftp c00000 uImage-p2020ds.dtb;bootm 1000000 c00000'
=> run bootcmd
ubi - ubi commands

Usage:
ubi part [part] [offset]
 - Show or set current partition (with optional VID header offset)
ubi info [l[ayout]] - Display volume and ubi layout information
ubi create[vol] volume [size] [type] - create volume name with size
ubi write[vol] address volume size - Write volume from address with size
ubi write.part address volume size [fullsize]
 - Write part of a volume from address
ubi read[vol] address volume [size] - Read volume to address with size
ubi remove[vol] volume - Remove volume
[Legends]
 volume: character name
 size: specified in bytes
 type: s[tatic] or d[ynamic] (default=dynamic)
Speed: 1000, full duplex
Using eTSEC2 device
TFTP from server 192.168.1.188; our IP address is 192.168.1.254
Filename 'uImage-p2020ds.bin'.
Load address: 0x1000000
Loading: *#################################################################
  #################################################################
  #################################################################
  #################################################################
  ##########################
  5.5 MiB/s
done
Bytes transferred = 4195097 (400319 hex)

 

WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-3.12.19-rt30-QorIQ-SDK-V1.
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    4195033 Bytes = 4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

0 Kudos

4,023 Views
yipingwang
NXP TechSupport
NXP TechSupport
  1. Please refer to Linux Kernel configuration.

Device Drivers --->

     <*> Memory Technology Device (MTD) support  --->

     < > Parallel port support  --->

     <*> Enable UBI - Unsorted block images  --->

     <*> NAND Device Support  --->

File systems  --->

      [*] Miscellaneous filesystems  --->

      [*] Network File Systems  --->

      <*> UBIFS file system support

2. Please erase the  MTD device.
# flash_eraseall /dev/mtdNum
# ubiformat /dev/mtdNum -y

3. Capture the parameter of ubifs and then create the rootfs.ubi.

# ubiattach /dev/ubi_ctrl -m 4

UBI: attaching mtd4 to ubi0

UBI: scanning is finished

UBI: attached mtd4 (name "NAND Compressed RFS Image", size 500 MiB) to ubi0

UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes

UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048

UBI: VID header offset: 2048 (aligned 2048), data offset: 4096

UBI: good PEBs: 3996, bad PEBs: 4, corrupted PEBs: 0

UBI: user volume: 0, internal volumes: 1, max. volumes count: 128

UBI: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 590956223

UBI: available PEBs: 3916, total reserved PEBs: 80, PEBs reserved for bad PEB handling: 76

UBI: background thread "ubi_bgt0d" started, PID 1235

UBI device number 0, total 3996 LEBs (507396096 bytes, 483.9 MiB), available 3916 LEBs (497238016 bytes, 474.2 MiB), LEB size 126976 bytes (124.0 KiB)

 

>mkfs.ubifs -q -r rootfs/ -m 2048 -e 126976 -c 4000 -o ubifs.img

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

 

Where the ubinize.cfg, here is the e.g:

###################

[ubifs]

mode=ubi

image=ubifs.img

vol_id=0

vol_size=200MiB

vol_type=dynamic

vol_name=rootfs

####################

 

For the value of the parameters listed above can be got the info:
-m smallest flash I/O unit
-e logical eraseblock size(   May be "logical erase block size + 1k (or 2k) = physical eraseblock size ")
-c available LEBs
-p physical eraseblock size
-s -sub-page-size=<bytes>  minimum input/output unit used for UBI headers,
                           e.g. sub-page size in case of NAND flash 
                           (equivalent to the minimum input/output
                             unit size by default)

 

4. Detach the ubi device, then format the rootfs into the MTD block and re-attach the UBI

# ubidetach /dev/ubi_ctrl -m 4

# ubiformat /dev/mtd4 -f ./ubi.img 

# ubiattach /dev/ubi_ctrl -m 4

# mount -t ubifs ubi0_0 /mnt

# ls /mnt/

 

=>setenv bootargs ubi.mtd=<MTD_num>  root=ubi0_0 rw rootfstype=ubifs  console=ttyS0,115200

4,023 Views
xiaonanpeng
Contributor II

hi

    This problem  is  urgent , pls    support  asap ,thank  you !

0 Kudos