STM32MP157D-DK1 - Unrecognized Filesystem Type

I’m working on getting an STM32MP157D-DK1 to boot from a custom (Yocto generated) Linux image. I followed the instructions here (Yocto: Getting Started with the STM32MP157) to generate an image.

I’m trying to use the basic boot chain to avoid TF-A (for now). So, I formatted an SD card with the following (using fdisk):

Disk /dev/mmcblk2: 7.29 GiB, 7822376960 bytes, 15278080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A1B93A60-F8E0-CB47-88F9-E559CD43B510

Device      	Start  	End  Sectors  Size Type
/dev/mmcblk2p1   2048 	2559  	512  256K Microsoft basic data
/dev/mmcblk2p2   4096 	4607  	512  256K Microsoft basic data
/dev/mmcblk2p3   6144	10239 	4096	2M Microsoft basic data
/dev/mmcblk2p4  10240   141311   131072   64M Linux filesystem
/dev/mmcblk2p5 141312 15278046 15136735  7.2G Linux filesystem

I copied the following image files to each of the partitions (from tmp/deploy/images/stm32mp1):

sudo dd if=u-boot/basic_stm32mp15/u-boot-spl.stm32-stm32mp157d-dk1-basic of=/dev/mmcblk2p1
sudo dd if=u-boot/basic_stm32mp15/u-boot-spl.stm32-stm32mp157d-dk1-basic of=/dev/mmcblk2p2
sudo dd if=u-boot/basic_stm32mp15/u-boot-stm32mp157d-dk1-basic.img of=/dev/mmcblk2p3
sudo dd if=st-image-bootfs-poky-stm32mp1.ext4 of=/dev/mmcblk2p4 bs=1M
sudo dd if=core-image-minimal-stm32mp1.ext4 of=/dev/mmcblk2p5 bs=1M

When I plug in the SD card, and try to boot the board, here’s the output of U-Boot SPL and U-Boot:

U-Boot SPL 2020.10-stm32mp-r1 (Oct 05 2020 - 15:15:32 +0000)
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
RAM: DDR3-DDR3L 16bits 533000kHz
WDT:   Started with servicing (32s timeout)
Trying to boot from MMC1


U-Boot 2020.10-stm32mp-r1 (Oct 05 2020 - 15:15:32 +0000)

CPU: STM32MP157DAC Rev.Z
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
Board: stm32mp1 in basic mode (st,stm32mp157d-dk1)
Board: MB1272 Var3.0 Rev.C-02
DRAM:  512 MiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT:   Started with servicing (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0
Loading Environment from MMC... OK
In:	serial
Out:   serial
Err:   serial
****************************************************
*    	WARNING 500mA power supply detected   	*
* 	Current too low, use a 3A power supply!  	*
****************************************************

Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
** Unrecognized filesystem type **
STM32MP>

@RobertCNelson mentions that I need to set Legacy BIOS partition in this guide (Debian: Getting Started with the STM32MP157), but I’m a bit confused as to what that does. I didn’t think GPT layout requires boot flags like MBR does–unless I’m not understanding something about the STM32MP1 boot process.

Edit: I tried making partition 5 (rootfs) bootable as per Robert’s suggestion in the link above with the following:

sudo fdisk /dev/mmcblk2
> x
> A
> 5
> r
> w

The error no longer appears, but I get the following (the boot process just stops and gives me a U-Boot prompt):

...
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:5...
STM32MP> 

I was able to get it to get past that point by disabling the legacy BIOS bootable flag on partition 5 (rootfs) and enabling it on partition 4 (bootfs). It seems that U-Boot was looking for its own filesystem (and associated scripts/device trees) rather than rootfs.

Now I’m stuck at the next section: “Starting kernel…”

It hangs at this line and then reboots after about a minute. Does anyone have any clues for this one?

[...]
Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /mmc0_extlinux/extlinux.conf
Retrieving file: /mmc0_extlinux/extlinux.conf
239 bytes read in 31 ms (6.8 KiB/s)
Retrieving file: /splash.bmp
7802 bytes read in 31 ms (245.1 KiB/s)
1:    OpenSTLinux
Retrieving file: /uImage
7175784 bytes read in 339 ms (20.2 MiB/s)
append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
Retrieving file: /stm32mp157d-dk1.dtb
114161 bytes read in 36 ms (3 MiB/s)
## Booting kernel from Legacy Image at c2000000 ...
   Image Name:   Linux-5.10.10
   Created:  	2021-01-23  15:04:06 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:	7175720 Bytes = 6.8 MiB
   Load Address: c2000040
   Entry Point:  c2000040
   Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   XIP Kernel Image
   Loading Device Tree to cffe1000, end cffffdf0 ... OK

Starting kernel ...

Hey @ShawnHymel i’d fully expect to see a kernel output here…

I’ll keep digging…

Regards,

1 Like

@RobertCNelson I went through the process of enabling earlyprintk (https://wiki.st.com/stm32mpu/wiki/Dmesg_and_Linux_kernel_log#earlyprintk), and here’s the whole boot process. It makes it to the last line, hangs for about a minute, and then restarts. I’m not quite sure what it’s waiting for at the end:

U-Boot SPL 2020.10-stm32mp-r1 (Oct 05 2020 - 15:15:32 +0000)
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
RAM: DDR3-DDR3L 16bits 533000kHz
WDT:   Started with servicing (32s timeout)
Trying to boot from MMC1


U-Boot 2020.10-stm32mp-r1 (Oct 05 2020 - 15:15:32 +0000)

CPU: STM32MP157DAC Rev.Z
Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
Board: stm32mp1 in basic mode (st,stm32mp157d-dk1)
Board: MB1272 Var3.0 Rev.C-02
DRAM:  512 MiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT:   Started with servicing (32s timeout)
NAND:  0 MiB
MMC:   STM32 SD/MMC: 0
Loading Environment from MMC... OK
In:	serial
Out:   serial
Err:   serial
****************************************************
*    	WARNING 500mA power supply detected   	*
* 	Current too low, use a 3A power supply!  	*
****************************************************

Net:   eth0: ethernet@5800a000
Hit any key to stop autoboot:  0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /mmc0_extlinux/extlinux.conf
Retrieving file: /mmc0_extlinux/extlinux.conf
251 bytes read in 32 ms (6.8 KiB/s)
Retrieving file: /splash.bmp
7802 bytes read in 31 ms (245.1 KiB/s)
1:    OpenSTLinux
Retrieving file: /uImage
7178824 bytes read in 341 ms (20.1 MiB/s)
append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw earlyprintk console=ttySTM0,115200
Retrieving file: /stm32mp157d-dk1.dtb
114161 bytes read in 37 ms (2.9 MiB/s)
## Booting kernel from Legacy Image at c2000000 ...
   Image Name:   Linux-5.10.10
   Created:  	2021-01-23  15:04:06 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:	7178760 Bytes = 6.8 MiB
   Load Address: c2000040
   Entry Point:  c2000040
   Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
   Booting using the fdt blob at 0xc4000000
   XIP Kernel Image
   Loading Device Tree to cffe1000, end cffffdf0 ... OK

Starting kernel ...

[	0.000000] Booting Linux on physical CPU 0x0
[	0.000000] Linux version 5.10.10 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP PREEMPT Sat Jan 23 15:04:06 UTC 2021
[	0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[	0.000000] CPU: div instructions available: patching division code
[	0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[	0.000000] OF: fdt: Machine model: STMicroelectronics STM32MP157D-DK1 Discovery Board
[	0.000000] printk: bootconsole [earlycon0] enabled
[	0.000000] Memory policy: Data cache writealloc
[	0.000000] Reserved memory: created DMA memory pool at 0x10000000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node mcuram2@10000000, compatible id shared-dma-pool
[	0.000000] Reserved memory: created DMA memory pool at 0x10040000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node vdev0vring0@10040000, compatible id shared-dma-pool
[	0.000000] Reserved memory: created DMA memory pool at 0x10041000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node vdev0vring1@10041000, compatible id shared-dma-pool
[	0.000000] Reserved memory: created DMA memory pool at 0x10042000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node vdev0buffer@10042000, compatible id shared-dma-pool
[	0.000000] Reserved memory: created DMA memory pool at 0x30000000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node mcuram@30000000, compatible id shared-dma-pool
[	0.000000] Reserved memory: created DMA memory pool at 0x38000000, size 0 MiB
[	0.000000] OF: reserved mem: initialized node retram@38000000, compatible id shared-dma-pool
[	0.000000] cma: Reserved 128 MiB at 0xd8000000
[	0.000000] Zone ranges:
[	0.000000]   Normal   [mem 0x00000000c0000000-0x00000000dfffffff]
[	0.000000]   HighMem  empty
[	0.000000] Movable zone start for each node
[	0.000000] Early memory node ranges
[	0.000000]   node   0: [mem 0x00000000c0000000-0x00000000d3ffffff]
[	0.000000]   node   0: [mem 0x00000000d8000000-0x00000000dfffffff]
[	0.000000] Initmem setup node 0 [mem 0x00000000c0000000-0x00000000dfffffff]
[	0.000000] psci: probing for conduit method from DT.
[	0.000000] psci: PSCIv1.0 detected in firmware.
[	0.000000] psci: Using standard PSCI v0.2 function IDs
[	0.000000] psci: Trusted OS migration not required
[	0.000000] psci: SMC Calling Convention v1.0
[	0.000000] percpu: Embedded 19 pages/cpu s48908 r8192 d20724 u77824
[	0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 113536
[	0.000000] Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw earlyprintk console=ttySTM0,115200
[	0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[	0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[	0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[	0.000000] Memory: 304604K/458752K available (11264K kernel code, 1159K rwdata, 3192K rodata, 1024K init, 243K bss, 23076K reserved, 131072K cma-reserved, 0K highmem)
[	0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[	0.000000] rcu: Preemptible hierarchical RCU implementation.
[	0.000000] rcu:     RCU event tracing is enabled.
[	0.000000]     Trampoline variant of Tasks RCU enabled.
[	0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[	0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[	0.000000] random: get_random_bytes called from start_kernel+0x390/0x54c with crng_init=0
[	0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[	0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[	0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[	0.008091] Switching to timer-based delay loop, resolution 41ns
[	0.015622] Console: colour dummy device 80x30
[	0.020147] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[	0.030630] pid_max: default: 32768 minimum: 301
[	0.035486] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[	0.042894] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[	0.051654] CPU: Testing write buffer coherency: ok
[	0.056990] /cpus/cpu@0 missing clock-frequency property
[	0.062377] /cpus/cpu@1 missing clock-frequency property
[	0.067781] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[	0.074359] Setting up static identity map for 0xc0100000 - 0xc0100060
[	0.081168] rcu: Hierarchical SRCU implementation.
[	0.087181] smp: Bringing up secondary CPUs ...
[	0.092621] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[	0.092834] smp: Brought up 1 node, 2 CPUs
[	0.102764] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[	0.109002] CPU: All CPU(s) started in SVC mode.
[	0.114359] devtmpfs: initialized
[	0.147642] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[	0.155738] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[	0.165708] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[	0.177780] pinctrl core: initialized pinctrl subsystem
[	0.184634] NET: Registered protocol family 16
[	0.192094] DMA: preallocated 256 KiB pool for atomic coherent allocations
[	0.200757] thermal_sys: Registered thermal governor 'step_wise'
[	0.201126] cpuidle: using governor menu
[	0.211536] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[	0.219619] hw-breakpoint: maximum watchpoint size is 8 bytes.
[	0.225863] Serial: AMBA PL011 UART driver
[	0.269565] stm32-pm-domain pm_domain: domain core-ret-power-domain registered
[	0.276958] stm32-pm-domain pm_domain: subdomain core-power-domain registered
[	0.284167] stm32-pm-domain pm_domain: domains probed
[	0.311556] SCSI subsystem initialized
[	0.316055] usbcore: registered new interface driver usbfs
[	0.321794] usbcore: registered new interface driver hub
[	0.327215] usbcore: registered new device driver usb
[	0.332674] pps_core: LinuxPPS API ver. 1 registered
[	0.337690] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[	0.346997] PTP clock support registered
[	0.351774] arm-scmi firmware:scmi0: SCMI Notifications - Core Enabled.
[	0.358543] arm-scmi firmware:scmi0: unable to communicate with SCMI(-95)
[	0.365441] arm-scmi: probe of firmware:scmi0 failed with error -95
[	0.374350] clocksource: Switched to clocksource arch_sys_counter
[	1.547460] NET: Registered protocol family 2
[	1.552881] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[	1.561519] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[	1.569421] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[	1.576775] TCP: Hash tables configured (established 4096 bind 4096)
[	1.583346] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[	1.590038] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[	1.597339] NET: Registered protocol family 1
[	1.602529] RPC: Registered named UNIX socket transport module.
[	1.608586] RPC: Registered udp transport module.
[	1.613336] RPC: Registered tcp transport module.
[	1.618145] RPC: Registered tcp NFSv4.1 backchannel transport module.
[	1.625632] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[	1.635614] Initialise system trusted keyrings
[	1.640433] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[	1.655943] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[	1.663053] NFS: Registering the id_resolver key type
[	1.668298] Key type id_resolver registered
[	1.672523] Key type id_legacy registered
[	1.676769] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[	1.683575] ntfs: driver 2.1.32 [Flags: R/O].
[	1.688289] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[	1.695679] Key type asymmetric registered
[	1.699824] Asymmetric key parser 'x509' registered
[	1.704872] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[	1.712341] io scheduler mq-deadline registered
[	1.716966] io scheduler kyber registered
[	1.729936] STM32 USART driver initialized
[	1.752446] brd: module loaded
[	1.767209] loop: module loaded
[	1.775500] libphy: Fixed MDIO Bus: probed
[	1.781387] CAN device driver interface
[	1.787095] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[	1.794698] usbcore: registered new interface driver pegasus
[	1.800473] usbcore: registered new interface driver asix
[	1.805996] usbcore: registered new interface driver ax88179_178a
[	1.812203] usbcore: registered new interface driver cdc_ether
[	1.818187] usbcore: registered new interface driver smsc75xx
[	1.824044] usbcore: registered new interface driver smsc95xx
[	1.829913] usbcore: registered new interface driver net1080
[	1.835710] usbcore: registered new interface driver cdc_subset
[	1.841726] usbcore: registered new interface driver zaurus
[	1.847448] usbcore: registered new interface driver cdc_ncm
[	1.854570] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[	1.861205] ehci-platform: EHCI generic platform driver
[	1.866919] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[	1.873184] ohci-platform: OHCI generic platform driver
[	1.879121] usbcore: registered new interface driver usb-storage
[	1.888464] i2c /dev entries driver
[	1.895995] stm32-cpufreq stm32-cpufreq: Failed to get chip info: -517
[	1.903574] sdhci: Secure Digital Host Controller Interface driver
[	1.909880] sdhci: Copyright(c) Pierre Ossman
[	1.914277] Synopsys Designware Multimedia Card Interface Driver
[	1.920787] sdhci-pltfm: SDHCI platform and OF driver helper
[	1.927701] ledtrig-cpu: registered to indicate activity on CPUs
[	1.934241] usbcore: registered new interface driver usbhid
[	1.939935] usbhid: USB HID core driver
[	1.945150] remoteproc remoteproc0: releasing m4
[	1.952421] NET: Registered protocol family 10
[	1.958317] Segment Routing with IPv6
[	1.962113] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[	1.968995] NET: Registered protocol family 17
[	1.973504] can: controller area network core
[	1.978074] NET: Registered protocol family 29
[	1.982566] can: raw protocol
[	1.985580] can: broadcast manager protocol
[	1.989811] can: netlink gateway - max_hops=1
[	1.994705] Key type dns_resolver registered
[	1.999183] ThumbEE CPU extension supported.
[	2.003503] Registering SWP/SWPB emulation handler
[	2.008745] Loading compiled-in X.509 certificates
[	2.032688] remoteproc remoteproc0: releasing m4
[	2.045747] stm32-usart 40010000.serial: deferred probe timeout, ignoring dependency
[	2.054850] stm32-display 5a001000.display-controller: deferred probe timeout, ignoring dependency
[	2.064686] stm32-dwmac 5800a000.ethernet: deferred probe timeout, ignoring dependency
[	2.075385] stm32f7-i2c 40012000.i2c: deferred probe timeout, ignoring dependency
[	2.083462] stm32f7-i2c 5c002000.i2c: deferred probe timeout, ignoring dependency
[	2.092783] mmci-pl18x 58005000.sdmmc: deferred probe timeout, ignoring dependency
[	2.102380] remoteproc remoteproc0: releasing m4
[	2.108780] Warning: unable to open an initial console.
[	2.114270] Waiting for root device PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582...

i’m getting a sinking sensation someone didn’t test the default config at ST… So the mmc didn’t finish loading as it’s waiting for something else, that didn’t’ load… Thinking either the STM32 pinmux or another mmc dependency… From your deploy directory, is there a “defconfig” file saved that you can share?

Regards,

I don’t see any “defconfig” in tmp/deploy. Is there another place I should look for this file?

I dug around a little this morning. Another interesting thing I discovered is that rootfs/dev/ is empty, which makes me think the serial/UART driver was not correctly included in the core-image-minimal build. Is there a way to include it manually? I don’t know anything about how to do that (I think it has something to do with .dts or .dtb device tree files).

Another option might be to build a different image. However, I’m not sure which one to build. The image files that ST recommends (e.g. “st-image-weston”) seem to depend on OpenSTLinux, and I’m trying to avoid all of the extra bloat that comes with it for now (just trying to get a basic kernel, rootfs, and serial console running).

Hi,

Did you get it working?
I’m facing the exact same error message, but I’m using TF-A.

Thank you

@ShawnHymel also switched to TF-A: Introduction to Embedded Linux Part 2 - Yocto Project | Digi-Key Electronics - YouTube

Regards,