cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly intiate boot sequance of stm32mp1?

iheb
Associate II

I am upgrading from ecosystem 4.1 to 4.0. after changing every thing properly in the device tree. and now i successfully compiled the image partitions using bitbake how ever when i boot using the flashed images every thing works correctly utill i recive the following error on the boot

Starting version 250.5+
 
root '/dev/disk/by-partuuid/e91c4e10-16e6-4c0e-bd0e-77becf4a3582' doesn't exist or does not contain a /dev.

the full boot log is in the following .txt file

i did try to flash using :

  • the script provided to prepare a raw image
  • manually using fdisk and dd
  • change the config in boot Partion and insert the rootfs adiquet id
  • verify the UUID of the partition

the compilation generates the following message when i compile the image using bitbake

NOTE: Started PRServer with DBfile: /media/user1/st4_1/kirkstone/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, Address: 127.0.0.1:37179, PID: 2053248
Loading cache: 100% |###########################################| Time: 0:00:05
Loaded 4455 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
 
Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-ostl-linux-gnueabi"
MACHINE              = "osd32mp1-brk"
DISTRO               = "openstlinux-weston"
DISTRO_VERSION       = "4.0.4-snapshot-20230108"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
DISTRO_CODENAME      = "kirkstone"
GCCVERSION           = "11.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python          
meta-oe              
meta-gnome           
meta-initramfs       
meta-multimedia      
meta-networking      
meta-webserver       
meta-filesystems     
meta-perl            = "HEAD:05dcac98473402d87e0af73bbc2c5a6a840abe93"
meta-st-stm32mp      = "HEAD:ca501bd7dbe023682903ceedddaacd940b0898f4"
meta-qt5             = "HEAD:5b71df60e523423b9df6793de9387f87a149ac42"
meta-st-openstlinux  = "HEAD:cb736b403d0fef2a02390695613b6b4bb13ca1b7"
meta                 = "HEAD:f7766da462905ec67bf549d46b8017be36cd5b2a"
meta-octavo-osd32mp1-kirkstone = "<unknown>:<unknown>"
 
Initialising tasks: 100% |######################################| Time: 0:00:11
Sstate summary: Wanted 1276 Local 196 Mirrors 0 Missed 1080 Current 1824 (15% match, 65% cSetSetscenWARNING: octavo-image-weston-1.0-r0 do_image_complete: Missing 'EULA_FILE_ST' var : no image license copied...
WARNING: octavo-image-weston-1.0-r0 do_st_write_license_create_summary: IMG LIC SUM: File does not exist with open file /media/user1/st4_1/kirkstone/build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/images/osd32mp1-brk/octavo-image-weston-openstlinux-weston-osd32mp1-brk.license
WARNING: octavo-image-weston-1.0-r0 do_st_write_license_create_summary: IMG LIC SUM: File does not exist with open file /media/user1/st4_1/kirkstone/build-openstlinuxweston-stm32mp1/tmp-glibc/deploy/licenses/st-image-resize-initrd-openstlinux-weston-osd32mp1-brk-20230108193424/package.manifest
NOTE: Tasks Summary: Attempted 7537 tasks of which 5142 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 8 seconds

what should i do to make this boot properly ?

13 REPLIES 13
PatrickF
ST Employee

Hi @iheb​ 

I'm not expert, but I found same Partuuid value here :https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout#GPT_partuuid_of_rootfs_partition

Maybe this could help you.

Regards.

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.
SScar.2
Senior

Hi there, 

I'm having the same problem here, how did you solve that? I looked at the link Patrick suggested but didn't find any useful solution. 

Thanks a lot 

Eldam
Senior

Hello, maybe this could help,

From our side I've modified boot.scr in order to do special thing in a boot script

echo "Executing SCRIPT on target=${target}"
echo "DB-Boot Script: V1.0 27.11.20"

env set flashme 'for i in 1 2 3 4 5 6 7 8 9 ;do gpio toggle GPIOE0;gpio toggle GPIOE1;sleep 0.1; done'

gpio set GPIOE0;
gpio set GPIOE1;

if gpio input -a GPIOF13; then
echo "##################################"
echo "##DB-BOOT: entering rescue mode##"
echo "##################################"
run flashme
env set bootargs root=/dev/mmcblk1p8 rootwait rw console=ttySTM0,115200

 

Maybe you could use the mmcblkXX name instead of the weird number string?

Hi Eldam, 

thanks for your reply! So you modified just the bootargs?

I found inside extlinux.conf file the following instructions: 

# Generic Distro Configuration file generated by OpenEmbedded
TIMEOUT 20
LABEL OpenSTLinux
	KERNEL /uImage
	FDTDIR /
	INITRD /st-image-resize-initrd
	APPEND root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw   console=${console},${baudrate}

It looks like it appends the filesystem partition to jump to at that point. 

By the way, it seems weird to me that I have to modify the partition ID to boot correctly. Simply because at the moment I'm booting from SD card and I'm flashing the standard Flashlayout with STM32CubeProgrammer...
Maybe the alimentation and/or the model of the SD could be a problem? 

 

Thanks a lot 

Eldam
Senior

Well...

Hard to say if it's power/sd issue! (you'r saying that you'r porting sdk4.0-->sdk4.1, does your system worked before?)

I've see that you'r using an octavo (brk) board so it should go straight?

We too have used this board to leverage the awful difficulties that we meet.

 

From our side, i have to modify the mmcblkX/X because we don't use the same mapping than DK2/brk board, like mmc port that arent mapped on the same device (sdmmc1->sdcard, sdmmc2->emmc, wifimodule->sdmmc3)

 

good luck?

 

I'm using a custom board, 

which wasn't built by me and now I'm asked to make it work :').

Yes, the system was working before but I'm not executing any porting (as far as I know at least) and I have a few SD cards that can boot correctly. The only difference I can see is that the SD models are different, but of course, I'm terrified to write the good ones because I don't know If I'll be able to recover them if I try to flash 'em. 

I know you can't help me with that, but I appreciate your collaboration a lot. 

Thanks again

Well,

If you have some working sdcard, and others one no, you should discard the bad one!

From our side, we use:

https://www.tme.eu/fr/details/sdsdqm-016g-b35/cartes-memoire/sandisk/

(no more available :( )

 

dont waste time using crapy µsd, you will save time

flash your µsd from linux

 

 

I see... 

Thanks for the advice and support! 

 

Hi @Eldam and @PatrickF ! 

I finally found the problem! That was quite tricky! It was the SD card but not as intended in the discussed way...

Shortly: my custom board didn't have the same pmic that the STM32MP157DK2 has (maybe because it's deprecated? I'm not sure). Our pmic (chosen by previous electronic engineers) doesn't implement the DYNAMIC VOLTAGE SWITCHING required by the SDHC (or more modern protocols) at the initialization stage. 

E.G. 

SScar2_0-1709023497091.png

So when the bootstrap code requires that, it fails! 
This was also proved by boot dmesg(s) : 

 [    3.663535] mmc0: error -110 whilst initialising SD card

The right solution is to change the pmic and comply with the protocol.
The dirty solution is to use old SD cards, which don't implement the voltage switch (tested OK, they work) 

 

Thanks for the support! 

Cheers