cancel
Showing results for 
Search instead for 
Did you mean: 

Why did the linux kernel boot stop at mmc0?

DMårt
Senior III

I have compiled tf-a, optee, kernel and u-boot inside STM32CubeIDE.

I have copy over the uImage from the linux build/arch/arm/boot/ and the .dtb file as well. They have been copied over to st-image-bootfs-openstlinux-weston-stm32mp1.ext4 file. I'm only changing the st-image-bootfs-openstlinux-weston-stm32mp1.ext4 file from the Starter Package form STM32MP1 series. The rest e.g st-image-weston-openstlinux-weston-stm32mp1.ext4, st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 and st-image-userfs-openstlinux-weston-stm32mp1.ext4 are not changed.

The kernel is booting, no problem there. But the login promt does not appear. It seems that I got no errors at all, when I look at the full log. My thoughts is that what if bootfs not booting up the software such as command prompt?

The last snippet of the kernel boot log from UART4.

 

 

D/TC:0   pwr_scv_handler:56 PWR service: set 0x40000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: set 0x10000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: clear 0x10000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: clear 0x40000000 at offset 0xc
[    4.151879] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[    4.164077] [drm] Initialized stm 1.0.0 20170330 for 5a001000.display-controller on minor 0
[    4.172909] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[    4.179380] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
D/TC:0   pwr_scv_handler:56 PWR service: set 0x40000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: set 0x10000000 at offset 0xc
[    4.202023] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
D/TC:0   pwr_scv_handler:56 PWR service: clear 0x10000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: clear 0x40000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: set 0x40000000 at offset 0xc
D/TC:0   pwr_scv_handler:56 PWR service: set 0x10000000 at offset 0xc
[    4.241950] ohci-platform 5800c000.usb: Generic Platform OHCI controller
[    4.247661] ohci-platform 5800c000.usb: new USB bus registered, assigned bus number 1
[    4.255209] ehci-platform 5800d000.usb: EHCI Host Controller
[    4.260801] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 2
[    4.269000] ohci-platform 5800c000.usb: irq 53, io mem 0x5800c000
[    4.275225] ehci-platform 5800d000.usb: irq 52, io mem 0x5800d000
[    4.287751] mmc0: new DDR MMC card at address 0001
[    4.292389] mmcblk0: mmc0:0001 008GB0 7.28 GiB 
[    4.304665] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00
[    4.310916] hub 2-0:1.0: USB hub found
[    4.313642] hub 2-0:1.0: 2 ports detected
[    4.317706]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9
[    4.327652] mmcblk0boot0: mmc0:0001 008GB0 4.00 MiB 
[    4.333975] mmcblk0boot1: mmc0:0001 008GB0 4.00 MiB 
[    4.340047] mmcblk0rpmb: mmc0:0001 008GB0 4.00 MiB, chardev (244:0)
[    4.350948] hub 1-0:1.0: USB hub found
[    4.353356] hub 1-0:1.0: 2 ports detected

 

 

 

 

 

This is my FlasLayout for flashing the eMMC.

 

 

 

 

#Opt	Id	Name	Type	IP	Offset	Binary
-	0x01	fsbl-boot	Binary	none	0x0	arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-usb.stm32
-	0x03	fip-boot	FIP	none	0x0	fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
P	0x04	fsbl1	Binary	mmc0	boot1	arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P	0x05	fsbl2	Binary	mmc0	boot2	arm-trusted-firmware/tf-a-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.stm32
P	0x06	metadata1	FWU_MDATA	mmc0	0x00080000	arm-trusted-firmware/metadata.bin
P	0x07	metadata2	FWU_MDATA	mmc0	0x00100000	arm-trusted-firmware/metadata.bin
P	0x08	fip-a	FIP	mmc0	0x00180000	fip/fip-stm32mp151a-stm32-computer-firmware-mx-optee-emmc.bin
PED	0x09	fip-b	FIP	mmc0	0x00580000	none
PED	0x0A	u-boot-env	ENV	mmc0	0x00980000	none
P	0x10	bootfs	System	mmc0	0x00A00000	st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P	0x11	vendorfs	FileSystem	mmc0	0x04A00000	st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P	0x12	rootfs	FileSystem	mmc0	0x05A00000	st-image-weston-openstlinux-weston-stm32mp1.ext4
P	0x13	userfs	FileSystem	mmc0	0x33A00000	st-image-userfs-openstlinux-weston-stm32mp1.ext4

 

 

 

 

 

Promt from U-boot

 

 

 

STM32MP> mmc part

Partition Map for MMC device 0  --   Partition Type: EFI

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000400	0x000007ff	"metadata1"
	attrs:	0x0000000000000000
	type:	8a7a84a0-8387-40f6-ab41-a8b9a5a60d23
		(8a7a84a0-8387-40f6-ab41-a8b9a5a60d23)
	guid:	df1c26fd-a193-41e9-bb1d-ceb52b8f49ba
  2	0x00000800	0x00000bff	"metadata2"
	attrs:	0x0000000000000000
	type:	8a7a84a0-8387-40f6-ab41-a8b9a5a60d23
		(8a7a84a0-8387-40f6-ab41-a8b9a5a60d23)
	guid:	bd11de64-e9bb-457b-9d4a-b75987fe62ae
  3	0x00000c00	0x00002bff	"fip-a"
	attrs:	0x0000000000000000
	type:	19d5df83-11b0-457b-be2c-7559c13142a5
		(19d5df83-11b0-457b-be2c-7559c13142a5)
	guid:	4fd84c93-54ef-463f-a7ef-ae25ff887087
  4	0x00002c00	0x00004bff	"fip-b"
	attrs:	0x0000000000000000
	type:	19d5df83-11b0-457b-be2c-7559c13142a5
		(19d5df83-11b0-457b-be2c-7559c13142a5)
	guid:	09c54952-d5bf-45af-acee-335303766fb3
  5	0x00004c00	0x00004fff	"u-boot-env"
	attrs:	0x0000000000000000
	type:	3de21764-95bd-54bd-a5c3-4abe786f38a8
		(u-boot-env)
	guid:	1c380e98-da64-4fbe-88b4-a516167ea0a7
  6	0x00005000	0x00024fff	"bootfs"
	attrs:	0x0000000000000004
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	ab4be8bf-456c-4365-98cb-c21f48e19c92
  7	0x00025000	0x0002cfff	"vendorfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	8d2075a7-dfa6-446f-8852-c89e0819a204
  8	0x0002d000	0x0019cfff	"rootfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	e91c4e10-16e6-4c0e-bd0e-77becf4a3582
  9	0x0019d000	0x00e8fbff	"userfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	5ff28c0a-bc5f-4c0c-b116-a87c0221a7b2
STM32MP> 

 

 

 

 

So what should it stand here? I have tried mmcblk0p8 (the rootfs partition) without success.

 

 

 

# Generic Distro Configuration file generated by OpenEmbedded
MENU BACKGROUND /splash_landscape.bmp
TIMEOUT 20
LABEL OpenSTLinux
	KERNEL /uImage
	FDTDIR /
	INITRD /st-image-resize-initrd
	APPEND root=/dev/<what should it be here?> rootwait rw   console=${console},${baudrate} loglevel=7

 

 

 

 

Update:

It seems that the U-boot can read the eMMC very properly without any issues.

 

 

STM32MP> ext4ls mmc 0:8 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<DIR>       4096 lib
<DIR>       4096 media
<DIR>       4096 mnt
<DIR>       4096 proc
<DIR>       4096 run
<DIR>       4096 sbin
<DIR>       4096 srv
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<DIR>       4096 var
<DIR>       4096 vendor


STM32MP> mmc part

Partition Map for MMC device 0  --   Partition Type: EFI

Part	Start LBA	End LBA		Name
	Attributes
	Type GUID
	Partition GUID
  1	0x00000400	0x000007ff	"metadata1"
	attrs:	0x0000000000000000
	type:	8a7a84a0-8387-40f6-ab41-a8b9a5a60d23
		(8a7a84a0-8387-40f6-ab41-a8b9a5a60d23)
	guid:	7c9ee4f6-c9b1-4ec0-b2c4-84d8db334642
  2	0x00000800	0x00000bff	"metadata2"
	attrs:	0x0000000000000000
	type:	8a7a84a0-8387-40f6-ab41-a8b9a5a60d23
		(8a7a84a0-8387-40f6-ab41-a8b9a5a60d23)
	guid:	397e6b52-0f5d-4488-ad25-3273e24a6cc4
  3	0x00000c00	0x00002bff	"fip-a"
	attrs:	0x0000000000000000
	type:	19d5df83-11b0-457b-be2c-7559c13142a5
		(19d5df83-11b0-457b-be2c-7559c13142a5)
	guid:	4fd84c93-54ef-463f-a7ef-ae25ff887087
  4	0x00002c00	0x00004bff	"fip-b"
	attrs:	0x0000000000000000
	type:	19d5df83-11b0-457b-be2c-7559c13142a5
		(19d5df83-11b0-457b-be2c-7559c13142a5)
	guid:	09c54952-d5bf-45af-acee-335303766fb3
  5	0x00004c00	0x00004fff	"u-boot-env"
	attrs:	0x0000000000000000
	type:	3de21764-95bd-54bd-a5c3-4abe786f38a8
		(u-boot-env)
	guid:	70a63b54-4a77-433e-bffc-e9454419b234
  6	0x00005000	0x00024fff	"bootfs"
	attrs:	0x0000000000000004
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	645715cb-9814-455e-933c-9b7633de2b31
  7	0x00025000	0x0002cfff	"vendorfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	ee245663-6b56-4d5e-b3c6-797aec6a4f15
  8	0x0002d000	0x0019cfff	"rootfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	e91c4e10-16e6-4c0e-bd0e-77becf4a3582
  9	0x0019d000	0x00e8fbff	"userfs"
	attrs:	0x0000000000000000
	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
		(linux)
	guid:	b9f750e0-aab5-422a-b9b0-1ee0d9f430f6
	
	
STM32MP> mmc info
Device: STM32 SD/MMC
Manufacturer ID: 11
OEM: 0
Name: 008GB0 
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected


STM32MP> ext4ls mmc 0:8 /sbin
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 .debug
           42992 agetty
<SYM>         19 arp
           18072 badblocks
<SYM>         22 blkid
           71844 blkid.util-linux
<SYM>         25 blockdev
           42896 blockdev.util-linux
           91156 bridge
           68208 cfdisk
            3581 check-gpu
           22252 ctrlaltdel
          137980 debugfs
<SYM>         17 depmod
<SYM>         11 depmod.kmod
           22308 dumpe2fs
            9780 e2freefrag
          232568 e2fsck
          232568 fsck.ext2
          232568 fsck.ext3
          232568 fsck.ext4
           38864 e2image
           22308 e2mmpstatus
           13928 e2undo
           13908 e4crypt
           22136 e4defrag
<SYM>         22 fdisk
           97000 fdisk.util-linux
           13840 filefrag
<SYM>         21 fsck
           34768 fsck.util-linux
<SYM>         23 fstrim
           43020 fstrim.util-linux
<SYM>         12 getty
<SYM>         14 halt
<SYM>         19 hdparm
           92924 hdparm.hdparm
<SYM>         24 hwclock
           51164 hwclock.util-linux
<SYM>         19 ifconfig
<SYM>         19 ifdown
<SYM>         19 ifup
<SYM>         22 init
<SYM>         17 insmod
<SYM>         11 insmod.kmod
<SYM>         17 ip
          454560 ip.iproute2
<SYM>         19 klogd
          489044 ldconfig
<SYM>         19 loadkmap
<SYM>         19 logread
            9756 logsave
<SYM>         24 losetup
           67668 losetup.util-linux
<SYM>         15 lsmod
<SYM>         19 mdev
<SYM>         22 mke2fs
           96760 mke2fs.e2fsprogs
           96760 mkfs.ext2.e2fsprogs
           96760 mkfs.ext3
           96760 mkfs.ext4
<SYM>         25 mkfs.ext2
            5612 mklost+found
<SYM>         23 mkswap
           67612 mkswap.util-linux
<SYM>         18 modinfo
<SYM>         11 modinfo.kmod
<SYM>         19 modprobe
<SYM>         11 modprobe.kmod
            2387 mount-copybind
            4304 mount-partitions.sh
<SYM>         20 nologin
            5580 nologin.shadow
            9808 nologin.util-linux
<SYM>         27 pivot_root
            9740 pivot_root.util-linux
            2460 populate-extfs.sh
<SYM>         14 poweroff
<SYM>         14 reboot
            3238 resize-helper
           47136 resize2fs
<SYM>         21 resolvconf
<SYM>         16 rmmod
<SYM>         11 rmmod.kmod
<SYM>         19 route
           66500 rtmon
<SYM>         14 runlevel
<SYM>         19 setconsole
<SYM>         14 shutdown
             484 shutdown-stm32mp1-m4.sh
            2080 st-m4firmware-load-default.sh
            4364 stm32_usbotg_eth_config.sh
             261 stm32mp-coredump-sysfs.sh
<SYM>         24 sulogin
           34704 sulogin.util-linux
<SYM>         24 swapoff
           13964 swapoff.util-linux
<SYM>         23 swapon
           34700 swapon.util-linux
<SYM>         28 switch_root
            9804 switch_root.util-linux
<SYM>         19 sysctl
           18044 sysctl.procps
<SYM>         19 syslogd
<SYM>         16 telinit
<SYM>         12 udevadm
<SYM>         26 udevd
<SYM>         19 udhcpc
            4260 userfs-cleanup-package.sh
<SYM>         17 vigr
<SYM>         11 vigr.shadow
<SYM>         17 vipw
           35768 vipw.shadow
<SYM>         19 watchdog
STM32MP> 

 

 

0 REPLIES 0