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: Inquiry Regarding taskset -c Option and Adding stress-ng, cyclictest to Rootfs in tisdk-base-image

Part Number: SK-AM62

Dear Support Team,

I have followed the instructions in TI docs (https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#processor-sdk-build-reference) and successfully compiled the tisdk-base-image. This image has been burned onto an SD card and boots as expected.

However, I have encountered an issue with the taskset utility in the root filesystem. It appears that the -c option is not available in the taskset program. Could you advise on how to configure taskset to support the -c option?

Additionally, I am looking to include stress-ng and cyclictest utilities in the root filesystem.

Could you guide me on how to configure these additions?

Are there any example documents or references available that could assist me in this process?

Best regards,

zw

  • Can you run taskset --help and taskset --version ? I checked on a couple default filesystems and versions and the taskset we have prebuilt in the filesystem does have -c as an option?

    Stress-ng and cyclictest are open source programs, you can download and build from https://github.com/ColinIanKing/stress-ng or https://github.com/jlelli/rt-tests/tree/master/src/cyclictest . Or just copy them over from the default sdk filesystem .

      Pekka

  • hi Pekka,

    I'm using the tisdk-base-image. Upon checking the version of the `taskset` command, it indeed lacks the `-c` option. How can I enable the `-c` option during compilation?

    root@am62xx-evm:~# taskset --help
    BusyBox v1.31.1 (2023-11-20 05:57:22 UTC) multi-call binary.
    
    Usage: taskset [-p] [HEXMASK] PID | PROG ARGS
    root@am62xx-evm:~# taskset --version
    taskset: unrecognized option '--version'
    BusyBox v1.31.1 (2023-11-20 05:57:22 UTC) multi-call binary.
    
    Usage: taskset [-p] [HEXMASK] PID | PROG ARGS
    root@am62xx-evm:~# uname -a
    Linux am62xx-evm 5.10.168-rt83-gc1a1291911 #1 SMP PREEMPT_RT Tue Nov 21 03:51:59 UTC 2023 aarch64 GNU/Linux

  • Looks like you are running a shell and filesystem that does not include the taskset command, but uses busybox (a minimal shell that includes highly simplified versions of many commands). You'd expect to see something like (this is AM64x default file system SDK 9.0 ):

    root@am64xx-evm:~# taskset --version
    taskset from util-linux 2.37.4
    root@am64xx-evm:~# 
    root@am64xx-evm:~# taskset --help   
    Usage: taskset [options] [mask | cpu-list] [pid|cmd [args...]]
    
    
    Show or change the CPU affinity of a process.
    
    Options:
     -a, --all-tasks         operate on all the tasks (threads) for a given pid
     -p, --pid               operate on existing given pid
     -c, --cpu-list          display and specify cpus in list format
     -h, --help              display this help
     -V, --version           display version
    
    The default behavior is to run a new command:
        taskset 03 sshd -b 1024
    You can retrieve the mask of an existing task:
        taskset -p 700
    Or set it:
        taskset -p 03 700
    List format uses a comma-separated list instead of a mask:
        taskset -pc 0,3,7-11 700
    Ranges in list format can take a stride argument:
        e.g. 0-31:2 is equivalent to mask 0x55555555
    
    For more details see taskset(1).
    root@am64xx-evm:~# 
    

    Either move to the default image, or copy over /usr/bin/taskset from defualt filesystem to your filesystem.

  • Hello Pekka,

    In our actual project, we can't use the default image because it's too large. I have compiled the tisdk-base-image using Yocto, and what I would like to know is how to modify the Yocto project configuration so that the root filesystem uses the `taskset` tool from the util-linux package, instead of the version provided by busybox, after the compilation is completed.

  • Short term evaluation, I'd suggest to just open the default filesystem and copy the files/application binaries you need from default to base image of the same SDK.

    Longer term add anything you what using Yocto configuration. See for example https://e2e.ti.com/support/processors-group/processors/f/processors-forum/940019/processor-sdk-am57x-adding-package-to-rootfs-image .

      Pekka