This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J722SXH01EVM: linux app image boot in SBL

Part Number: J722SXH01EVM


Tool/software:

Hi team,

linux-sdk version: ti-processor-sdk-linux-adas-j722s-evm-09_02_00_05

rtos-sdk version: ti-processor-sdk-rtos-j722s-evm-09_02_00_05

I'm trying to run linux-appimage(linux.appimage.hs_fs) SBL application in OSPI-NOR

  • tiboot3.bin at 0x0 of OSPI-NOR
  • app at 0x80000 of OSPI-NOR
  • u-boot.img at 0x280000 of OSPI-NOR

After powering ON board in OSPI-NOR boot mode

  • wake-up domain UART (ttyUSB0) logs
    ERROR: Flash_norOspiOpen:1214: Flash_norOspiOpen : PHY enabling failed!!! Continuing without PHY...
    [BOOTLOADER_PROFILE] Boot Media       : FLASH 
    [BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz 
    [BOOTLOADER_PROFILE] Boot Image Size  : 173 KB 
    [BOOTLOADER_PROFILE] Cores present    : 
    wkup-r5f0-0
    a530-0
    [BOOTLOADER PROFILE] System_init                      :      37036us 
    [BOOTLOADER PROFILE] Drivers_open                     :        145us 
    [BOOTLOADER PROFILE] Board_driversOpen                :     134573us 
    [BOOTLOADER PROFILE] App_loadImages                   :      33647us 
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :     205402us 
    
    Image loading done, switching to application ...
    Starting RTOS/Baremetal applications
    Sciserver Testapp Built On: Mar 14 2024 12:20:58
    Sciserver Version: v2024.03.0.0REL.MCUSDK.09.02.00.17
    RM_PM_HAL Version: w2023.02-j722s
    Starting Sciserver..... PASSED
    SYSFW Firmware Version 9.0.6--w2023.01-j722s (Kool Koa
    Firmware revision 0x9
    ABI revision 3.1
    [SCICLIENT] CPU clock frequency = 800000000 Hz 
    All tests have passed!!
  • a53-domain UART (ttyUSB2) logs
    U-Boot SPL 2023.04-g7d05009917 (Feb 15 2024 - 18:08:11 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    Trying to boot from SPI
    Invalid bus 0 (err=-19)
    SPI probe failed.
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

as per log SPI probe is failing, Not getting why. 
Let me know if anything missing.

Regards,

Tarun C

  • Hi,

    as per log SPI probe is failing, Not getting why. 
    Let me know if anything missing.

    Our Expert is OoO, Please excuse the slight response delay.

    Regards,

    Karthik

  • Hello Tarun,

    Can you share the documentation that you have referred & the actual steps you followed?
    What is the boot flow that you are planning to use?
    OSPI is your boot media?

    - Keerthy

  • Hi Keerthy

    Documents referred:

     https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j722s/09_02_00_05/exports/docs/mcu_plus_sdk_j722s_09_02_00_41/docs/api_guide_j722s/EXAMPLES_DRIVERS_SBL_OSPI.html

    Compile Linux Appimage:

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j722s/09_02_00_05/exports/docs/mcu_plus_sdk_j722s_09_02_00_41/docs/api_guide_j722s/TOOLS_BOOT.html#LINUX_APPIMAGE_GEN_TOOL

    - $(MCU_SDK_PATH)/tools/boot/linuxAppimageGen/board/j722s-evm/config.mak file is attached below,

    export MCU_PLUS_SDK_PATH?=$(abspath ../../..)
    include $(MCU_PLUS_SDK_PATH)/imports.mak
    
    #Path for prebuit images in Processor SDK linux
    PSDK_LINUX_PREBUILT_IMAGES=$(MCU_PLUS_SDK_PATH)/tools/boot/hlos_prebuilt/j722s-evm/linux
    
    FASTBOOT_LINUX?=0
    
    #Input linux binaries
    ATF_BIN_NAME=bl31.bin
    OPTEE_BIN_NAME=bl32.bin
    SPL_BIN_NAME=u-boot-spl-j722s-evm.bin
    
    ifeq ($(FASTBOOT_LINUX), 1)
    #Load Kernel directly
    KERN_BIN_NAME=Image
    FDT_BIN_NAME=k3-j722s-evm.dtb
    endif
    
    #Linux image load address
    ATF_LOAD_ADDR=0x9e780000
    OPTEE_LOAD_ADDR=0x9e800000
    SPL_LOAD_ADDR=0x80080000
    
    ifeq ($(FASTBOOT_LINUX), 1)
    KERN_LOAD_ADDR=0x80080000
    FDT_LOAD_ADDR=0x82000000
    endif
    
    #Output appimage name
    LINUX_BOOTIMAGE_NAME=linux.appimage
    
    #core Ids to generate app image
    BOOTIMAGE_CORE_ID_mcu-r5fss0-0  = 0
    BOOTIMAGE_CORE_ID_wkup-r5fss0-0 = 1
    BOOTIMAGE_CORE_ID_main-r5fss0-0 = 2
    BOOTIMAGE_CORE_ID_c75ss0-0      = 3
    BOOTIMAGE_CORE_ID_c75ss1-0      = 4
    BOOTIMAGE_CORE_ID_a53ss0-0      = 5
    BOOTIMAGE_CORE_ID_a53ss0-1      = 6
    BOOTIMAGE_CORE_ID_a53ss1-0      = 7
    BOOTIMAGE_CORE_ID_a53ss1-1      = 8
    
    # Add path to executable binaries that you want to run along with the Linux
    IMG1 = $(BOOTIMAGE_CORE_ID_wkup-r5fss0-0) $(MCU_PLUS_SDK_PATH)/tools/sysfw/sciserver_binary/j722s/sciclient_get_version.release.rprc
    IMG2 =
    IMG3 =
    
    RTOS_IMG_LIST = $(IMG1) $(IMG2) $(IMG3)

    Steps Followed:

    - I'm trying to load SBL files to OSPI-flash from sd-card SPL boot.

    - Inside sd-card boot partition I've a folder named sbl inside which I'm storing below 3 files.

    - tiboot3.bin(OSPI), app($(MCU_SDK_PATH)/tools/boot/linuxAppimageGen/board/j722s-evm/linux.appimage.hs_fs) and u-boot.img($(MCU_SDK_PATH)/tools/boot/hlos_prebuilt/j722s-evm/linux/u-boot.img) to OSPI-FLASH in u-boot terminal.

    - First boot the SPL and stop at u-boot terminal and load the sbl folder files to OSPI flash

    - Steps in u-boot terminal:

    sf probe
    sf erase 0x0 80000
    sf erase 0x80000 100000
    sf erase 0x280000 0x400000
    fatload mmc 1:1 ${loadaddr} sbl/tiboot3.bin
    sf update ${loadaddr} 0x0 0x${filesize}
    fatload mmc 1:1 ${loadaddr} sbl/app
    sf update ${loadaddr} 0x80000 0x${filesize}
    fatload mmc 1:1 ${loadaddr} sbl/u-boot.img
    sf update ${loadaddr} 0x280000 0x${filesize}


    - Power off and change boot mode to OSPI-flash

    - The logs are attached in previous message.

    OSPI flash (SW2.1 is OFF) is boot media for the SBL

    Regards,

    Tarun C

  • Hello Tarun,

    To begin with please try to use the SPL boot flow. The 9.2 SDK has issues with ospi boot:

    Here is the FAQ:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1352670/faq-j722sxh01evm-how-to-enable-ospi-nand-nor-boot-on-9-2-linux-sdk

    Please follow that and let me know if you can get to U-Boot prompt.

    Best regards,

    Keerthy 

  • Hi Keerthy,

    Please follow that and let me know if you can get to U-Boot prompt.

    I followed the link, and able to get U-Boot prompt from NOR Boot.

    I'm trying to run linux-appimage(linux.appimage.hs_fs) SBL application in OSPI-NOR

    • tiboot3.bin at 0x0 of OSPI-NOR
    • app at 0x80000 of OSPI-NOR
    • u-boot.img at 0x280000 of OSPI-NOR

    Now I need to load these 3 into NOR flash (SBL boot). Can you please tell me how to continue.

    Regards,

    Tarun C

  • Hi Vishal,

    You should now compile the combined app image with the above generated binaries.

    Best regards,

    Keerthy 

  • Hi Keerthy,

    Now I'm able to get till u-boot terminal in OSPI-NOR flash using SBL mode.

    My use case is to load linux Image from NOR flash to RAM.

    When I run sf probe in u-boot terminal board crashes, logs are attached below.

    U-Boot SPL 2023.04-gccfe6113 (Oct 09 2024 - 11:56:30 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    Trying to boot from SPI
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-g7d05009917 (Feb 15 2024 - 18:08:11 +0000)
    
    SoC:   J722S SR1.0 HS-FS
    Model: Texas Instruments J722S EVM
    Board: J722SX-EVM rev E2
    DRAM:  2 GiB (effective 8 GiB)
    Core:  70 devices, 27 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   
    Warning: ethernet@8000000port@1 (eth0) using random MAC address - 86:b5:83:ec:3d:97
    eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    => 
    => sf probe
    Invalid bus 0 (err=-19)
    "Synchronous Abort" handler, esr 0x96000021
    elr: 0000000080836340 lr : 000000008081ef50 (reloc)
    elr: 00000000fff10340 lr : 00000000ffef8f50
    x0 : 0000000000000002 x1 : 0000000000000000
    x2 : 000000000000000a x3 : 0000000002800000
    x4 : 0000000002800000 x5 : 00000000fde8808c
    x6 : 0000000000000039 x7 : 00000000fde88520
    x8 : 0000000000000001 x9 : 0000000000000008
    x10: 00000000ffffffd8 x11: 0000000000000006
    x12: 000000000001869f x13: 00000000fde887e8
    x14: 00000000fde888f0 x15: 0000000000000002
    x16: 00000000fff3da98 x17: 0000000000000000
    x18: 00000000fde99db0 x19: 0000000000000002
    x20: 0000000000000000 x21: 0000000000000000
    x22: 0000000000000000 x23: 00000000ffffffed
    x24: 0000000000000001 x25: 00000000017d7840
    x26: 00000000fffe3000 x27: 0000000000000000
    x28: 00000000fdea45a0 x29: 00000000fde88580
    
    Code: aa1303e0 f9400bf3 a8c27bfd d65f03c0 (f9402413) 
    Resetting CPU ...
    
    resetting ...
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024
    NOTICE:  Upgrade Firmwares for Power off functionality
    ERROR:   Failed to get response (-19)
    ERROR:   Transfer send failed (-19)
    ERROR:   Unable to query firmware capabilities (-19)
    
    U-Boot SPL 2023.04-gccfe6113 (Oct 09 2024 - 11:56:30 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--w2023.01-j722s (Kool Koa')
    Trying to boot from SPI
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-g7d05009917 (Feb 15 2024 - 18:08:11 +0000)
    
    SoC:   J722S SR1.0 HS-FS
    Model: Texas Instruments J722S EVM
    Board: J722SX-EVM rev E2
    DRAM:  2 GiB (effective 8 GiB)
    Core:  70 devices, 27 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   
    Warning: ethernet@8000000port@1 (eth0) using random MAC address - a2:95:c2:72:ec:65
    eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0

    Can you tell me how to do this.

    Regards,

    Tarun C

  • Hi Keerthy,

    dip switch settings I'm using is for ospi-nor flash only.

    BOOTMODE [ 8 : 15 ] (SW4) = 0100 0000
    BOOTMODE [ 0 : 7 ] (SW3) = 1100 1110
    BOOTMODE [ 0 : 7 ] (SW2) = 0XXX XXXX
    I'm booting from ospi-nor flash itself. But if I run sf probe in u-boot terminal I get the error attached in previous message.
    Regards, 
    Tarun C
  • Hi Vishal,

    Then make sure that you have integrated the patch with the U-boot that is working for you already. You are able to flash with the changes that i suggested & that means sf probe worked.

    I followed the link, and able to get U-Boot prompt from NOR Boot.

     I believe here the sf probe should have worked to flash binaries to NOR.

    - Keerthy

  • Hi Keerthy,

    I've flashed binaries to NOR flash and able to get into u-boot terminal of SPI-NOR flash.

    sf probe is working in u-boot terminal of sdcard but not in u-boot terminal of spi-nor flash.

    My use case is to load linux Image from NOR flash to RAM.

    My use case is this.

    Can you please tell me the issue.

    Regards,

    Tarun C

  • I've flashed binaries to NOR flash and able to get into u-boot terminal of SPI-NOR flash.

    sf probe is working in u-boot terminal of sdcard but not in u-boot terminal of spi-nor flash.

    Can you make sure that you reflash the working binaries in SD card to the NOR flash?

    Basically same binaries cannot behave differently in different boot modes w.r.t sf probe

    Dip switch settings for NOR:

    BOOTMODE [ 8 : 15 ] (SW4) = 0100 0000
    BOOTMODE [ 0 : 7 ] (SW3) = 1100 1110
    BOOTMODE [ 0 : 7 ] (SW2) = 0XXX XXXX
    make sure SW Boot mode 0 is set to 0.
    - Keerthy
  • Hello Keerthy,

    I updated and reflashed the working binaries. Now I'm able to boot into u-boot terminal.

    Thank You

    Regards,

    Tarun C