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-J721E: J721E TDA4/DRA8 SoM PCIe Endpoint setup booting from rebuilt kernel fails

Part Number: PROCESSOR-SDK-J721E


Hi, 

I am setting up my EVM to function as an endpoint following the Linux SDK (I'm using SDK 8.0), but I've ran into some issues. 

1. When inputting 

ls /sys/class/pci_epc/
on the EVM, I don't see the output "2900000.pcie-ep". This becomes a problem later on when I try to bind the test device to EP controller:
root@j7-evm:/sys/kernel/config/pci_ep# ln -s functions/pci_epf_test/func1 controllers/2900000.pcie-ep/

2. I modified the DTS file based on instructions in 7.x SDK (5.4 Kernel) subsection and rebuilt the kernel and copied the files according to instructions in 3.2.1 of SDK. (I did not modify the driver configuration variables necessary to be enabled for EP, since by default they were all set to =y). However, when booting the EVM with the new Image and dtb files copied to rootfs/boot, the following error shows up:

Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 20:59:06

Press CTRL-A Z for help on special keys


U-Boot SPL 2021.01-g53e79d0e89 (Aug 04 2021 - 23:32:00 +0000)
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E8
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
Trying to boot from MMC2
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.5(release):08.00.00.004-dirty
NOTICE:  BL31: Built : 22:30:09, Aug  4 2021

U-Boot SPL 2021.01-g53e79d0e89 (Aug 04 2021 - 22:33:28 +0000)
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E8
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')                    
Detected: J7X-BASE-CPB rev E3                                                             
Detected: J7X-VSC8514-ETH rev E2                                                          
Trying to boot from MMC2                                                                  
                                                                                          
                                                                                          
U-Boot 2021.01-g53e79d0e89 (Aug 04 2021 - 22:33:28 +0000)                                 
                                                                                          
SoC:   J721E SR1.0                                                                        
Model: Texas Instruments K3 J721E SoC                                                     
Board: J721EX-PM2-SOM rev E8                                                              
DRAM:  4 GiB                                                                              
Flash: 0 Bytes                                                                            
MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1                                                 
In:    serial@2800000                                                                     
Out:   serial@2800000                                                                     
Err:   serial@2800000                                                                     
Detected: J7X-BASE-CPB rev E3                                                             
Detected: J7X-VSC8514-ETH rev E2                                                          
Net:   am65_cpsw_nuss_slave ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x0
eth0: ethernet@46000000                                                                   
Hit any key to stop autoboot:  0                                                          
switch to partitions #0, OK                                                               
mmc1 is current device                                                                    
SD/MMC found on device 1                                                                  
Failed to load 'boot.scr'                                                                 
483 bytes read in 7 ms (67.4 KiB/s)                                                       
Loaded env from uEnv.txt                                                                  
Importing environment from mmc1 ...                                                       
Running uenvcmd ...                                                                       
1 bytes read in 9 ms (0 Bytes/s)                                                          
Already setup.                                                                            
k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work               
k3_r5f_rproc r5f@41400000: Core 2 is already in use. No rproc commands work               
2555068 bytes read in 120 ms (20.3 MiB/s)                                                 
Load Remote Processor 2 with data@addr=0x82000000 2555068 bytes: Success!                 
506776 bytes read in 36 ms (13.4 MiB/s)                                                   
Load Remote Processor 3 with data@addr=0x82000000 506776 bytes: Success!                  
Failed to load '/lib/firmware/j7-main-r5f1_0-fw'                                          
Failed to load '/lib/firmware/j7-main-r5f1_1-fw'                                          
1579120 bytes read in 77 ms (19.6 MiB/s)                                                  
Load Remote Processor 6 with data@addr=0x82000000 1579120 bytes: Success!                 
1579120 bytes read in 80 ms (18.8 MiB/s)                                                  
Load Remote Processor 7 with data@addr=0x82000000 1579120 bytes: Success!                 
10399672 bytes read in 444 ms (22.3 MiB/s)                                                
Load Remote Processor 8 with data@addr=0x82000000 10399672 bytes: Success!                
19137024 bytes read in 780 ms (23.4 MiB/s)                                                
73284 bytes read in 15 ms (4.7 MiB/s)                                                     
10737 bytes read in 13 ms (805.7 KiB/s)                                                   
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND                                           
base fdt does did not have a /__symbols__ node                                            
make sure you've compiled with -@                                                         
ERROR: Did not find a cmdline Flattened Device Tree                                       
Could not find a valid device tree                                                        
=> 

I tried resetting the environment, didn't work. I found a few posts with similar issues, but they're not exactly matching my EVM/issue, so I'm hoping the TI team can give me some feedback/advice on how to address these 2 problems. 

Thanks in advance.

  • Hi Michelle,

    What command did you use to build your dtbs? The above error is caused because the built dtb is missing the __symbols__ node as the error suggests, and this node is needed for cross-referencing nodes when applying overlays..

    regards

    Suman 

  • Hi Suman,

    I tried 

    make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- dtbs
    
    . When that didn't work, I tried to built only the J721E specific file: 
    make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ti/k3-j721e-common-proc-board.dtb
    

    Between each Kernel rebuild I also cleaned with 

    make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- distclean
    .

  • Hi Michelle,

    That is a very strange error, and should not have happened at all. 

    The arch/arm64/boot/dts/ti/Makefile does have the following line, which enables the dtbs to be built with symbols.

    DTC_FLAGS += -@

    Please ensure this line is not deleted somehow in your build.

    You can also generate back the dts file from the built dtb using the following command and check for the _symbols_ node (should be at the very bottom of the file).

    dtc -I dtb -O dts <k3-j721e-common-proc-board.dtb> -o <output.dts>

    Also, note that if you are using the Alpha EVM, the right dtb is k3-j721e-proc-board-tps65917.dtb.

    regards

    Suman

  • Hi Suman,

    Yes, "DTC_FLAGS += -@" is present as the first line in the Makefile. And I do not have a "Interim PMIC" sticker, so I'm assuming I have a beta board.

    I tried that command in the directory where k3-j721e-common-proc-board.dtb is located, and opened the output.dts to check the very end of the file. I don't see a "_symbols_node". Should I just type that in into the k3-j721e-common-proc-board.dts and rebuild the dts files?

    Also, do you have suggestions on how I could address the problem in my first question in the original post?

    Thanks!

  • Hi Michelle,

    So, you are building the kernel after changing to the the board-support/<linux> folder? Do you see a difference if building from SDK level using make linux-dtbs?

    Also, can you provide the output of dtc --version?

    regards

    Suman

  • Hi,

    Yes, I am building in the board-support/linux directory.

    Version is 1.4.5

    I did make linux-dtbs at SDK top level and EVM boots up correctly now. My first problem with ls /sys/class/pci_epc/ not listing anything also seems to be resolved now since 2900000.pcie-ep shows up.

    Thank you!