树莓派sd卡linux分区,树莓派sd卡上面两个分区,只能挂载sd0,挂载sd1就失败

  • Post author:
  • Post category:linux


系统启动正常,也能识别到两个sd,sd0和sd1如下所示:\ | /

– RT – Thread Operating System

/ | \ 4.0.3 build May 31 2020

2006 – 2020 Copyright by rt-thread team

[32m[I/I2C] I2C bus [i2c0] registered[0m

[32m[I/I2C] I2C bus [i2c1] registered[0m

[15:06:39.181]收←◆[32m[I/SDIO] SD card capacity 31166976 KB.[0m

file system initialization failed!

boot cpu:3

cpu 3 startup.

found part[0], begin: 4194304, size: 256.0MB

found part[1], begin: 272629760, size: 6.580GB

start OK: CPU 3

boot cpu:2

cpu = 0x00000002

cpu 2 startup.

start OK: CPU 2

boot cpu:1

cpu = 0x00000001

cpu 1 startup.

start OK: CPU 1

也能发现两个设备,如下所示:[15:06:48.373]收←◆list_device

device type ref count

——– ——————– ———-

sd1 Block Device 0

sd0 Block Device 1

hdmi Graphic Device 0

rtc RTC 0

spi0.1 SPI Device 0

spi0.0 SPI Device 0

spi0 SPI Bus 0

wdg Miscellaneous Device 0

i2c1 I2C Bus 0

i2c0 I2C Bus 0

gpio Miscellaneous Device 0

timer3 Timer Device 0

timer1 Timer Device 0

uart1 Character Device 2

但是代码里,dfs_mount只能挂载sd0,sd0改成sd1就挂载失败

dfs_mount(“sd0”, “/”, “elm”, 0, 0) 可以

dfs_mount(“sd1”, “/”, “elm”, 0, 0) 失败