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-AM62P-LP: Error while docker run

Part Number: SK-AM62P-LP

Tool/software:

Hello TI,

We are using Am62p-lp borad,

Os- tisdk-debian-bookworm-rt-am62pxx-evm 09.02 version

we have successfully installed the docker in this version os.after that i try run helloworld example .while running i am encountering below error.

Fullscreen
1
2
3
root@am62pxx-evm:~# docker start 93ee7036c230
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown
Error: failed to start containers: 93ee7036c230
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

And i got to know that,BPF_CGROUP_DEVICE this flag also missing from /proc/config.gz and i am attaching log for your reference .

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@am62pxx-evm:~# zcat /proc/config.gz | grep CGROUP
CONFIG_CGROUPS=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
# CONFIG_BLK_CGROUP is not set
# CONFIG_CGROUP_SCHED is not set
# CONFIG_CGROUP_PIDS is not set
# CONFIG_CGROUP_RDMA is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_HUGETLB is not set
CONFIG_CGROUP_DEVICE=y
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set
CONFIG_NET_CLS_CGROUP=m
CONFIG_CGROUP_NET_PRIO=y
CONFIG_CGROUP_NET_CLASSID=y
root@am62pxx-evm:~# zcat /proc/config.gz | grep BPF
CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

i try to install docker in latest version of debian trixie,but while installing i encountered one error, it can not able to found the release file while ding apt-update. From below link.

docs.docker.com/.../

Thanks in advance,

BR,

RAJ.

  • Hi,

    Docker should be already supported in the SDK. Let me check on this tomorrow and get back to you.

  • Hi Bin Liu,

    we tried before also in debian image,at the time we faced issues while installing .you can refer this thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1390261/tmds64evm-docker-error-related-to-kernel-build/5365218?tisearch=e2e-sitesearch&keymatch=%25252520user%2525253A597546#5365218

    In above thread,ti was created a issue record id SITSW-4864 . i verified from the release notes  of trixie,still it is there in known issues which are not resolved in the current debian release (if iam not wrong).

    BR,

    Raj.

  • Hi Raj,

    Thanks for providing the thread of the previous communication on this issue. I checked on the internal record SITSW-4864, it is not resolved in SDK10.0 due to other dependencies. I am checking with the dev team to see if it can be resolved in SDK10.1.

    Meanwhile, I am trying to see if you can rebuild the kernel with corresponding kernel options enabled to get docker working - in the previous thread, it seems indicating the Docker does not only requires CONFIG_CGROUP_BPF=y, but also CONFIG_EXT4_FS_SECURITY=y and CONFIG_EXT3_FS_SECURITY=y. Have you tried to enable these options to see if these are the only missing kernel options?

  • Hi Bin,

    There are two things that we found,

    1.  I have installed docker in debian bookworm 09.02 (which is previous release). In this version all the above mentioned flags are enabled so we have successfully installed the docker and created the docker container however, we cannot start the docker due to the error as reported above.

    Fullscreen
    1
    2
    3
    root@am62pxx-evm:~# docker start 93ee7036c230
    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown
    Error: failed to start containers: 93ee7036c230
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2. In the lastest SDK release (debian trixie(v 10.0)), we are encountering an error related to release file ('docker release file not found') as mentioned in previous thread.

    Can you please provide steps on how to rebuild the kernel with required flags? Since we are blocked in both the ways any help would be really appreciated.

    Thank you.

    Raj.

  • Hi Raj,

    It seems still some kernel configs are missing in debian 09 and 10 for docker.

    Have you got docker fully working in Yocto based SDK10? If so, can take its /proc/config.gz and use it as .config for debian kernel to see it will make docker to work in debian?

  • Hi Bin,

    Have you got docker fully working in Yocto based SDK10?

    we are getting same error,while running the docker start in yocto based sdk.

    Can you please tell us ,when will be your neat release ?

  • The subject owner is currently out of office, please expect a response in the second half of this week.

  • Hi Raj,

    Can you please apply the patch below to SDK10 kernel to see if it enables all docker required options?

    arm64-configs-Enable-additional-docker-configs.diff
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
    index 7ffb46b74ae5..c37f18bddd38 100644
    --- a/arch/arm64/configs/defconfig
    +++ b/arch/arm64/configs/defconfig
    @@ -1,6 +1,7 @@
    CONFIG_SYSVIPC=y
    CONFIG_POSIX_MQUEUE=y
    CONFIG_AUDIT=y
    +CONFIG_DUMMY=m
    CONFIG_NO_HZ_IDLE=y
    CONFIG_HIGH_RES_TIMERS=y
    CONFIG_BPF_SYSCALL=y
    @@ -16,7 +17,9 @@ CONFIG_IKCONFIG=y
    CONFIG_IKCONFIG_PROC=y
    CONFIG_NUMA_BALANCING=y
    CONFIG_MEMCG=y
    +CONFIG_MEMCG_SWAP=y
    CONFIG_BLK_CGROUP=y
    +CONFIG_CFS_BANDWIDTH=y
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Bin Liu,

    We have tried and docker is successfully working fine
    Thankyou for your support but we need some help in ethercat installation because we change the kernel now version magic error we are getting in kernel level print

    Fullscreen
    1
    2
    3
    4
    5
    [64316.553416] ec_master: version magic '6.6.32-k3-rt SMP preempt_rt mod_unload aarch64' should be '6.6.32-rt32-g04a9ad081f0f-dirty SMP preempt_rt mod_unload aarch64'
    ------error from ethercat installation------
    ERROR: could not insert 'ec_master': Exec format error failed
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    I followed these steps which is there in ti page
    https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62PX/10_00_07_04/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#id19

    i followed the kernel image and kernel modules installation.

    current kernel
    Linux am62pxx-evm 6.6.32-rt32-g04a9ad081f0f-dirty #1 SMP PREEMPT_RT Tue Oct 29 16:47:42 IST 2024 aarch64 GNU/Linux

    I thing we are missing the linux headers for this kernel version.

    But what i tried is, copied the old linux header(linux-headers-6.6.32-k3-rt) to updated kernel name in /usr/src

    linux-headers-6.6.32-rt32-g04a9ad081f0f-dirty

    Can you please help us with these this is our last blocker from the target


    Regards,
    Debashis


  • Hi Bin,

    Just a small add on. we have to change some flag in ti_rt.config also to avoid overwrite to these flag.
    Bin we are waiting for you replay as i said its the last blocker for us can you help us with.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    git diff kernel/configs/ti_rt.config
    diff --git a/kernel/configs/ti_rt.config b/kernel/configs/ti_rt.config
    index 334c6de72..daf7a5fb9 100644
    --- a/kernel/configs/ti_rt.config
    +++ b/kernel/configs/ti_rt.config
    @@ -88,8 +88,8 @@ CONFIG_PERF_EVENTS=n
    # profiling. This prevents users from loading eBPF programs
    # but BPF usage within the kernel should still work. Disabling
    # JIT compiler will slow down packet filtering.
    -CONFIG_BPF_SYSCALL=n
    -CONFIG_BPF_JIT=n
    +CONFIG_BPF_SYSCALL=y
    +CONFIG_BPF_JIT=y
    # Fine granularity IRQ time accounting is not needed on a
    # production system.
    @@ -169,7 +169,7 @@ CONFIG_CGROUP_HUGETLB=n
    CONFIG_CPUSETS=n
    CONFIG_CGROUP_CPUACCT=n
    CONFIG_CGROUP_PERF=n
    -CONFIG_CGROUP_BPF=n
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX




    Regards,
    Debashis

  • Hi Debashis,

    Thankyou for your support but we need some help in ethercat installation because we change the kernel now version magic error we are getting in kernel level print

    I am not familiar with EtherCAT, but it seems "ec_master" is a off-tree kernel module from EtherCAT package? Did you recompile the ec_master module after you recompiled the kernel?

  • Bin:

     I believe EC Master is an aconis technologies product. I had (+) Daolin Qiu's Profile - Daolin Qiu - TI E2E support forums check on this; I am also certain +) Thomas Leyrer's Profile - Thomas Leyrer - TI E2E support forums   in the Industrial Automation Lab in Germany knows acontis fairly well.

    fyi Jim

  • Jim, thanks for the details.

    The bottom line is that whenever the kernel is modified and recompiled, any off-tree kernel module should be recompiled too against this new kernel build, otherwise, the kernel module might failed to load, because of the kernel signature mismatch.

  • Hi Bin,
    You are correct we rebuild the ethercat and its successfully rebuild and ethercat.ko file also created but the problem is since I deleted the lib/modules for old kernel and paste the new kernel modules. while building ethercat it automatically creating the folder of old kernel name and pasting the ethercat folder into it. so after that i manually copy that folder inside the new kernel but even if its not working.

    Let me tell you one thing we not giving any path where to install ethercat but i should automatically take the current kernel.

    Can you tell me the steps where i can build the kernel image with same old kernel name.
    I am thing there are even if some dependencies are there with the old kernel and new.

    One last thing to add on we are using the same old linux-header(/usr/src/linux**) while ethercat install its taking the old header and building it.

    Regards,
    Debashis


  • Hi Debashis,

    EtherCAT is beyond my expertise. Please create a new e2e thread asking how to rebuild ec_master module when kernel was recompiled, the thread will be assigned to our EtherCAT expert for comments.

  • Hi Bin,

    EtherCAT is beyond my expertise. Please create a new e2e thread asking how to rebuild ec_master module when kernel was recompiled, the thread will be assigned to our EtherCAT expert for comments.

    Thanks for your suggestion.

    Can you tell one last thing how can i build the kernel with the same old kernel name.

    In this ethercat build thread also they are asking for it.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1432311/sk-am62p-lp-ethercat-build-error-in-new-kernel-build?tisearch=e2e-sitesearch&keymatch=%20user%3A571982#


    Regards,
    Debashis


  • Hi Bin,

    After reading some document i came to know that when we rebuild and kernel the linux headers are also required to but in our case we just copy the linux header from old kernel and renamed it.

    Can you tell me how can we get the headers for new kernel

    Regards,
    Debashis

  • Hi Bin,

    I have went through the Makefile of Linux source code and I found how to build Linux headers. Can you tell me is it the right process.

    Fullscreen
    1
    sudo make ARCH=arm64 INSTALL_HDR_PATH=/media/debashis/rootfs/usr/src/linux-headers-6.6.32-rt32-g66c58b6a4a36 headers_install
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Its only created the include folder rest all folder i copied from linux-source kernel code from ti after every thing is build.

    files and folders which are copied:
    Makefile  Module.symvers  arch  scripts  .config


    Is it the right process to generate the linux header for new build kernel ?

    Regards,
    Debashis

  • Hi Debashis,

    The kernel source code has the required header files. When you have the kernel source code, you don't need a separate kernel headers to compile any off-tree kernel modules, rather you just need to pass the kernel source code directory to the off-tree kernel module when compiling it.

    Using the cryptodev module in the Processor SDK Linux package as an example. Following is the cryptodev module Makefile taken from <SDK10.0>/board-support/extra-drivers/cryptodev-module-1.13+git/.

    3482.Makefile

    You can see line 30 is the following, which is to compile the cryptodev module.

            $(MAKE) $(KERNEL_MAKE_OPTS) modules

    $(KERNEL_MAKE_OPTS) is defined in line 6, which is

            KERNEL_MAKE_OPTS := -C $(KERNEL_DIR) M=$(CURDIR)

    The option "-C" indicates the variable $(KERNEL_DIR) pointing to the kernel source code.

    Now let's see how the SDK compile the cryptodev module. Following is the SDK makefile to cryptodev, it is taken from <SDK10.0>/makerules/.

    Makefile_cryptodev

    You can see line 5 is the following, which defines KERNEL_DIR to $(LINUXKERNEL_INSTALL_DIR) which is defined in the SDK global configuration pointing to the kernel source code.

            $(MAKE) -C $(CRYPTODEV_SRC_DIR) ARCH=$(ARCH) KERNEL_DIR=$(LINUXKERNEL_INSTALL_DIR)

  • Hi Bin,
    Let me tell you the full steps what we followed to build , dump kernel and install ethercat.
    we are building ethercat on running linux host system not in local system with cross compilation tools

    download the ti-processor-sdk-linux-rt-am62pxx-evm-10.00.07.04-Linux-x86-Install.bin form webpage

    commands to build kernel what we followed is:

     

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    /*After the respective changes for kernel related flags*/
    make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" defconfig ti_arm64_prune.config ti_rt.config
    make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" Image
    make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" modules
    sudo cp arch/arm64/boot/Image /media/rootfs/boot
    sudo make ARCH=arm64 INSTALL_MOD_PATH=/media/rootfs modules_install
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    After copying the image and modules we required linux-header for the updated kernel. so for that I compared the files with an existing Linux header folder and copied the same structure from the Linux RT SDK to the SD card.

    for that I use this headers_install command and copy the rest file which is required in linux header

    Then I boot the sdcard and try to install ethercat in Linux host

    Is this the correct steps what I followed?
    Please let me know if my understanding is Wroge somewhere?


    Regards,
    Debashis

  • Hi Debashis,

    I never did compiling a kernel module on a running ARM Linux, but always used cross-compile. But I found the following kernel documentation, which tells the kernel headers are for Linux user space program, not off-tree kernel modules.

    https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt

    Ethercat is out of my support scope, so I don't know why it doesn't support cross-compile (or it does, you just didn't use it).

  • Hi Bin,

    Thanks for your reply. After following these steps the linux version magic issue is solved but now its showing 

    configure: error: Failed to extract Linux kernel version!

    You can tell me if you have some idea about it.

    i checked config.log

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    configure:14350: result: g++ -E
    configure:14364: g++ -E conftest.cpp
    configure:14364: $? = 0
    configure:14380: g++ -E conftest.cpp
    conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory
    23 | #include <ac_nonexistent.h>
    | ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    configure:14380: $? = 1
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "ethercat"
    | #define PACKAGE_TARNAME "ethercat"
    | #define PACKAGE_VERSION "1.5.3"
    | #define PACKAGE_STRING "ethercat 1.5.3"
    | #define PACKAGE_BUGREPORT "fp@igh.de"
    | #define PACKAGE_URL ""
    | #define PACKAGE "ethercat"
    | #define VERSION "1.5.3"
    | #define HAVE_STDIO_H 1
    | #define HAVE_STDLIB_H 1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



    Regards,
    Debashis

  • Sorry Debashis, this is part of the Ethercat configure implementation, I am not sure what happened or how to solve it.

  • Bin:  igh is an implementation of an EtherCAT master (see  docs.etherlab.org/.../index.html   ) The fp@igh.de in line 16 leads to that vendor. (aka  Florian Pose, Ingenieurgemeinschaft IgH)  Maybe you should forward info to  +) Thomas Leyrer's Profile - Thomas Leyrer - TI E2E support forums   in the Industrial Automation Lab in Germany as he might be able to assist?

    Jim

  • Jim, thanks for the pointer.

    Debashis already has a separate e2e thread about the ec_master compile issue. The issue will be taken care of there.

  • Thanks Bin, I see the confusion between the EtherCAT master IP suppliers & I see Daolin Qiu is assigned to that e2e.