Skip to main content
Visitor II
June 8, 2024
Solved

Error when modifying Linux kernel

  • June 8, 2024
  • 1 reply
  • 2479 views

Hello all,

I was trying to build Linux kernel and push into my STM32MP135F-DK. For this, I was following the steps below link (Modify, rebuild and reload the Linux® kernel):

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Modify,_rebuild_and_reload_the_Linux%C2%AE_kernel

Nothing seemed wrong to me until "5.4. Reboot the board" step. After I rebooted the board, only the ST logo appears for a while, then it disappears and a black screen appears for a few seconds, then the ST logo appears again. This loop continues constantly and never switches to other screens (Linux splash screen, Weston desktop, GTK demo launcher).

I have no idea why I experienced such a thing since everything seemed correct until the reboot step. I wondered if I had pushed the wrong device tree in the "5.2. Push the device tree into the board" step in the link above (since I was using STM32MP135F-DK, I pushed the stm32mp135f-dk.dtb one). But I am not sure.

Can you help me?

    This topic has been closed for replies.
    Best answer by Gregory PLANCHON

    Hi @alpka ,

     

    Your dt is not deleted, the system just can't find it.
    In order for your board to boot correctly, all your boot stages must be aligned with each other.
    You can find the versions of the different systems used in several places in the wiki:
        in the release notes : https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note_-_v5.0.0#Release_content
        in the developer package : https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package#Installing_the_OpenSTLinux_BSP_packages
        and in the wiki archives for older versions like 4.1 : https://wiki.st.com/stm32mpu/wiki/Wiki_archives  

    Finally, you don't need a new SD card, you just need to reflash it with a starter package to get the software working again. 

     

    Regards,

    Grégory

    1 reply

    ST Employee
    June 10, 2024

    Hi @alpka ,
    Have you tried looking at the boot traces (using minicom or putty for example) to see if there was an error message?

    And if so, could you please share them with me?

    Regards,

    Grégory

    alpkaAuthor
    Visitor II
    June 10, 2024

    Hi @Gregory PLANCHON

    Here are the traces:

    U-Boot 2021.10-stm32mp-r2-rc2 (Oct 04 2021 - 15:09:26 +0000)
    
    CPU: STM32MP135F Rev.?
    Model: STMicroelectronics STM32MP135F-DK Discovery Board
    Board: stm32mp1 in trusted mode (st,stm32mp135f-dk)
    Board: MB1635 Var1.0 Rev.E-02
    DRAM: 512 MiB
    optee optee: OP-TEE: revision 3.16 (d0b742d1)
    Clocks:
    - MPU : 1000 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... OK
    In: serial
    Out: serial
    Err: serial
    Net: eth0: eth1@5800a000, eth1: eth2@5800e000
    Hit any key to stop autoboot: 0 
    Boot over mmc0!
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:8...
    Found /mmc0_extlinux/stm32mp135f-dk_extlinux.conf
    Retrieving file: /mmc0_extlinux/stm32mp135f-dk_extlinux.conf
    565 bytes read in 16 ms (34.2 KiB/s)
    Retrieving file: /splash_landscape.bmp
    7802 bytes read in 15 ms (507.8 KiB/s)
    Select the boot mode
    1: OpenSTLinux
    2: stm32mp135f-dk-a7-examples
    Enter choice: 1: OpenSTLinux
    Retrieving file: /st-image-resize-initrd
    29827666 bytes read in 1257 ms (22.6 MiB/s)
    Retrieving file: /uImage
    8212928 bytes read in 358 ms (21.9 MiB/s)
    append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
    Retrieving file: /stm32mp135f-dk.dtb
    62266 bytes read in 17 ms (3.5 MiB/s)
    ## Booting kernel from Legacy Image at c2000000 ...
     Image Name: Linux-6.1.28
     Created: 2024-06-10 6:48:56 UTC
     Image Type: ARM Linux Kernel Image (uncompressed)
     Data Size: 8212864 Bytes = 7.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 Ramdisk to ce38d000, end cffff252 ... OK
     Loading Device Tree to ce37a000, end ce38c339 ... OK
    gc2145@3c node not found - DT update aborted
    
    Starting kernel ...
    
    M/TC: CPU : 0
    M/TC: usr_sp : 0xbee41cb8
    M/TC: usr_lr : 0xb6de2397
    M/TC: irq_spsr : 0x600d0193
    M/TC: irq_sp : 0xc13571c0
    M/TC: irq_lr : 0xc0100b20
    M/TC: fiq_spsr : 0x05084dc2
    M/TC: fiq_sp : 0xc13571f0
    M/TC: fiq_lr : 0xc13571f0
    M/TC: svc_spsr : 0x600d0013
    M/TC: svc_sp : 0xc1201f38
    M/TC: svc_lr : 0xc01090cc
    M/TC: abt_spsr : 0x200d0193
    M/TC: abt_sp : 0xc13571d0
    M/TC: abt_lr : 0xc0100e60
    M/TC: und_spsr : 0x60000093
    M/TC: und_sp : 0xc13571e0
    M/TC: und_lr : 0xc0100f60
    M/TC: pmcr : 0x41072000
    M/TC: mon_lr : 0xc0119888
    M/TC: mon_spsr : 0x600d0093
    E/TC:0 Panic 'Watchdog' at core/drivers/stm32_iwdg.c:105 <stm32_iwdg_it_handler>
    E/TC:0 TEE load address @ 0xde200000
    E/TC:0 Call stack:
    E/TC:0 0xde203cb5
    E/TC:0 0xde21a9e1
    E/TC:0 0xde20f0cb
    E/TC:0 0xde21a0a1
    E/TC:0 0xde237a87
    E/TC:0 0xde200340
    NOTICE: CPU: STM32MP135F Rev.?
    NOTICE: Model: STMicroelectronics STM32MP135F-DK Discovery Board
    NOTICE: Board: MB1635 Var1.0 Rev.E-02
    INFO: PMIC version = 0x21
    NOTICE: Reset reason (0x234):
    INFO: IWDG2 Reset (rst_iwdg2)
    INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe0000
    INFO: FCONF: Reading firmware configuration information for: stm32mp_io
    INFO: Using SDMMC
    INFO: Instance 1
    INFO: Boot used partition fsbl1
    NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):v2.6-dirty
    NOTICE: BL2: Built : 13:14:26, Nov 23 2021
    INFO: BL2: Doing platform setup
    INFO: RAM: DDR3-1066 bin F 1x4Gb 533MHz v1.53
    INFO: Memory size = 0x20000000 (512 MB)
    INFO: BL2: Loading image id 31
    INFO: Loading image id=31 at address 0x30006000
    INFO: Image id=31 loaded: 0x30006000 - 0x30006246
    INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x30006000
    INFO: FCONF: Reading firmware configuration information for: mce_config
    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 0xde200000
    INFO: Image id=4 loaded: 0xde200000 - 0xde20001c
    INFO: OPTEE ep=0xde200000
    INFO: OPTEE header info:
    INFO: magic=0x4554504f
    INFO: version=0x2
    INFO: arch=0x0
    INFO: flags=0x0
    INFO: nb_images=0x1
    INFO: BL2: Loading image id 21
    INFO: Loading image id=21 at address 0xde200000
    INFO: Image id=21 loaded: 0xde200000 - 0xde277308
    INFO: BL2: Skip loading image id 22
    INFO: BL2: Loading image id 23
    INFO: Loading image id=23 at address 0xc0400000
    INFO: Image id=23 loaded: 0xc0400000 - 0xc040f418
    INFO: BL2: Skip loading image id 26
    INFO: BL2: Loading image id 5
    INFO: Loading image id=5 at address 0xc0000000
    INFO: Image id=5 loaded: 0xc0000000 - 0xc00e4534
    NOTICE: BL2: Booting BL32
    INFO: Entry point address = 0xde200000
    INFO: SPSR = 0x1d3
    I/TC: Early console on UART#4
    I/TC: 
    I/TC: Non-secure external DT found
    I/TC: Embedded DTB found
    I/TC: OP-TEE version: 3.16.0-dev (gcc version 11.2.0 (GCC)) #1 Fri 28 Jan 2022 02:28:18 PM UTC arm
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: WARNING: All debug access are allowed
    I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts
    I/TC: DTB enables console (non-secure)
    I/TC: Primary CPU switching to normal world boot
    optee optee: OP-TEE: revision 3.16 (d0b742d1)
    
    
    U-Boot 2021.10-stm32mp-r2-rc2 (Oct 04 2021 - 15:09:26 +0000)
    
    CPU: STM32MP135F Rev.?
    Model: STMicroelectronics STM32MP135F-DK Discovery Board
    Board: stm32mp1 in trusted mode (st,stm32mp135f-dk)
    Board: MB1635 Var1.0 Rev.E-02
    DRAM: 512 MiB
    optee optee: OP-TEE: revision 3.16 (d0b742d1)
    Clocks:
    - MPU : 1000 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... OK
    In: serial
    Out: serial
    Err: serial
    Net: eth0: eth1@5800a000, eth1: eth2@5800e000
    Hit any key to stop autoboot: 0 
    Boot over mmc0!
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:8...
    Found /mmc0_extlinux/stm32mp135f-dk_extlinux.conf
    Retrieving file: /mmc0_extlinux/stm32mp135f-dk_extlinux.conf
    565 bytes read in 15 ms (36.1 KiB/s)
    Retrieving file: /splash_landscape.bmp
    7802 bytes read in 15 ms (507.8 KiB/s)
    Select the boot mode
    1: OpenSTLinux
    2: stm32mp135f-dk-a7-examples
    Enter choice: 1: OpenSTLinux
    Retrieving file: /st-image-resize-initrd
    29827666 bytes read in 1257 ms (22.6 MiB/s)
    Retrieving file: /uImage
    8212928 bytes read in 359 ms (21.8 MiB/s)
    append: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
    Retrieving file: /stm32mp135f-dk.dtb
    62266 bytes read in 17 ms (3.5 MiB/s)
    ## Booting kernel from Legacy Image at c2000000 ...
     Image Name: Linux-6.1.28
     Created: 2024-06-10 6:48:56 UTC
     Image Type: ARM Linux Kernel Image (uncompressed)
     Data Size: 8212864 Bytes = 7.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 Ramdisk to ce38d000, end cffff252 ... OK
     Loading Device Tree to ce37a000, end ce38c339 ... OK
    gc2145@3c node not found - DT update aborted
    
    Starting kernel ...
    
    M/TC: CPU : 0
    M/TC: usr_sp : 0xbe82bcb8
    M/TC: usr_lr : 0xb6e72397
    M/TC: irq_spsr : 0x600d0193
    M/TC: irq_sp : 0xc13571c0
    M/TC: irq_lr : 0xc0100b20
    M/TC: fiq_spsr : 0x040d91d2
    M/TC: fiq_sp : 0xc13571f0
    M/TC: fiq_lr : 0xc13571f0
    M/TC: svc_spsr : 0x600d0013
    M/TC: svc_sp : 0xc1201f38
    M/TC: svc_lr : 0xc01090cc
    M/TC: abt_spsr : 0x200d0193
    M/TC: abt_sp : 0xc13571d0
    M/TC: abt_lr : 0xc0100e60
    M/TC: und_spsr : 0x600c0093
    M/TC: und_sp : 0xc13571e0
    M/TC: und_lr : 0xc0100f60
    M/TC: pmcr : 0x41072000
    M/TC: mon_lr : 0xc0119888
    M/TC: mon_spsr : 0x600d0093
    E/TC:0 Panic 'Watchdog' at core/drivers/stm32_iwdg.c:105 <stm32_iwdg_it_handler>
    E/TC:0 TEE load address @ 0xde200000
    E/TC:0 Call stack:
    E/TC:0 0xde203cb5
    E/TC:0 0xde21a9e1
    E/TC:0 0xde20f0cb
    E/TC:0 0xde21a0a1
    E/TC:0 0xde237a87
    E/TC:0 0xde200340
    NOTICE: CPU: STM32MP135F Rev.?
    NOTICE: Model: STMicroelectronics STM32MP135F-DK Discovery Board
    NOTICE: Board: MB1635 Var1.0 Rev.E-02
    INFO: PMIC version = 0x21
    NOTICE: Reset reason (0x234):
    INFO: IWDG2 Reset (rst_iwdg2)
    INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe0000
    INFO: FCONF: Reading firmware configuration information for: stm32mp_io
    INFO: Using SDMMC
    INFO: Instance 1
    INFO: Boot used partition fsbl1
    NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):v2.6-dirty
    NOTICE: BL2: Built : 13:14:26, Nov 23 2021
    INFO: BL2: Doing platform setup
    INFO: RAM: DDR3-1066 bin F 1x4Gb 533MHz v1.53
    INFO: Memory size = 0x20000000 (512 MB)
    INFO: BL2: Loading image id 31
    INFO: Loading image id=31 at address 0x30006000
    INFO: Image id=31 loaded: 0x30006000 - 0x30006246
    INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x30006000
    INFO: FCONF: Reading firmware configuration information for: mce_config
    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 0xde200000
    INFO: Image id=4 loaded: 0xde200000 - 0xde20001c
    INFO: OPTEE ep=0xde200000
    INFO: OPTEE header info:
    INFO: magic=0x4554504f
    INFO: version=0x2
    INFO: arch=0x0
    INFO: flags=0x0
    INFO: nb_images=0x1
    INFO: BL2: Loading image id 21
    INFO: Loading image id=21 at address 0xde200000
    INFO: Image id=21 loaded: 0xde200000 - 0xde277308
    INFO: BL2: Skip loading image id 22
    INFO: BL2: Loading image id 23
    INFO: Loading image id=23 at address 0xc0400000
    INFO: Image id=23 loaded: 0xc0400000 - 0xc040f418
    INFO: BL2: Skip loading image id 26
    INFO: BL2: Loading image id 5
    INFO: Loading image id=5 at address 0xc0000000
    INFO: Image id=5 loaded: 0xc0000000 - 0xc00e4534
    NOTICE: BL2: Booting BL32
    INFO: Entry point address = 0xde200000
    INFO: SPSR = 0x1d3
    I/TC: Early console on UART#4
    I/TC: 
    I/TC: Non-secure external DT found
    I/TC: Embedded DTB found
    I/TC: OP-TEE version: 3.16.0-dev (gcc version 11.2.0 (GCC)) #1 Fri 28 Jan 2022 02:28:18 PM UTC arm
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: WARNING: All debug access are allowed
    I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp135f-dk.dts
    I/TC: DTB enables console (non-secure)
    I/TC: Primary CPU switching to normal world boot
    optee optee: OP-TEE: revision 3.16 (d0b742d1)
    

    When we compare the traces with the below one (which I took from "Execute basic commands" page), things are different starting from  "Starting kernel ..." section:

    alpka_0-1718027456818.png

    But I still don't understand what caused this problem, since I did everything according to the "Modify, rebuild and reload the Linux® kernel" page.

    Thanks.

    ST Employee
    June 10, 2024

    Hi,

    There seems to be a problem in your configuration, as you can see from this message 

    gc2145@3c node not found - DT update aborted


    Could you please try again and share with me the commands you use and the logs you get? 
     

    at the same time can you make sure you're aligned with the correct kernel version.
    I see in your logs that you're on 4.X. Have you taken care to use a kernel compatible with this one (kernel 5.15)?

     

    Regards,

    Grégory