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.

PROCESSOR-SDK-J722S: Unable to boot Linux from emmc(J722S EVM)

Part Number: PROCESSOR-SDK-J722S


Unable to boot Linux from emmc(J722S EVM)

I have been following the Processor SDK Linux for J722S 09_02_00 Guide for booting Linux from emmc.

Steps followed
-> SD card is prepared to boot

-> Enter in Uboot
-> 2 partitions created (BOOT & rootfs) in emmc

-> below steps followed from the Guide section 3.1.1.5.5. Booting tiboot3.bin, tispl.bin and u-boot.img from eMMC boot partition (For K3 class of SoCs)


(used the prebuilt images from SDK)
=> mmc dev 0 1
=> fatload mmc 1 ${loadaddr} tiboot3.bin
=> mmc write ${loadaddr} 0x0 0x400
=> fatload mmc 1 ${loadaddr} tispl.bin
=> mmc write ${loadaddr} 0x400 0x1000
=> fatload mmc 1 ${loadaddr} u-boot.img
=> mmc write ${loadaddr} 0x1400 0x2000
=> mmc partconf 0 1 1 1
=> mmc bootbus 0 2 0 0

-> tisdk-tiny-image.img is written to rootfs partition

-> dip switches changed to boot from emmc.

I got the following error on the 3rd UART. as not able to find the 2nd partition. if I insert SD card with the same setting for emmc boot then it boots properly by taking the rootfs from SD card.

Then i try to replace the tiboot3.bin with the sbl_emmc_hlos.release.hs_fs.tiimage then I am not able to boot anything. I am getting an error in 1st UART as below

Can you please help to solve the error? am I using the wrong SBL(tiboot3.bin)?

  • Hi Linto 

    There are two thing we are discussing here one is SBL boot flow and other is SPL (linux).

    Which one you want to use.

    You many need to change the environment variable in case of spl to boot to linux.

    Please check the response in one of the older thread and do let me know if you have any further question.

    Regards
    Diwakar

  • Hi Diwakar,

    My primary aim to boot Linux completely from emmc, Later I may need to combine the RTOS and linux. but forget about this. i just need to boot Linux now.

    So from your above comment, it means I don't need the SBL to boot Linux.

    then this section 3.1.1.5.5. in the guide is misleading.  can you please give the correct steps?

    Can I use the same spl and u-boot in the sd card to flash in emmc  to boot from emmc? 

    Thanks

    Linto

  • Hi Linto 

    then this section 3.1.1.5.5. in the guide is misleading.  can you please give the correct steps?

    The steps are correct , the above tiboot3.bin in linux is package of board config , tifs  and R5 spl.

    You can get these prebuild binary inside prebuild folder of the linux sdk (<linux_sdk>//board-support/prebuilt-images).

    Regards
    Diwakar

  • Hi Diwakar,

    I followed the previous thread you mentioned, i had progressed a littile bit. but now I have a different issue. its failed to load the kernal from rootfs. 

    my rootfs partition is number 2. does it matter ? or it has to be number 1 ?

    contents of rootfs/boot

    This is my partition map

  • Hi Diwakar

    i am able to boot the linux now by following the steps in the ticket. we can close this ticket.

    e2e.ti.com/.../3330218

  • I encounter the same issue, I would suggest BU team update the uboot parameter for each boot mode accordingly. 

    [2024-06-18 13:21:32.900] 
    [2024-06-18 13:21:32.900] U-Boot 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    [2024-06-18 13:21:32.919] 
    [2024-06-18 13:21:32.919] SoC:   J722S SR1.0 HS-FS
    [2024-06-18 13:21:32.919] Model: Texas Instruments J722S EVM
    [2024-06-18 13:21:32.997] Board: J722SX-EVM rev E2
    [2024-06-18 13:21:32.997] DRAM:  2 GiB (effective 8 GiB)
    [2024-06-18 13:21:33.542] Core:  70 devices, 27 uclasses, devicetree: separate
    [2024-06-18 13:21:33.542] MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    [2024-06-18 13:21:33.557] Loading Environment from nowhere... OK
    [2024-06-18 13:21:33.557] In:    serial@2800000
    [2024-06-18 13:21:33.557] Out:   serial@2800000
    [2024-06-18 13:21:33.573] Err:   serial@2800000
    [2024-06-18 13:21:33.573] Net:   
    [2024-06-18 13:21:33.589] Warning: ethernet@8000000port@1 (eth0) using random MAC address - 3e:b9:c4:c9:a5:4c
    [2024-06-18 13:21:33.589] eth0: ethernet@8000000port@1
    [2024-06-18 13:21:33.589] Hit any key to stop autoboot:  2  1  0 
    [2024-06-18 13:21:37.605] MMC: no card present
    [2024-06-18 13:21:37.700] SD/MMC found on device 1
    [2024-06-18 13:21:39.702] MMC: no card present
    [2024-06-18 13:21:39.702] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:39.702] Couldn't find partition mmc 1
    [2024-06-18 13:21:39.702] Can't set block device
    [2024-06-18 13:21:41.714] MMC: no card present
    [2024-06-18 13:21:41.716] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:41.716] Couldn't find partition mmc 1
    [2024-06-18 13:21:41.716] Can't set block device
    [2024-06-18 13:21:43.719] MMC: no card present
    [2024-06-18 13:21:43.719] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:43.719] ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    [2024-06-18 13:21:45.733] MMC: no card present
    [2024-06-18 13:21:45.733] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:45.733] Couldn't find partition mmc 1:2
    [2024-06-18 13:21:45.733] Can't set block device
    [2024-06-18 13:21:47.752] MMC: no card present
    [2024-06-18 13:21:47.752] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:47.752] Couldn't find partition mmc 1:2
    [2024-06-18 13:21:47.752] Can't set block device
    [2024-06-18 13:21:47.752] libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    [2024-06-18 13:21:47.752] No FDT memory address configured. Please configure
    [2024-06-18 13:21:47.764] the FDT address via "fdt addr <address>" command.
    [2024-06-18 13:21:47.764] Aborting!
    [2024-06-18 13:21:47.764] Bad Linux ARM64 Image magic!
    [2024-06-18 13:21:47.876] switch to partitions #0, OK
    [2024-06-18 13:21:47.876] mmc0(part 0) is current device
    [2024-06-18 13:21:49.877] MMC: no card present
    [2024-06-18 13:21:49.877] starting USB...
    [2024-06-18 13:21:49.877] No working controllers found
    [2024-06-18 13:21:49.877] USB is stopped. Please issue 'usb start' first.
    [2024-06-18 13:21:49.891] starting USB...
    [2024-06-18 13:21:49.891] No working controllers found
    [2024-06-18 13:21:49.891] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:49.907] BOOTP broadcast 1
    [2024-06-18 13:21:50.148] BOOTP broadcast 2
    [2024-06-18 13:21:50.663] BOOTP broadcast 3
    [2024-06-18 13:21:51.000] DHCP client bound to address 10.85.133.123 (1086 ms)
    [2024-06-18 13:21:51.000] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.000] Cannot autoload with TFTPGET
    [2024-06-18 13:21:51.000] missing environment variable: pxeuuid
    [2024-06-18 13:21:51.000] Retrieving file: pxelinux.cfg/01-3e-b9-c4-c9-a5-4c
    [2024-06-18 13:21:51.013] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.013] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.013] Retrieving file: pxelinux.cfg/0A55857B
    [2024-06-18 13:21:51.033] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.033] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.033] Retrieving file: pxelinux.cfg/0A55857
    [2024-06-18 13:21:51.045] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.045] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.045] Retrieving file: pxelinux.cfg/0A5585
    [2024-06-18 13:21:51.061] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.061] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.061] Retrieving file: pxelinux.cfg/0A558
    [2024-06-18 13:21:51.061] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.076] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.076] Retrieving file: pxelinux.cfg/0A55
    [2024-06-18 13:21:51.076] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.092] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.092] Retrieving file: pxelinux.cfg/0A5
    [2024-06-18 13:21:51.092] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.092] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.108] Retrieving file: pxelinux.cfg/0A
    [2024-06-18 13:21:51.108] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.108] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.108] Retrieving file: pxelinux.cfg/0
    [2024-06-18 13:21:51.123] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.123] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.123] Retrieving file: pxelinux.cfg/default-arm-k3-j722s
    [2024-06-18 13:21:51.140] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.140] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.140] Retrieving file: pxelinux.cfg/default-arm-k3
    [2024-06-18 13:21:51.157] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.157] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.157] Retrieving file: pxelinux.cfg/default-arm
    [2024-06-18 13:21:51.173] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.173] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.173] Retrieving file: pxelinux.cfg/default
    [2024-06-18 13:21:51.191] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.191] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.191] Config file not found
    [2024-06-18 13:21:51.191] starting USB...
    [2024-06-18 13:21:51.191] No working controllers found
    [2024-06-18 13:21:51.204] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.204] BOOTP broadcast 1
    [2024-06-18 13:21:51.286] DHCP client bound to address 10.85.133.123 (84 ms)
    [2024-06-18 13:21:51.286] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.301] Cannot autoload with TFTPGET
    [2024-06-18 13:21:51.301] link up on port 1, speed 1000, full duplex
    [2024-06-18 13:21:51.301] BOOTP broadcast 1
    [2024-06-18 13:21:51.413] DHCP client bound to address 10.85.133.123 (107 ms)
    [2024-06-18 13:21:51.413] *** ERROR: `serverip' not set
    [2024-06-18 13:21:51.413] Cannot autoload with TFTPGET
    [2024-06-18 13:21:51.413] => 

    need to => setenv bootpart 0:1 or => setenv bootpart 0:2 according to file system partition.

    [2024-06-18 13:17:51.028] => setenv bootpart 0:2
    [2024-06-18 13:18:00.513] => boot
    [2024-06-18 13:18:04.595] MMC: no card present
    [2024-06-18 13:18:04.686] SD/MMC found on device 1
    [2024-06-18 13:18:06.698] MMC: no card present
    [2024-06-18 13:18:06.698] ** Bad device specification mmc 1 **
    [2024-06-18 13:18:06.698] Couldn't find partition mmc 1
    [2024-06-18 13:18:06.698] Can't set block device
    [2024-06-18 13:18:08.694] MMC: no card present
    [2024-06-18 13:18:08.694] ** Bad device specification mmc 1 **
    [2024-06-18 13:18:08.721] Couldn't find partition mmc 1
    [2024-06-18 13:18:08.721] Can't set block device
    [2024-06-18 13:18:08.721] ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    [2024-06-18 13:18:08.822] 19376640 bytes read in 102 ms (181.2 MiB/s)
    [2024-06-18 13:18:08.867] 71313 bytes read in 32 ms (2.1 MiB/s)
    [2024-06-18 13:18:08.867] Working FDT set to 88000000
    [2024-06-18 13:18:08.883] ## Flattened Device Tree blob at 88000000
    [2024-06-18 13:18:08.883] Booting using the fdt blob at 0x88000000
    [2024-06-18 13:18:08.883] Working FDT set to 88000000
    [2024-06-18 13:18:08.928] Loading Device Tree to 000000008feeb000, end 000000008fffffff ... OK
    [2024-06-18 13:18:08.928] Working FDT set to 8feeb000
    [2024-06-18 13:18:08.949]
    [2024-06-18 13:18:08.949] Starting kernel ...

    The initial error is:

    [2024-06-18 13:21:33.589] eth0: ethernet@8000000port@1
    [2024-06-18 13:21:33.589] Hit any key to stop autoboot: 2 1 0
    [2024-06-18 13:21:37.605] MMC: no card present
    [2024-06-18 13:21:37.700] SD/MMC found on device 1
    [2024-06-18 13:21:39.702] MMC: no card present
    [2024-06-18 13:21:39.702] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:39.702] Couldn't find partition mmc 1
    [2024-06-18 13:21:39.702] Can't set block device
    [2024-06-18 13:21:41.714] MMC: no card present
    [2024-06-18 13:21:41.716] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:41.716] Couldn't find partition mmc 1
    [2024-06-18 13:21:41.716] Can't set block device
    [2024-06-18 13:21:43.719] MMC: no card present
    [2024-06-18 13:21:43.719] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:43.719] ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    [2024-06-18 13:21:45.733] MMC: no card present
    [2024-06-18 13:21:45.733] ** Bad device specification mmc 1 **
    [2024-06-18 13:21:45.733] Couldn't find partition mmc 1:2
    [2024-06-18 13:21:45.733] Can't set block device
    [2024-06-18 13:21:47.752] MMC: no card present

    The parameter always search filesystem from mmc1, not according to boot mode. 

  • Hi Tony 

    Once the UBOOT comes up now its upto the customer from which interface they want to get the rootfs.

    There may be the case customer are using sd boot mode but they want to have the root file system using nfs.

    So it is the responsibility of the customer to configure them accordingly.

    Regards
    Diwakar

  • Hi Diwakar,

    I agree, but the saveenv is not available in current UBOOT, it is not convenient. 

    followed the instruction in this post, updated board/ti/j722s/j722s.env  and rebuild uboot solved the problem.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1374604/processor-sdk-am62a-save-environment-var-in-uboot-for-emmc-booting

  • Hi Tony 

    I agree, but the saveenv is not available in current UBOOT, it is not convenient. 

    We need to use uEnv.txt t configure the environment variable.

    If you still want to enable the saveenv functionality you need to revert the patch as mentioned in one of the older thread.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1215936/tda4al-q1-there-is-no-saveenv-boot-cmd/4594082#4594082

    Regards
    Diwakar

  • Hi Diwakar,

    Where to store the uEnv.txt in eMMC boot RAW mode?

  • Hi Tony,

    In Raw boot mode it is not possible then we may need to revert the patch and use the saveenv.

    Regards
    Diwakar