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.
大家好,我制作文件系统使用的是arago-base-tisdk-image-am335x-evm.tar.xz,NAND 是256M的MT29F2G08ABAEAWP,将其解压到rootfs/filesystem目录后用如下指令制作:
mk_ubi.sh:
echo "start to create ubi ... ..."
echo "make ubifs.img ... ..."
mkfs.ubifs -r filesystem/ -F -o ubifs.img -m 2048 -e 126976 -c 2047
echo "make ubi.img ... ..."
#ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg
ubinize -o ubi.img -m 2048 -p 128KiB ubinize.cfg
echo "create over!!!"
ubinize.cfg内容如下:
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=200MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
但是制作出来的ubi.img有120MByte,什么原因?是我操作过程不对么?
再有是启动内核在加载ubi的时候出现了如下错误,请问什么原因:
[ 4.419122] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Ca
nnot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[ 4.433129] Please append a correct "root=" boot option; here are the availab
le partitions:
[ 4.442014] 1f00 128 mtdblock0 (driver?)
[ 4.447381] 1f01 128 mtdblock1 (driver?)
[ 4.452740] 1f02 128 mtdblock2 (driver?)
[ 4.458072] 1f03 128 mtdblock3 (driver?)
[ 4.463450] 1f04 256 mtdblock4 (driver?)
[ 4.468782] 1f05 1024 mtdblock5 (driver?)
[ 4.474134] 1f06 128 mtdblock6 (driver?)
[ 4.479493] 1f07 128 mtdblock7 (driver?)
[ 4.484845] 1f08 8192 mtdblock8 (driver?)
[ 4.490192] 1f09 251904 mtdblock9 (driver?)
[ 4.495550] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
wn-block(0,0)
[ 4.504272] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs
on unknown-block(0,0)
完整信息如下:
U-Boot SPL 2016.05-00304-gad06f64-dirty (Apr 14 2017 - 10:56:43)
Set voltage to 9,dpll_mpu_opp100 is 600
Core Clock:1000 MHz,Mpu Clock 600 MHz
Trying to boot from MMC1
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img
U-Boot 2016.05-00304-gad06f64-dirty (Apr 14 2017 - 10:56:43 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x HXDW
Watchdog enabled
DRAM: 256 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env
Net: Could not get PHY for ethernet@4a100000: addr 0
Warning: ethernet@4a100000 MAC addresses don't match:
Address in SROM is 84:eb:18:bd:fd:25
Address in environment is 84:eb:18:bd:a8:9c
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in SROM is de:ad:be:ef:00:01
Address in environment is 84:eb:18:bd:a8:9e
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
Booting from nand(Debug) ...
NAND read: device 0 offset 0x80000, size 0x40000
262144 bytes read: OK
NAND read: device 0 offset 0x200000, size 0x800000
8388608 bytes read: OK
Kernel image @ 0x82000000 [ 0x000000 - 0x34aff8 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ef07000, end 8ef14539 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.32-gadde2ca9f8 (root@hxdw-virtual-machine) (gcc
version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #42 PREEMPT Fri Apr 14 16:00:
42 CST 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio
n cache
[ 0.000000] Machine model: TI AM335x HXDW
[ 0.000000] cma: Reserved 48 MiB at 0x8b800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pag
es: 64960
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw u
bi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 200424K/262144K available (6563K kernel code, 299K rwdata
, 2328K rodata, 256K init, 262K bss, 12568K reserved, 49152K cma-reserved, 0K hi
ghmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc08b7004 (8893 kB)
[ 0.000000] .init : 0xc08b8000 - 0xc08f8000 ( 256 kB)
[ 0.000000] .data : 0xc08f8000 - 0xc0942f30 ( 300 kB)
[ 0.000000] .bss : 0xc0942f30 - 0xc09848d8 ( 263 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrup
ts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000018] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478
484971ns
[ 0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max
_idle_ns: 79635851949 ns
[ 0.000060] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000288] clocksource_probe: no matching clocksources found
[ 0.000505] Console: colour dummy device 80x30
[ 0.000535] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[ 0.118781] pid_max: default: 32768 minimum: 301
[ 0.118939] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.118954] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.119820] Initializing cgroup subsys io
[ 0.119861] Initializing cgroup subsys memory
[ 0.119906] Initializing cgroup subsys devices
[ 0.119926] Initializing cgroup subsys freezer
[ 0.119945] Initializing cgroup subsys perf_event
[ 0.119961] Initializing cgroup subsys pids
[ 0.119994] CPU: Testing write buffer coherency: ok
[ 0.120464] Setting up static identity map for 0x80008200 - 0x80008258
[ 0.123256] devtmpfs: initialized
[ 0.140561] VFP support v0.3: implementor 41 architecture 3 part 30 variant c
rev 3
[ 0.159663] omap_hwmod: debugss: _wait_target_disable failed
[ 0.216998] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma
x_idle_ns: 19112604462750000 ns
[ 0.221893] pinctrl core: initialized pinctrl subsystem
[ 0.223536] NET: Registered protocol family 16
[ 0.226322] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.248790] cpuidle: using governor ladder
[ 0.278774] cpuidle: using governor menu
[ 0.284681] OMAP GPIO hardware version 0.1
[ 0.296020] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_
wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
[ 0.299905] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.339832] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.345552] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wk
up@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 0.345630] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wk
up@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
[ 0.345809] media: Linux media interface: v0.10
[ 0.345889] Linux video capture interface: v2.00
[ 0.345952] pps_core: LinuxPPS API ver. 1 registered
[ 0.345962] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome
tti <giometti@linux.it>
[ 0.345997] PTP clock support registered
[ 0.346066] EDAC MC: Ver: 3.0.0
[ 0.347582] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.348041] Advanced Linux Sound Architecture Driver Initialized.
[ 0.349722] clocksource: Switched to clocksource timer1
[ 0.364032] NET: Registered protocol family 2
[ 0.365019] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.365068] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.365105] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.365205] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.365232] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.365427] NET: Registered protocol family 1
[ 0.365916] RPC: Registered named UNIX socket transport module.
[ 0.365936] RPC: Registered udp transport module.
[ 0.365944] RPC: Registered tcp transport module.
[ 0.365953] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.367124] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counter
s available
[ 0.369959] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.380544] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.381769] NFS: Registering the id_resolver key type
[ 0.381850] Key type id_resolver registered
[ 0.381860] Key type id_legacy registered
[ 0.381967] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.386560] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2
47)
[ 0.386595] io scheduler noop registered
[ 0.386611] io scheduler deadline registered
[ 0.386820] io scheduler cfq registered (default)
[ 0.388668] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.392928] backlight supply power not found, using dummy regulator
[ 0.475385] omap_uart 44e09000.serial: no wakeirq for uart0
[ 0.475688] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud =
3000000) is a OMAP UART0
[ 1.117113] console [ttyO0] enabled
[ 1.121504] omap_uart 48022000.serial: no wakeirq for uart1
[ 1.127582] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 159, base_baud =
3000000) is a OMAP UART1
[ 1.138204] [drm] Initialized drm 1.1.0 20060810
[ 1.146353] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.153486] [drm] No driver support for vblank timestamp query.
[ 1.191409] Console: switching to colour frame buffer device 100x30
[ 1.205590] tilcdc 4830e000.lcdc: fb0: frame buffer device
[ 1.239965] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[ 1.254995] loop: module loaded
[ 1.262046] libphy: Fixed MDIO Bus: probed
[ 1.329768] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.336214] davinci_mdio 4a101000.mdio: detected phy mask fffffff5
[ 1.344291] libphy: 4a101000.mdio: probed
[ 1.348610] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driv
er unknown
[ 1.357154] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driv
er unknown
[ 1.366657] cpsw 4a100000.ethernet: Detected MACID = 84:eb:18:bd:a8:9c
[ 1.373932] cpsw 4a100000.ethernet: cpts: overflow check period 850
[ 1.382962] mousedev: PS/2 mouse device common for all mice
[ 1.389590] i2c /dev entries driver
[ 1.394871] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.403107] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.555978] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.581779] NET: Registered protocol family 10
[ 1.590841] sit: IPv6 over IPv4 tunneling driver
[ 1.596746] NET: Registered protocol family 17
[ 1.620033] Key type dns_resolver registered
[ 1.624842] omap_voltage_late_init: Voltage driver support not added
[ 1.652494] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 1.657941] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 1.670166] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[ 1.676867] nand: Micron MT29F2G08ABAEAWP
[ 1.699735] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB siz
e: 64
[ 1.716570] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[ 1.722323] 10 ofpart partitions found on MTD device 8000000.nand
[ 1.728747] Creating 10 MTD partitions on "8000000.nand":
[ 1.748858] 0x000000000000-0x000000020000 : "NAND.SPL"
[ 1.761681] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[ 1.781305] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[ 1.798089] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[ 1.805717] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
[ 1.821222] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
[ 1.840878] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
[ 1.860539] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
[ 1.868932] 0x000000200000-0x000000a00000 : "NAND.kernel"
[ 1.890935] 0x000000a00000-0x000010000000 : "NAND.file-system"
[ 2.099933] tps65910 0-002d: No interrupt support, no core IRQ
[ 2.119897] tps65910 0-002d: Error in configuring external control EN1
[ 2.136608] tps65910 0-002d: Failed to initialise ext control config
[ 2.150087] vrtc: failed to enable
[ 2.159951] tps65910 0-002d: failed to register tps65910-pmic regulator
[ 2.166958] tps65910-pmic: probe of tps65910-pmic failed with error -121
[ 2.185610] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 2.201962] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[ 2.218201] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 2.260772] ubi0: attaching mtd9
[ 2.264275] start to call ubi_attach
[ 2.279730] In attach.c:Start ubi_attach
[ 2.283931] In attach.c alloc_ai ok
[ 2.287606] In attach.c call scan_all
[ 2.298167] Start call kzalloc
[ 2.309727] Start call ubi_zalloc_vid_hdr
[ 2.313954] Start call scan_peb,start is 0,ubi->peb_count is 1968
[ 3.676125] ubi0: scanning is finished
[ 3.680359] In attach.c call scan_all over
[ 3.693899] ubi0 warning: do_sync_erase: error -5 while erasing PEB 987, retr
y
[ 3.701644] ubi0 warning: do_sync_erase: error -5 while erasing PEB 987, retr
y
[ 3.709352] ubi0 warning: do_sync_erase: error -5 while erasing PEB 987, retr
y
[ 3.717003] ubi0 error: do_sync_erase: cannot erase PEB 987, error -5
[ 3.723852] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.32-gadde2ca9f8 #42
[ 3.731118] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 3.737567] Backtrace:
[ 3.740214] [<c00134e4>] (dump_backtrace) from [<c00136e0>] (show_stack+0x18/
0x1c)
[ 3.748191] r7:00000000 r6:07b60000 r5:cf025000 r4:cf047a44
[ 3.754247] [<c00136c8>] (show_stack) from [<c02a8688>] (dump_stack+0x24/0x28
)
[ 3.761968] [<c02a8664>] (dump_stack) from [<c042d228>] (do_sync_erase+0x1e4/
0x2e4)
[ 3.770112] [<c042d044>] (do_sync_erase) from [<c042d4e0>] (ubi_io_sync_erase
+0x1b8/0x2d8)
[ 3.778824] r10:7fffefff r9:000003db r8:00000000 r7:00000000 r6:000003db r5:
00000000
[ 3.787160] r4:cf025000
[ 3.789861] [<c042d328>] (ubi_io_sync_erase) from [<c042e130>] (__erase_worke
r+0xa8/0x7d8)
[ 3.798571] r9:000003db r8:00000000 r7:00000000 r6:cf503e00 r5:cf02e018 r4:c
f025000
[ 3.806814] [<c042e088>] (__erase_worker) from [<c042e880>] (erase_worker+0x2
0/0x6c)
[ 3.814992] r10:7fffefff r9:cf505800 r8:00000000 r7:ffffe000 r6:cf025ce4 r5:
cf5127c0
[ 3.823323] r4:cf025000
[ 3.826001] [<c042e860>] (erase_worker) from [<c042db84>] (do_work+0xcc/0x164
)
[ 3.833653] r7:ffffe000 r6:cf025ce4 r5:cf025000 r4:cf5127c0
[ 3.839651] [<c042dab8>] (do_work) from [<c04302a8>] (ubi_wl_get_peb+0x94/0x2
cc)
[ 3.847462] r7:ffffe000 r6:cf025c38 r5:cf025000 r4:cf046000
[ 3.853503] [<c0430214>] (ubi_wl_get_peb) from [<c042a664>] (ubi_eba_atomic_l
eb_change+0x154/0x37c)
[ 3.863054] r7:cf02540c r6:cf503c00 r5:d08f0000 r4:cf025000
[ 3.869078] [<c042a510>] (ubi_eba_atomic_leb_change) from [<c0421a1c>] (ubi_u
pdate_layout_vol+0x44/0x5c)
[ 3.879089] r10:00000110 r9:00000000 r8:cf582000 r7:00000000 r6:cf505800 r5:
00000001
[ 3.887412] r4:cf025000
[ 3.890111] [<c04219d8>] (ubi_update_layout_vol) from [<c0421fe4>] (ubi_chang
e_vtbl_record+0x64/0xf0)
[ 3.899869] r6:00000000 r5:cf047c74 r4:cf025000
[ 3.904759] [<c0421f80>] (ubi_change_vtbl_record) from [<c0423f60>] (ubi_resi
ze_volume+0x228/0x4e8)
[ 3.914335] r7:00000000 r6:cf025000 r5:00000784 r4:cf505400
[ 3.920354] [<c0423d38>] (ubi_resize_volume) from [<c05159f8>] (autoresize+0x
d4/0x130)
[ 3.928699] r10:00000800 r9:00000840 r8:00000674 r7:cf505400 r6:00000000 r5:
00000000
[ 3.937023] r4:cf025000
[ 3.939703] [<c0515924>] (autoresize) from [<c0425d00>] (ubi_attach_mtd_dev+0
x66c/0xc00)
[ 3.948275] r8:cf504400 r7:cf025000 r6:00000000 r5:cf504400 r4:00000000
[ 3.955408] [<c0425694>] (ubi_attach_mtd_dev) from [<c08dad44>] (ubi_init+0x1
e4/0x26c)
[ 3.963816] r10:fffff000 r9:c0849198 r8:c08491c4 r7:c08f1688 r6:c08f168c r5:
cf504400
[ 3.972122] r4:00000000
[ 3.974803] [<c08dab60>] (ubi_init) from [<c00096bc>] (do_one_initcall+0x98/0
x1e4)
[ 3.982827] r10:00000000 r9:c08b8600 r8:000000a2 r7:cf512780 r6:c08fcca0 r5:
c08dab60
[ 3.991133] r4:c08fcca0
[ 3.993822] [<c0009624>] (do_one_initcall) from [<c08b8e80>] (kernel_init_fre
eable+0x138/0x1cc)
[ 4.003041] r10:00000008 r9:c08b8600 r8:000000a2 r7:c08eb834 r6:c08f7e2c r5:
c0942f40
[ 4.011371] r4:c0942f40
[ 4.014062] [<c08b8d48>] (kernel_init_freeable) from [<c066b464>] (kernel_ini
t+0x18/0xf4)
[ 4.022701] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:
c066b44c
[ 4.031032] r4:c0942f40
[ 4.033713] [<c066b44c>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/
0x3c)
[ 4.041707] r5:c066b44c r4:00000000
[ 4.045518] ubi0 error: __erase_worker: failed to erase PEB 987, error -5
[ 4.052695] ubi0: mark PEB 987 as bad
[ 4.056629] ubi0 error: ubi_io_mark_bad: cannot mark PEB 987 bad, error -30
[ 4.064019] ubi0 warning: ubi_ro_mode: switch to read-only mode
[ 4.070281] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.32-gadde2ca9f8 #42
[ 4.077553] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 4.083992] Backtrace:
[ 4.086587] [<c00134e4>] (dump_backtrace) from [<c00136e0>] (show_stack+0x18/
0x1c)
[ 4.094609] r7:fffffffb r6:00000000 r5:cf02e018 r4:cf025000
[ 4.100625] [<c00136c8>] (show_stack) from [<c02a8688>] (dump_stack+0x24/0x28
)
[ 4.108274] [<c02a8664>] (dump_stack) from [<c042e4d0>] (__erase_worker+0x448
/0x7d8)
[ 4.116465] [<c042e088>] (__erase_worker) from [<c042e880>] (erase_worker+0x2
0/0x6c)
[ 4.124666] r10:7fffefff r9:cf505800 r8:00000000 r7:ffffe000 r6:cf025ce4 r5:
cf5127c0
[ 4.132971] r4:cf025000
[ 4.135651] [<c042e860>] (erase_worker) from [<c042db84>] (do_work+0xcc/0x164
)
[ 4.143304] r7:ffffe000 r6:cf025ce4 r5:cf025000 r4:cf5127c0
[ 4.149300] [<c042dab8>] (do_work) from [<c04302a8>] (ubi_wl_get_peb+0x94/0x2
cc)
[ 4.157137] r7:ffffe000 r6:cf025c38 r5:cf025000 r4:cf046000
[ 4.163191] [<c0430214>] (ubi_wl_get_peb) from [<c042a664>] (ubi_eba_atomic_l
eb_change+0x154/0x37c)
[ 4.172771] r7:cf02540c r6:cf503c00 r5:d08f0000 r4:cf025000
[ 4.178767] [<c042a510>] (ubi_eba_atomic_leb_change) from [<c0421a1c>] (ubi_u
pdate_layout_vol+0x44/0x5c)
[ 4.188801] r10:00000110 r9:00000000 r8:cf582000 r7:00000000 r6:cf505800 r5:
00000001
[ 4.197100] r4:cf025000
[ 4.199796] [<c04219d8>] (ubi_update_layout_vol) from [<c0421fe4>] (ubi_chang
e_vtbl_record+0x64/0xf0)
[ 4.209538] r6:00000000 r5:cf047c74 r4:cf025000
[ 4.214447] [<c0421f80>] (ubi_change_vtbl_record) from [<c0423f60>] (ubi_resi
ze_volume+0x228/0x4e8)
[ 4.224019] r7:00000000 r6:cf025000 r5:00000784 r4:cf505400
[ 4.230033] [<c0423d38>] (ubi_resize_volume) from [<c05159f8>] (autoresize+0x
d4/0x130)
[ 4.238401] r10:00000800 r9:00000840 r8:00000674 r7:cf505400 r6:00000000 r5:
00000000
[ 4.246704] r4:cf025000
[ 4.249382] [<c0515924>] (autoresize) from [<c0425d00>] (ubi_attach_mtd_dev+0
x66c/0xc00)
[ 4.257952] r8:cf504400 r7:cf025000 r6:00000000 r5:cf504400 r4:00000000
[ 4.265073] [<c0425694>] (ubi_attach_mtd_dev) from [<c08dad44>] (ubi_init+0x1
e4/0x26c)
[ 4.273462] r10:fffff000 r9:c0849198 r8:c08491c4 r7:c08f1688 r6:c08f168c r5:
cf504400
[ 4.281765] r4:00000000
[ 4.284445] [<c08dab60>] (ubi_init) from [<c00096bc>] (do_one_initcall+0x98/0
x1e4)
[ 4.292462] r10:00000000 r9:c08b8600 r8:000000a2 r7:cf512780 r6:c08fcca0 r5:
c08dab60
[ 4.300764] r4:c08fcca0
[ 4.303474] [<c0009624>] (do_one_initcall) from [<c08b8e80>] (kernel_init_fre
eable+0x138/0x1cc)
[ 4.312661] r10:00000008 r9:c08b8600 r8:000000a2 r7:c08eb834 r6:c08f7e2c r5:
c0942f40
[ 4.320990] r4:c0942f40
[ 4.323673] [<c08b8d48>] (kernel_init_freeable) from [<c066b464>] (kernel_ini
t+0x18/0xf4)
[ 4.332308] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:
c066b44c
[ 4.340638] r4:c0942f40
[ 4.343319] [<c066b44c>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/
0x3c)
[ 4.351336] r5:c066b44c r4:00000000
[ 4.355117] ubi0 error: do_work: work failed with error code -30
[ 4.361503] ubi0 error: autoresize: cannot auto-resize volume 0
[ 4.369134] UBI error: cannot attach mtd9
[ 4.374678] input: volume_keys@0 as /devices/platform/volume_keys@0/input/inp
ut0
[ 4.384012] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 4.389630] hctosys: unable to open rtc device (rtc0)
[ 4.399998] vbat: disabling
[ 4.402974] lis3_reg: disabling
[ 4.406286] wlan-en-regulator: disabling
[ 4.411281] ALSA device list:
[ 4.414422] No soundcards found.
[ 4.419122] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19VFS: Ca
nnot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[ 4.433129] Please append a correct "root=" boot option; here are the availab
le partitions:
[ 4.442014] 1f00 128 mtdblock0 (driver?)
[ 4.447381] 1f01 128 mtdblock1 (driver?)
[ 4.452740] 1f02 128 mtdblock2 (driver?)
[ 4.458072] 1f03 128 mtdblock3 (driver?)
[ 4.463450] 1f04 256 mtdblock4 (driver?)
[ 4.468782] 1f05 1024 mtdblock5 (driver?)
[ 4.474134] 1f06 128 mtdblock6 (driver?)
[ 4.479493] 1f07 128 mtdblock7 (driver?)
[ 4.484845] 1f08 8192 mtdblock8 (driver?)
[ 4.490192] 1f09 251904 mtdblock9 (driver?)
[ 4.495550] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
wn-block(0,0)
[ 4.504272] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs
on unknown-block(0,0)
周工你好,基本上是按照你的这个文档http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/59921.aspx做的,因为之前在其他版本(SDK-01.00.03)上也做过,貌似都能正常挂载,现在在SDK-03.02.05上重新做好像就不行了,我UBoot按照你的文档增加了宏定义,内核也按照你的文档配置了对UBI的支持(am335x_evm_defconfig默认就支持的)!设备树文件或者内核是否还需要进行其他配置?
我的uboot环境变量如下:
=> pr
arch=arm
args_fit=setenv bootargs console=${console}
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUI
D=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am335x_hxdw
?=?郂hs壣oc堺 齯霹tL
?=?郂hs壣oc堺 齯
?=?郂hs壣oc堺 齯
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefi
x}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ef
i/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${f
dt_addr_r};elsebootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr}
${prefix}extlinux/extlinux.conf
boot_fdt=try
boot_fit=0
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp
bootcmd=run nandbootdebug
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp};
then source ${scriptaddr}; fi
bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_nand=run nandboot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcount=1
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x1
00;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw
raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uE
nv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.bac
kup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part
0 9
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdi
sk ram 0x81000000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmc
dev};if run loadbootscript; then run bootscript;else if run loadbootenv; then ec
ho Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then
echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
eth1addr=84:eb:18:bd:a8:9e
ethaddr=84:eb:18:bd:a8:9c
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=8ef15ed8
fdtfile=undefined
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi;
if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; i
f test $board_name = BBG1; then setenv fdtfile am335x-bonegreen.dtb; fi; if test
$board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_
name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $board_name =
A335_ICE; then setenv fdtfile am335x-icev2.dtb; fi; if test $board_name = AM335
X_HXDW; then setenv fdtfile am335x-hxdw.dtb; fi; if test $fdtfile = undefined; t
hen echo WARNING: Could not determine device tree to use; fi;
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage.itb
fit_loadaddr=0x88000000
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${
loadaddr} ${filesize}
init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;
else setenv console ttyO0,115200n8;fi;
kernel_addr_r=0x82000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix
}${efi_fdtfile}
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_fit; bootm ${loadaddr}#${fdtfile};
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_pa
rt; fi
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc r
escan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test
${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
mmcbootdebug=run nandargs_debug;load mmc 0 ${fdtaddr} ${fdtfile};load mmc 0 ${lo
adaddr} zImage;bootz ${loadaddr} - ${fdtaddr};
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; the
n if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt}
= try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.bac
kup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.
u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfsty
pe=${nandrootfstype}
nandargs_debug=setenv bootargs console=${console} ${optargs} root=${nandroot} ro
otfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-b
oot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
nandbootdebug=echo Booting from nand(Debug) ...; run nandargs_debug; nand read $
{fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadadd
r} - ${fdtaddr}
nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${se
rverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimag
e; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_
gpt_rootfs}
pxefile_addr_r=0x80100000
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype
=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr}
${fdtaddr}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/export/rootfs
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for
prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scrip
ts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env ex
ists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fs
type ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_b
oot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "$
{soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix i
n ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${p
refix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${dev
num}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable medi
a binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: contin
uing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefi
x}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run b
oot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${d
evnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${pr
efix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80000000
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype
=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read
${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial@44e09000
stdin=serial@44e09000
stdout=serial@44e09000
ubifs_boot=if ubi part UBI && ubifsmount ubi${devnum}:boot; then setenv devtype
ubi; setenv bootpart 0; run scan_dev_for_boot; fi
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
updateall= run findfdt; nand erase.chip;mmc rescan; fatload mmc 0 81000000 MLO_n
and; cp.b 0x81000000 0x81020000 20000; cp.b 0x81000000 0x81040000 20000; cp.b 0x
81000000 0x81060000 20000; fatload mmc 0 0x81080000 ${fdtfile}; fatload mmc 0 0x
810C0000 u-boot_nand.img; nand write 0x81000000 0x0 200000;fatload mmc 0 0x81000
000 zImage; nand write 0x81000000 0x200000 ${filesize}; fatload mmc 0 0x81000000
ubi.img; nand write 0x81000000 0xA00000 ${filesize}; saveenv; echo ************
************************************* ; echo *-----UpdateSystem and Filesystem C
ompleted!----* ; echo *-Please Remove TF/SD Card, Power Off, Power On-* ;
updatesys= run findfdt; nand erase 0x0 0xA00000;mmc rescan; fatload mmc 0 810000
00 MLO_nand; cp.b 0x81000000 0x81020000 20000; cp.b 0x81000000 0x81040000 20000;
cp.b 0x81000000 0x81060000 20000; fatload mmc 0 0x81080000 ${fdtfile}; fatload
mmc 0 0x810C0000 u-boot_nand.img; nand write 0x81000000 0x0 200000;fatload mmc 0
0x81000000 zImage; nand write 0x81000000 0x200000 ${filesize}; saveenv; echo **
*********************************************** ; echo *------------UpdateSystem
Completed!------------* ; echo *-Please Remove TF/SD Card, Power Off, Power On-
* ; echo ************************************************* ;
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_
for_boot_part; fi
usbnet_devaddr=de:ad:be:ef:00:01
vendor=ti
ver=U-Boot 2016.05-00304-gad06f64-dirty (Apr 14 2017 - 16:57:16 +0800)
Environment size: 10422/131068 bytes
=>
终于搞定了,原来是dts文件有几个pin_mux配置不对!但是文件系统怎么缩小呢?
你的文件系统本身有多大,就是用于做ubifs的源文件系统。