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.

SK-AM62: Symbolic Links in /lib/firmware Not Populated when Building Custom Arago Linux Kernel

Part Number: SK-AM62

Hello,

This post is related to the following two posts:

Post 1

Post 2

Below is the method used to build a custom Arago Linux Kernel:

export PATH=/home/username/ti/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

cd /home/username/ti/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- mrproper

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- tisdk_am62xx-evm_defconfig

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- menuconfig

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image

make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ti/k3-am625-sk.dtb

cd /home/username/ti/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16

sudo cp arch/arm64/boot/Image /media/username/rootfs/boot

sudo cp arch/arm64/boot/dts/ti/k3-am625-sk.dtb /media/username/rootfs/boot

sudo make ARCH=arm64 INSTALL_MOD_PATH=/media/username/rootfs modules_install

The custom kernel boots up without issue but when attempting to run/debug the freertos and nortos simple Hello World example on the BLAZAR_Cortex_M4F_1 the following error is received:

BLAZAR_Cortex_M4F_1: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.10.0.00080) 

I suspect  the issue could be related to some symbolic links on the target in /lib/firmware that are not populated like they are in the Ti provided Linux "default-image".

root@am62xx-evm:~# cd /lib/firmware/
root@am62xx-evm:/lib/firmware# ls -al
total 46724
drwxr-xr-x  7 root root    4096 Jun 17  2022 .
drwxr-xr-x 10 root root    4096 May 17 13:31 ..
-rw-r--r--  1 root root    2040 May 17 11:52 LICENCE.ibt_firmware
-rw-r--r--  1 root root    2046 May 17 11:52 LICENCE.iwlwifi_firmware
lrwxrwxrwx  1 root root      63 May 17 13:32 am62-main-r5f0_0-fw -> /lib/firmware/pdk-ipc/ipc_echo_testb_mcu1_0_release_strip.xer5f
lrwxrwxrwx  1 root root      72 Jun 17  2022 am62-mcu-m4f0_0-fw -> /lib/firmware/pdk-ipc/ipc_echo_baremetal_test_mcu2_0_release_strip.xer5f
lrwxrwxrwx  1 root root      47 May 17 13:32 am62x-pru0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt0.out
lrwxrwxrwx  1 root root      47 May 17 13:32 am62x-pru1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1.out

On my SK-AM62 target the /lib/firmware/ directory is not populated.

Are the symbolic links in /lib/firmware/ auto generated during the Linux build process or did someone at Ti manually add them?

In other words how are those links created?

Kindly,

Graham

  • Hello Graham,

    With your custom kernel boot on the board, please share the output of the following commands.

    dmesg | grep remoteproc

    ls -l /lib/firmware

    The above commands will help me in understanding the status of Remote Cores and the directory /lib/firmware with your custom kernel boot.

     Regards,

    Prashant

  • Thank you Prashant,

    I accidentally selected Issue Resolved.

    Here is the output:

    Arago Project am62xx-evm /dev/ttyS2
    
    Arago 2021.09 am62xx-evm /dev/ttyS2
    
    am62xx-evm login: root 
    root@am62xx-evm:~# dmesg | grep remoteproc
    [    3.192890] remoteproc remoteproc0: 78000000.r5f is available
    [    3.199173] remoteproc remoteproc0: attaching to 78000000.r5f
    [    3.212462]  remoteproc0#vdev0buffer: assigned reserved memory node r5f-dma-memory@9da00000
    [    3.221079]  remoteproc0#vdev0buffer: registered virtio0 (type 7)
    [    3.237376] remoteproc remoteproc0: remote processor 78000000.r5f is now attached
    [    3.247372] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [    3.267887] remoteproc remoteproc1: 5000000.m4fss is available
    [    3.284502] remoteproc remoteproc1: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    [    3.294726] remoteproc remoteproc1: powering up 5000000.m4fss
    [    3.301924] remoteproc remoteproc1: Direct firmware load for am62-mcu-m4f0_0-fw failed with error -2
    [    3.314483] remoteproc remoteproc1: request_firmware failed: -2
    [    3.836841] remoteproc remoteproc2: 30074000.pru is available
    [    3.854427] remoteproc remoteproc3: 30078000.pru is available
    root@am62xx-evm:~# ls -l /lib/firmware
    drwxr-xr-x    2 root     root          4096 Dec 14 11:52 ti-sysfw
    root@am62xx-evm:~# 

    Be well,

    Graham

  • Hello Graham,

    In your response above, you talk about how you are building the kernel. But the issue you are seeing is that /lib/firmware is not showing up in the Linux file system, which is different from the kernel. How are you building your filesystem?

    Regards,

    Nick

  • Hi Nick,

    I reused the filesystem from the tisdk-default-image-am62xx-evm.wic image that was on the SD Card.  I only replaced the existing ti default Linux kernel with a custom kernel.

    Be well,

    Graham

  • Hello Graham,

    Something is wrong with your filesystem then. Please re-create the SD card, and make sure you use tisdk-default-image, NOT the base image. The base image strips out "extra" stuff, including firmware in /lib/firmware directory. Reference https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_05_00_21/exports/docs/linux/Foundational_Components_Filesystem.html 

    Before you make ANY changes to the SD card, boot it on an EVM. Verify that the /lib/firmware folder is in the filesystem, and go through our "booting remote cores" training in the Linux Academy: https://dev.ti.com/tirex/explore/node?node=A__AISILbMWZ4d84U2oSmXcdA__linux_academy_am62x__XaWts8R__LATEST

    If you rebuild the kernel and devicetree files and place them onto the SD card, they should not overwrite the contents of /lib/firmware.

    Regards,

    Nick