cancel
Showing results for 
Search instead for 
Did you mean: 

Kernel cannot find the rootfs

alenik-mm
Associate II

Hello,

I have a custom board based on STM32MP151c with an eMMC on it (no SD card). The eMMC is successfully found in the U-Boot and has the following partitioning:

part list mmc 0
 
Partition Map for MMC device 0  --   Partition Type: EFI
 
Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000400      0x000013ff      "ssbl"
        attrs:  0x0000000000000000
        type:   8da63339-0007-60c0-c436-083ac8230908
        guid:   81ae02b5-e823-4dfa-909e-f18021275bd7
  2     0x00001400      0x000213ff      "boot"
        attrs:  0x0000000000000004
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   8691f7b3-c55d-4979-ad45-ab006af4d469
  3     0x00021400      0x000293ff      "vendorfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   c1241248-0452-4a9d-a181-dd26b1b8dc4a
  4     0x00029400      0x001a93ff      "rootfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   e91c4e10-16e6-4c0e-bd0e-77becf4a3582
  5     0x001a9400      0x0075fbff      "userfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   91050ee0-2f8c-4a37-b0b1-54b16dfb2ec8

Before booting, I set the bootargs as following:

setenv bootargs root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rw console=ttySTM0,115200

However, the Kernel cannot find the rootfs partition:

[    3.256832] VFS: Cannot open root device "PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582" or unknown-block(0,0): error -6
[    3.266412] Please append a correct "root=" boot option; here are the available partitions:
[    3.274832] 0100           65536 ram0
[    3.274837]  (driver?)
[    3.280751] 0101           65536 ram1
[    3.280754]  (driver?)
[    3.286888] 0102           65536 ram2
[    3.286892]  (driver?)
[    3.293295] 0103           65536 ram3
[    3.293300]  (driver?)
[    3.299064] 0104           65536 ram4
[    3.299067]  (driver?)
[    3.305204] 0105           65536 ram5
[    3.305207]  (driver?)
[    3.311270] 0106           65536 ram6
[    3.311273]  (driver?)
[    3.317536] 0107           65536 ram7
[    3.317540]  (driver?)
[    3.323516] 0108           65536 ram8
[    3.323520]  (driver?)
[    3.329580] 0109           65536 ram9
[    3.329583]  (driver?)
[    3.335685] 010a           65536 ram10
[    3.335688]  (driver?)
[    3.341873] 010b           65536 ram11
[    3.341876]  (driver?)
[    3.348065] 010c           65536 ram12
[    3.348068]  (driver?)
[    3.354275] 010d           65536 ram13
[    3.354278]  (driver?)
[    3.360443] 010e           65536 ram14
[    3.360446]  (driver?)
[    3.366635] 010f           65536 ram15
[    3.366638]  (driver?)
[    3.372830] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    3.381109] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.56 #1
[    3.387030] Hardware name: STM32 (Device Tree Support)
[    3.392210] [<c011253c>] (unwind_backtrace) from [<c010d780>] (show_stack+0x10/0x14)
[    3.399953] [<c010d780>] (show_stack) from [<c0b14dd4>] (dump_stack+0xb0/0xc4)
[    3.407192] [<c0b14dd4>] (dump_stack) from [<c0125e60>] (panic+0x11c/0x31c)
[    3.414167] [<c0125e60>] (panic) from [<c1001594>] (mount_block_root+0x1cc/0x27c)
[    3.421663] [<c1001594>] (mount_block_root) from [<c10018b0>] (mount_root+0x124/0x148)
[    3.429597] [<c10018b0>] (mount_root) from [<c1001a54>] (prepare_namespace+0x180/0x1c4)
[    3.437622] [<c1001a54>] (prepare_namespace) from [<c0b2c3c8>] (kernel_init+0x8/0x110)
[    3.445557] [<c0b2c3c8>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[    3.453136] Exception stack(0xcf089fb0 to 0xcf089ff8)
[    3.458197] 9fa0:                                     00000000 00000000 00000000 00000000
[    3.466397] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    3.474592] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    3.481232] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

Any ideas on what might be wrong and how to correct it?

Regards,

Aleksandar

1 ACCEPTED SOLUTION

Accepted Solutions
alenik-mm
Associate II

Hello Olivier,

actually, the MMC is not found when the rootfs is to be mounted (racing condition). So rootdelay in the cmd line solved the problem (temporarily).

View solution in original post

5 REPLIES 5
Olivier GALLIEN
ST Employee

Hi @Community member​ ,

Just read your post.

Are you still facing the problem ?

If yes could you share earlier traces from TF-A / uboot during boot ?

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hello,

I cannot access to the ST Community at the moment, so I am sending the earlier traces from TF-A / U-Boot via email:

The traces from TF-A / U-Boot didnt get sent with the E-Mail (dont know why), anyway here they are:

NOTICE:  CPU: STM32MP151CAB Rev.Z
NOTICE:  Model: STMicroelectronics custom STM32CubeMX board
WARNING: VDD unknownINFO:    Reset reason (0x214):
INFO:      IWDG2 Reset (rst_iwdg2)
INFO:    Using EMMC
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  BL2: v2.2-r2.0(debug):v2.2-2-gb5a4f8690-dirty
NOTICE:  BL2: Built : 13:58:09, Dec 15 2020
INFO:    Using crypto library 'stm32_crypto_lib'
INFO:    BL2: Doing platform setup
INFO:    RAM: DDR3-DDR3L 16bits 533000Khz
INFO:    Memory size = 0x10000000 (256 MB)
INFO:    BL2 runs SP_MIN setup
INFO:    BL2: Loading image id 4
INFO:    Loading image id=4 at address 0x2ffeb000
INFO:    Image id=4 loaded: 0x2ffeb000 - 0x2ffff000
INFO:    BL2: Loading image id 5
INFO:    Loading image id=5 at address 0xc0100000
INFO:    STM32 Image size : 881175
INFO:    Image id=5 loaded: 0xc0100000 - 0xc01d7217
WARNING: Skip signature check (header option)
NOTICE:  ROTPK is not deployed on platform. Skipping ROTPK verification.
NOTICE:  BL2: Booting BL32
INFO:    Entry point address = 0x2ffeb000
INFO:    SPSR = 0x1d3
INFO:    Cannot find st,stpmic1 node in DT
NOTICE:  SP_MIN: v2.2-r2.0(debug):v2.2-2-gb5a4f8690-dirty
NOTICE:  SP_MIN: Built : 10:02:04, Dec 17 2020
INFO:    ARM GICv2 driver initialized
INFO:    ETZPC: UART1 (3) could be non secure
INFO:    ETZPC: SPI6 (4) could be non secure
INFO:    ETZPC: I2C4 (5) could be non secure
INFO:    ETZPC: I2C6 (12) could be non secure
INFO:    SP_MIN: Initializing runtime services
INFO:    SP_MIN: Preparing exit to normal world
 
 
U-Boot 2020.01-stm32mp-r2-g9b3e5c18-dirty (Dec 17 2020 - 14:11:55 +0100)
 
CPU: STM32MP151CAB Rev.Z
Model: STMicroelectronics custom STM32CubeMX board
Board: stm32mp1 in trusted mode (st,stm32mp151c-oeswa63)
stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -3)
DRAM:  256 MiB
Clocks:
- MPU : 650 MHz
- MCU : 209 MHz
- AXI : 266.500 MHz
- PER : 0 MHz
- DDR : 533 MHz
WDT:   Started with servicing (32s timeout)
NAND:  0 MiB
MMC:   clk_enable(clk=cddf1d60)
STM32 SD/MMC: 0
Loading Environment from MMC... MMC Device 1 not found
*** Warning - No MMC card found, using default environment
 
In:    serial
Out:   serial
Err:   serial
invalid MAC address in OTP 00:00:00:00:00:00
stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -3)
Net:
Warning: ethernet@5800a000 using MAC address from ROM
eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc1!
Saving Environment to MMC... MMC Device 1 not found
No MMC card found
Failed (1)
MMC Device 1 not found
no mmc device at slot 1
STM32MP> 

Olivier GALLIEN
ST Employee

Hi @Community member​ ,

The eMMC looks to be mounted under mmc 0 , while uboot expect to see it on mmc 1 to boot kernel.

Please check aliases node in uboot dts to remap device correctly.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
alenik-mm
Associate II

Hello Olivier,

actually, the MMC is not found when the rootfs is to be mounted (racing condition). So rootdelay in the cmd line solved the problem (temporarily).