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.

DM8148采用SPI+nandflash启动出错

Other Parts Discussed in Thread: TPS65910

两段uboot和内核放在spiflash中,文件系统放在nandflash中,启动后,出现如下错误:  PS,采用SD卡启动时,可以挂载nandflash中的文件系统,正常运行

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37_DM8127_IPNC_3.80.00 (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Tue Feb 27 23:51:12 PST 2018
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ti8148ipnc
bootconsole [earlycon0] enabled
ti81xx_reserve: ### Reserved DDR region @91d00000
reserved size = 4194304 at 0x0
FB: Reserving 4194304 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8148 3.0
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 71364
Kernel command line: console=ttyO0,115200n8 rootwait root=ubi0_0 ubi.mtd=9,2048 rw rootfstype=ubifs mem=286M ip=10.20.31.186:10.20.31.198:10.20.31.1:255.255.255.0::eth0:off earlyprintk notifyk.vpssm3_sva=0xBFD00000 ddr_mem=1024M noinitrd
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 280MB 1MB = 281MB total
Memory: 279640k/279640k available, 13224k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xd2000000 - 0xf8000000 ( 608 MB)
lowmem : 0xc0000000 - 0xd1e00000 ( 286 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.init : 0xc0008000 - 0xc003e000 ( 216 kB)
.text : 0xc003e000 - 0xc04bf000 (4612 kB)
.data : 0xc04c0000 - 0xc05005c0 ( 258 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:375
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ368
Trying to install interrupt handler for IRQ369
Trying to install interrupt handler for IRQ370
Trying to install interrupt handler for IRQ371
Trying to install interrupt handler for IRQ372
Trying to install interrupt handler for IRQ373
Trying to install interrupt handler for IRQ374
Trying to install type control for IRQ375
Trying to set irq flags for IRQ375
OMAP clockevent source: GPTIMER1 at 20000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 719.25 BogoMIPS (lpj=3596288)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
TI81XX: Map 0x91d00000 to 0xfe500000 for dram barrier
TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
omap_mux_init: Add partition: #1: core, flags: 4
_omap_mux_init_gpio: Could not set gpio79
_omap_mux_init_gpio: Could not set gpio80
Cannot clk_get ck_32
Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now
registered ti81xx_vpss device
registered ti81xx_vidout device
registered ti81xx on-chip HDMI device
registered ti81xx_fb device
PWM0 init success.
PWM1 init success.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
USBSS revision 4ea2080b
registerd cppi-dma Intr @ IRQ 17
Cppi41 Init Done
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
tps65910 1-002d: read from reg 3f failed
tps65910 1-002d: read from reg 1e failed
set_machine_constraints: failed to enable VRTC
tps65910 1-002d: failed to register tps65910-pmic regulator
tps65910-pmic: probe of tps65910-pmic failed with error -121
tps65911-rtc tps65911-rtc: rtc core: registered tps65911-rtc as rtc0
tps65910 1-002d: No interrupt support, no core IRQ
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
musb-hdrc: version 6.0, peripheral, debug=0
musb-hdrc musb-hdrc.0: dma type: dma-cppi41
MUSB controller-0 revision 4ea20800
usb2phy: computed values rxcalib(15)DACs(36 13 14)
usb2phy: override computed values rxcalib(15)DACs(36 13 14)
usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f725b76
musb-hdrc musb-hdrc.0: USB Peripheral mode controller at d201e000 using DMA, IRQ 18
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
PMU: registered new PMU device of type 0
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 546
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
CMEMK module: built on Feb 27 2018 at 23:47:09
Reference Linux version 2.6.37
File /xiuyaa/dm8127_xx/ipnc_3.8/Source/ti_tools/linuxutils_3_23_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
no physical memory specified, continuing with no memory allocation capability...
cmemk initialized
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
console [ttyO0] enabled, bootconsole disabled
console [ttyO0] enabled, bootconsole disabled
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
brd: module loaded
loop: module loaded
omap2-nand driver initializing
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
omap2-nand: detected x16 NAND flash
Creating 8 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000020000 : "U-Boot-min"
0x000000020000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x0000006c0000 : "Kernel"
0x0000006c0000-0x000006fc0000 : "File System"
0x000006fc0000-0x000007bc0000 : "Data"
0x000007bc0000-0x00000b0c0000 : "File System2"
0x00000b0c0000-0x000010000000 : "Reserved"
UBI error: ubi_init: UBI error: cannot initialize UBI, error -19
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
notify_init : notify drivercreated for remote proc id 2 at physical Address 0xbfd00000
cm: Module associated with clock hdmi_i2s_fck didn't enable in 100000 tries
asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
ALSA device list:
#0: TI8148 IPNC
nf_conntrack version 0.5.0 (4369 buckets, 17476 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
Detected MACID=2c:6b:7d:96:12:96
tps65911-rtc tps65911-rtc: hctosys: unable to read the hardware clock

CPSW phy found : id is : 0x4dd074
PHY 0:01 not found
IP-Config: Complete:
device=eth0, addr=10.20.31.186, mask=255.255.255.0, gw=10.20.31.1,
host=10.20.31.186, domain=, nis-domain=(none),
bootserver=10.20.31.198, rootserver=10.20.31.198, rootpath=
VFS: Cannot open root device "ubi0_0" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 128 mtdblock0 (driver?)
1f01 2304 mtdblock1 (driver?)
1f02 128 mtdblock2 (driver?)
1f03 4352 mtdblock3 (driver?)
1f04 107520 mtdblock4 (driver?)
1f05 12288 mtdblock5 (driver?)
1f06 54272 mtdblock6 (driver?)
1f07 81152 mtdblock7 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Backtrace:
[<c004bf70>] (dump_backtrace+0x0/0x110) from [<c038e664>] (dump_stack+0x18/0x1c)
r6:00008000 r5:d1414000 r4:c0501158 r3:60000013
[<c038e64c>] (dump_stack+0x0/0x1c) from [<c038e6c4>] (panic+0x5c/0x178)
[<c038e668>] (panic+0x0/0x178) from [<c0009184>] (mount_block_root+0x1c4/0x204)
r3:00000000 r2:00000000 r1:d142bf78 r0:c0447dd5
r7:c002db7c
[<c0008fc0>] (mount_block_root+0x0/0x204) from [<c000940c>] (prepare_namespace+0x94/0x1cc)
[<c0009378>] (prepare_namespace+0x0/0x1cc) from [<c0008d70>] (kernel_init+0x114/0x154)
r5:c002d144 r4:c002d144
[<c0008c5c>] (kernel_init+0x0/0x154) from [<c00730fc>] (do_exit+0x0/0x5d0)
r5:c0008c5c r4:00000000

看到这个打印:UBI error: ubi_init: UBI error: cannot initialize UBI, error -19

  • 你好,

    请对比一下成功启动时候的uboot参数和现在有问题时候的是否完全一样。
  • 你好,是一样的:具体如下

    spiargs=mmcargs

    mmcargs=setenv bootargs console=ttyO0,115200n8 rootwait root=ubi0_0 ubi.mtd=9,2048 rw rootfstype=ubifs mem=286M ip=10.20.31.186:10.20.31.198:10.20.31.1:255.255.255.0::eth0:off earlyprintk notifyk.vpssm3_sva=0xBFD00000 ddr_mem=1024M noinitrd
    bootcmd=run spiboot

  • 你好,

    请问run spiboot具体执行的是什么操作?

  • 你好,如下是我的环境变量
    TI8148_EVM#pri
    bootdelay=3
    baudrate=115200
    autoload=yes
    verify=yes
    bootfile=uImage
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    console_args=console=ttyO0,115200n8
    optargs=notifyk.vpssm3_sva=0xBF900000 vmalloc=50M ip=dhcp noinitrd
    mmcdev=0
    loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}
    loadbootscript=fatload mmc ${mmcdev} ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    emmcargs=setenv bootargs ${console_args} ${mem_args} root=${emmcroot} ${optargs}
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:256k(u-boot-min),512k(u-boot),256k(env),4m(kernel),640m(filesystem),-(user_data)
    nandroot=ubi0_0 ubi.mtd=9,2048
    nandrootfstype=ubifs
    nanddev=0
    nandbootpart=kernel
    nandargs=setenv bootargs ${console_args} ${mem_args} root=${nandroot} rootfstype=${nandrootfstype} ${optargs}
    nandboot=if nboot ${nandbootpart}; then echo Booting from nand ...; run nandargs; bootm ${loadaddr}; fi;
    rootpath=/export/rootfs
    nfsopts=nolock
    netargs=setenv bootargs ${console_args} ${mem_args} ip=dhcp root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw
    netboot=echo Booting from network ...; run netargs; if mmc rescan ${mmcdev}; then if run loadimage; then bootm ${loadaddr}; fi; fi; if sf probe ${spidev}; then sf read ${loadaddr} ${spibootaddr} ${spibootsize}; bootm ${loadaddr}; fi; fi;
    spidev=0
    spibootaddr=0x100000
    spibootsize=0x400000
    spiboot=if sf probe ${spidev}; then sf read ${loadaddr} ${spibootaddr} ${spibootsize}; run ${spiargs}; bootm ${loadaddr}; fi;
    ethaddr=2c:6b:7d:96:12:96
    ethact=cpsw
    ipaddr=10.20.31.186
    filesize=138B0
    serverip=10.20.31.188
    gatewayip=10.20.31.1
    netmask=255.255.255.0
    mmcroot=/dev/mtdblock10 rw rootwait
    emmcroot=/dev/mtdblock10 rw rootwait
    mmcargs=setenv bootargs console=ttyO0,115200n8 rootwait root=ubi0_0 ubi.mtd=9,2048 rw rootfstype=ubifs mem=286M ip=10.20.31.186:10.20.31.198:10.20.31.1:255.255.255.0::eth0:off earlyprintk notifyk.vpssm3_sva=0xBFD00000 ddr_mem=1024M noinitrd
    bootcmd=run spiboot
    spiargs=mmcargs
    stdin=serial
    stdout=serial
    stderr=serial
    mem_args=mem=256M@0x80000000
  • 你好,

    嵌套比较多。能否尝试手动在uboot输入相关命令(spi启动下)看是否有类似的问题?
  • 你好 ,
    1.dm8148是否是spi和nandflash是排斥的,只能是使用其中一个?
    2.还是报跟之前一样的错误
  • 你好,

    你使用的是自己的DM8148板子么?