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.

Linux: PRU offload with AM572x IDK when booting from SDcard

Tool/software: Linux

I have AM572x IDK with SDk 04.00.00.04 image on SDard.

I would like to know how to set Uboot env variables for SDcard boot and PRU offload.

In "processors.wiki.ti.com/index.php/Processor_SDK_Linux_HSR_PRP_PRU_Offload" it is shown for NFS boot but I would like to know how to set PRU offload for SDcard boot.

Thanks, Chris

 

  • Hi Chris,

    The first step is to build the Linux kernel with CONFIG_HSR_PRP=y set in the dotconfig.
    On AM572x IDK, only PRU-ICSS2 is supported therefore you should set only pruss2_ethtype. For details:
    processors.wiki.ti.com/.../Processor_SDK_Linux_HSR_PRP
    Depending on your existing environment variables configuration you should set

    => setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype} prueth.pruss2_ethtype=${pruss2_ethtype}
    => setenv pruss2_ethtype 2
    => saveenv

    BR
    Tsvetolin Shulev
  • Thanks for your answer.

    Good I was asking: there is not any hint in the docu that I should set "CONFIG_HSR_PRP=y" and recompile the kernel!

    I was using the prebuilt image found here: "software-dl.ti.com/.../am57xx-evm-linux-rt-sdk-bin-04.00.00.04.tar.xz"

    After setting bootargs I'm getting this when typing "pri bootargs":

    bootargs=console=ttyO2,115200n8 root=PARTUUID= rw rootfstype=ext4 rootwait prueth.pruss2_ethtype=1

    Is this correct?

    Regarding "CONFIG_HSR_PRP=y": what I should I set y to for HSR?

    Thanks and Regards, Chris

  • Hi Chris,

    I agree we could make this more clear and explicit... generally the kconfig is mentioned here:
    processors.wiki.ti.com/.../Processor_SDK_Linux_HSR_PRP

    But I also thought this would be a default in latest release.
    Now the kernel config only enables general HSR/PRP support. So you should set this to 'y' always.
    The final option for selecting HSR or PRP is done through the prueth.pruss2_ethtype kernel parameter (be careful I think there are some typos on the wiki still).
    The table here shows the options:
    processors.wiki.ti.com/.../Processor_SDK_Linux_HSR_PRP

    Regards,
    Frank
  • Hello,

    The default image is built with HSR, PRP enabled. So no need to rebuild kernel if you are using pre-built images. Please review the documentation at wiki and it has details on some known issues when using SD card and work around available. With these, you should be able to test HSR/PRP.

    Regards,


    Murali Karicheri

  • Ok. Can you give me a more concrete hint on "details on some known issues when using SD card and work around available"?

    I set

    "bootargs=console=ttyO2,115200n8 root=PARTUUID= rw rootfstype=ext4 rootwait prueth.pruss2_ethtype=1" as suggested by Tsvetolin Shulev and it's still loading the wrong firmware into the PRUs

    Next hint :-)?

    Regards, Chris

  • Since bitmaps cannot be pasted: here the console output showing that the wrong Fw is loaded. Should be pruhsr, not prueth.

    [   13.828867] remoteproc remoteproc6: powering up 4b2b4000.pru0

    [   13.830294] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 4284

    [   13.830489] ti-pruss 4b280000.pruss: configured system_events = 0x0000060000500000 intr_channels = 0x00000095 host_intr = 0x00000115

    [   13.830497] remoteproc remoteproc6: remote processor 4b2b4000.pru0 is now up

    [   13.830532] net eth2: started

    [   13.830685] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready

    [   13.832591] prueth pruss2_eth eth2: Link is Up - 100Mbps/Full - flow control off

    [   13.832605] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready

    [   13.882406] remoteproc remoteproc7: powering up 4b2b8000.pru1

    [   13.883235] remoteproc remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 4316

    [   13.883406] ti-pruss 4b280000.pruss: configured system_events = 0x0060000000a00000 intr_channels = 0x0000012a host_intr = 0x0000022a

    [   13.883414] remoteproc remoteproc7: remote processor 4b2b8000.pru1 is now up

    [   13.884588] prueth pruss2_eth eth3: Link is Up - 100Mbps/Full - flow control off

  • Chris,

    can you also check/show the kernel log section with the boot args? I wonder if something overwrites the PRU config.
    Anyway I will try to run that too tomorrow using the default binary image...
    Regards,
    Frank
  • Hello Chris,

    Regarding known issues, please refer processors.wiki.ti.com/.../Processor_SDK_Linux_HSR_PRP

    The bootargs is clearly documented at processors.wiki.ti.com/.../Processor_SDK_Linux_HSR_PRP

    You need to set both parameters :

    Here is what I see in the document

    => setenv netargs 'setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp prueth.pruss1_ethtype=${pruss1_ethtype} prueth.pruss2_ethtype=${pruss2_ethtype}'
    => setenv pruss1_ethtype 1
    => setenv pruss2_ethtype 2
    => saveenv


    regards,

    Murali
  • Chris,

    you can see the applied boot args in the beginning of the kernel log.:

    [    0.000000] Kernel command line: console=ttyO2,115200n8 root=PARTUUID=e465781     6-02 rw rootfstype=ext4 rootwait

    You can show this using the 'dmesg' command.

    Regards,

  • Chris,
    I finally succeeded to load the correct PRU firmware. I can't further test as I have one IDK only right now.
    So here are the instructions that should work for you too:
    - burn binary SD card image of 4.0.0.4
    - enter into uBoot
    - enter following commands:
    - setenv args_mmc 'run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype} prueth.pruss2_ethtype=1'
    - saveenv
    - boot

    Observe the boot log.
    I found this:
    [ 14.965411] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru0-pruhsr-fw.elf, size 8442

    and this:
    --------------
    root@am57xx-evm:~# cat /sys/kernel/debug/
    48890000.usb/ dri/ mmc0/ pm_debug/ remoteproc/
    488d0000.usb/ extfrag/ mmc1/ pm_qos/ sched_features
    asoc/ fault_around_bytes omap_iommu/ prueth-hsr/ sleep_time
    bdi/ gpio omap_mux/ pwm ubi/
    bluetooth/ hid/ omapdss/ ras/ ubifs/
    clk/ iio/ opp/ regmap/ usb/
    dma_buf/ memblock/ pinctrl/ regulator/ virtio-ports/
    root@am57xx-evm:~# cat /sys/kernel/debug/prueth-hsr/
    dup_list_reside_max_time error_stats node_table
    duplicate_discard hsr_mode node_table_clear
    root@am57xx-evm:~# cat /sys/kernel/debug/prueth-hsr/node_table

    Remote nodes in network: 0
    ----------------
    For further tests I assume you need to check the known issues section too.

    Regards,