Skip to main content
Visitor II
February 21, 2024
Solved

U-boots hangs when trying to load u-boot environment

  • February 21, 2024
  • 2 replies
  • 3783 views

I am booting from EMMC with this flash layout.

/dev/mmcblk1p1 : start= 34, size= 1024, type=8DA63339-0007-60C0-C436-083AC8230908, uuid=077BFE04-5B1A-41F8-8DC2-B47FCC4EA832, name="metadata1"
/dev/mmcblk0p2 : start= 1058, size= 1024, type=8DA63339-0007-60C0-C436-083AC8230908, uuid=9487F545-20A2-495E-A515-41B16AF75FE7, name="metadata2"
/dev/mmcblk1p3 : start= 2082, size= 4096, type=19D5DF83-11B0-457B-BE2C-7559C13142A5, uuid=4fd84c93-54ef-463f-a7ef-ae25ff887087, name="fip-a"
/dev/mmcblk1p4 : start= 6178, size= 4096, type=19D5DF83-11B0-457B-BE2C-7559C13142A5, uuid=09C54952-D5BF-45AF-ACEE-335303766FB3, name="fip-b"
/dev/mmcblk1p5 : start= 10274, size= 1024, type=3DE21764-95DB-54BD-A5C3-4ABE786F38A8, uuid=5BB4327D-D6F5-4007-BE5C-85681ED9C1E7, name="u-boot-env"
/dev/mmcblk1p6 : start= 11298, size= 974848, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=929FE52B-B9E0-459A-80AB-A8F82878CB57, name="bootfs", attrs="LegacyBIOSBootable"
/dev/mmcblk1p7 : start= 986146, size= 32768, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=F29C6C3E-6BCB-4313-8C5F-1D33BAEC7E85, name="vendorfs"
/dev/mmcblk1p8 : start= 1018914, size= 4194304, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=A260A1BB-7804-4861-93A2-715386D95582, name="rootfs"
/dev/mmcblk1p9 : start= 5213218, size= 4194304, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=62939A84-39BB-4108-9A17-96D7ECF0C6B8, name="userfs"

And it boots but hangs when loading the environment.

INFO: PMIC version = 0x21
NOTICE: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using EMMC
INFO: Instance 2
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.6-stm32mp1-r1.0(debug):devtool-patched-dirty
NOTICE: BL2: Built : 12:40:18, Feb 6 2024
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000khz
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2: Loading image id 31
INFO: Loading image id=31 at address 0x2ffff000
INFO: Image id=31 loaded: 0x2ffff000 - 0x2ffff226
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffc5000
INFO: Image id=4 loaded: 0x2ffc5000 - 0x2ffd9820
INFO: BL2: Skip loading image id 21
INFO: BL2: Skip loading image id 22
INFO: BL2: Loading image id 23
INFO: Loading image id=23 at address 0xc0500000
INFO: Image id=23 loaded: 0xc0500000 - 0xc0512910
INFO: BL2: Loading image id 26
INFO: Loading image id=26 at address 0x2ffc0000
INFO: Image id=26 loaded: 0x2ffc0000 - 0x2ffc4051
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: Image id=5 loaded: 0xc0100000 - 0xc01ece98
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffc5000
INFO: SPSR = 0x1d3
NOTICE: SP_MIN: v2.6-stm32mp1-r1.0(debug):devtool-patched-dirty
NOTICE: SP_MIN: Built : 12:40:18, Feb 6 2024
INFO: ARM GICv2 driver initialized
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world


U-Boot 2021.10-stm32mp-r1-00013-gd197821211-dirty (Feb 02 2024 - 10:52:21 +0000)

CPU: STM32MP157F?? Rev.Z
Model: xxxxx board V0.2
Board: stm32mp1 in trusted mode (st,stm32mp157c-osd32mp1-ads)
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 187.500 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, STM32 SD/MMC: 1
Loading Environment from MMC...

Then it shows the CPU registers.

u-boot DTS has config

u-boot,mmc-env-partition = "u-boot-env";

Any ideas?

    This topic has been closed for replies.
    Best answer by edwardmcl

    The problem was a wrong pin assignment on one of the data lines of the u-boot DT which used bus-width=<8>. The EMMC could read & write when booted from SD which indicated that the pin assignments were correct but the default on mmc cards is one data line which in my case was assigned correctly in the DT. But as soon as it booted from EMMC where I assigned bus-width=<8> it started correctly with one data line but then it switched to 8 data lines and hung.

    2 replies

    Technical Moderator
    February 22, 2024

    Hi @edwardmcl ,

    I notice st,stm32mp157c-osd32mp1-ads  which is SiP from Octavo System 

    Are you using a Octavo evalutation board or the SiP on custom board ?

    Did you already try to contact Octavo for support? 

    Else did you try to get more trace from U-Boot, see U-Boot - How to debug - stm32mpu

    Hope it help 

    Olivier 

     

     

     

    edwardmclAuthor
    Visitor II
    February 22, 2024

    I haven't contacted Octavo as I believe this isn't related to the SIP but I'll ask.

    I'll follow your suggestion on the debug.

    Thanks.

    Visitor II
    February 22, 2024

    Hi,

     

    /dev/mmcblk0p2--> this should be mmcblk"1"p2 ?

    Did you try booting without the A/B scheme?

    Did you try booting with Octavo image(dk2'st) with dts hand copied in the /boot?

    edwardmclAuthorAnswer
    Visitor II
    March 4, 2024

    The problem was a wrong pin assignment on one of the data lines of the u-boot DT which used bus-width=<8>. The EMMC could read & write when booted from SD which indicated that the pin assignments were correct but the default on mmc cards is one data line which in my case was assigned correctly in the DT. But as soon as it booted from EMMC where I assigned bus-width=<8> it started correctly with one data line but then it switched to 8 data lines and hung.