VFS:无法打开根设备“ mmcblk0p2”或未知块179,2:错误-2

问题描述

要做的是在STM32F769I发现板上运行一个运行rootfs的Linux内核。

我使用buildroot为它构建了u-boot,内核和设备树,因为我是嵌入式系统的初学者,这对我来说是艰巨的努力。

我已经设法使其到达内核必须从SD卡挂载rootfs分区的地步,但是它无法做到这一点,因此此处的引导分区已正确设置,甚至可以被内核识别,但是内核仍然会崩溃,无法读取。

SD卡上有两个分区:

mmcblk0p1: vfat
mmcblk0p2: ext3

内核启动日志:

Starting kernel ...

Booting Linux on physical cpu 0x0
Linux version 5.4.61 (zjerina@debian) (gcc version 8.4.0 (buildroot 2020.02.5)) #1 PREEMPT Thu Sep 10 17:22:19 EDT 2020
cpu: ARMv7-M [411fc270] revision 0 (ARMv7M),cr=00000000
cpu: PIPT / VIPT nonaliasing data cache,PIPT instruction cache
OF: fdt: Machine model: STMicroelectronics STM32F769-disCO board
On node 0 totalpages: 4096
  normal zone: 32 pages used for memmap
  normal zone: 0 pages reserved
  normal zone: 4096 pages,LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists,mobility grouping off.  Total pages: 4064
Kernel command line: console=ttySTM0,115200n8 noinitrd root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait rootdelay=60 loglevel=60
Dentry cache hash table entries: 2048 (order: 1,8192 bytes,linear)
Inode-cache hash table entries: 1024 (order: 0,4096 bytes,linear)
mem auto-init: stack:off,heap alloc:off,heap free:off
Memory: 12784K/16384K available (2278K kernel code,170K rwdata,544K rodata,104K init,117K bss,3600K reserved,0K cma-reserved)
SLUB: HWalign=32,Order=0-3,MinObjects=0,cpus=1,Nodes=1
rcu: Preemptible hierarchical RCU implementation.
        Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 16,nr_irqs: 16,preallocated irqs: 16
/soc/interrupt-controller@40013c00: bank0
random: get_random_bytes called from 0xc02ee535 with crng_init=0
clocksource: arm_system_timer: mask: 0xffffff max_cycles: 0xffffff,max_idle_ns: 298634427 ns
ARM System timer initialized as clocksource
sched_clock: 32 bits at 100MHz,resolution 10ns,wraps every 21474836475ns
timer@40000c00: STM32 sched_clock registered
Switching to timer-based delay loop,resolution 10ns
timer@40000c00: STM32 delay timer registered
clocksource: timer@40000c00: mask: 0xffffffff max_cycles: 0xffffffff,max_idle_ns: 19112604467 ns
/soc/timer@40000c00: STM32 clockevent driver initialized (32 bits)
Calibrating delay loop (skipped),value calculated using timer frequency.. 200.00 BogoMIPS (lpj=1000000)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0,linear)
Mountpoint-cache hash table entries: 1024 (order: 0,linear)
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
stm32f769-pinctrl soc:pin-controller: No package detected,use default one
stm32f769-pinctrl soc:pin-controller: GPIOA bank added
stm32f769-pinctrl soc:pin-controller: GPIOB bank added
stm32f769-pinctrl soc:pin-controller: GPIOC bank added
stm32f769-pinctrl soc:pin-controller: GPIOD bank added
stm32f769-pinctrl soc:pin-controller: GPIOE bank added
stm32f769-pinctrl soc:pin-controller: GPIOF bank added
stm32f769-pinctrl soc:pin-controller: GPIOG bank added
stm32f769-pinctrl soc:pin-controller: GPIOH bank added
stm32f769-pinctrl soc:pin-controller: GPIOI bank added
stm32f769-pinctrl soc:pin-controller: GPIOJ bank added
stm32f769-pinctrl soc:pin-controller: GPIOK bank added
stm32f769-pinctrl soc:pin-controller: Pinctrl STM32 initialized
clocksource: Switched to clocksource timer@40000c00
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0,linear)
TCP established hash table entries: 1024 (order: 0,linear)
TCP bind hash table entries: 1024 (order: 0,linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0,linear)
UDP-Lite hash table entries: 256 (order: 0,linear)
NET: Registered protocol family 1
workingset: timestamp_bits=30 max_order=12 bucket_order=0
fuse: init (API version 7.31)
io scheduler mq-deadline registered
io scheduler kyber registered
STM32 USART driver initialized
40011000.serial: ttySTM0 at MMIO 0x40011000 (irq = 35,base_baud = 6250000) is a stm32-usart
printk: console [ttySTM0] enabled
stm32-usart 40011000.serial: rx dma alloc Failed
stm32-usart 40011000.serial: interrupt mode used for rx (no dma)
stm32-usart 40011000.serial: tx dma alloc Failed
stm32-usart 40011000.serial: interrupt mode used for tx (no dma)
libphy: Fixed Mdio Bus: probed
stm32_rtc 40002800.rtc: registered as rtc0
stm32_rtc 40002800.rtc: Date/Time must be initialized
i2c /dev entries driver
stm32f7-i2c 40005400.i2c: can't use DMA
stm32f7-i2c 40005400.i2c: STM32F7 I2C-0 bus adapter
mmci-pl18x 40011c00.sdio2: Got CD GPIO
mmci-pl18x 40011c00.sdio2: mmc0: PL180 manf 80 rev8 at 0x40011c00 irq 36,0 (pio)
mmci-pl18x 40011c00.sdio2: DMA channels RX none,TX none
mmc0: host does not support reading read-only switch,assuming write-enable
mmc0: new SDHC card at address aaaa
input: gpio_keys as /devices/platform/gpio_keys/input/input0
mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
stm32_rtc 40002800.rtc: setting system clock to 2000-01-01T00:38:58 UTC (946687138)
 mmcblk0: p1 p2
Warning: unable to open an initial console.
Waiting 60 sec before mounting root device...
random: fast init done
Failed to create /dev/root: -2
VFS: Cannot open root device "mmcblk0p2" or unkNown-block(179,2): error -2
Please append a correct "root=" boot option; here are the available partitions:
b300         7761920 mmcblk0 
 driver: mmcblk
  b301           51200 mmcblk0p1 d7154cc1-01

  b302         7709696 mmcblk0p2 d7154cc1-02

Kernel panic - not syncing: VFS: Unable to mount root fs on unkNown-block(179,2)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unkNown-block(179,2) ]---

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...