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.
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.
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
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 .
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 CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y # BPF subsystem # CONFIG_BPF_SYSCALL is not set # CONFIG_BPF_JIT is not set # end of BPF subsystem # CONFIG_NETFILTER_XT_MATCH_BPF is not set # CONFIG_BPFILTER is not set # CONFIG_NET_CLS_BPF is not set # CONFIG_NET_ACT_BPF is not set # CONFIG_TEST_BPF is not set
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.
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.
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
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?
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 CONFIG_CGROUP_PIDS=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_HUGETLB=y @@ -28,6 +31,7 @@ CONFIG_CGROUP_BPF=y CONFIG_USER_NS=y CONFIG_SCHED_AUTOGROUP=y CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_THROTTLING=y CONFIG_KALLSYMS_ALL=y CONFIG_PROFILING=y CONFIG_KEXEC=y @@ -135,22 +139,33 @@ CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IPV6=m +CONFIG_IPVLAN=m CONFIG_NETFILTER=y CONFIG_BRIDGE_NETFILTER=m CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_TFTP=m CONFIG_NETFILTER_XT_MARK=m CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m CONFIG_NETFILTER_XT_TARGET_LOG=m CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_BPF=m CONFIG_IP_VS=m +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_NFCT=y CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_MANGLE=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_FILTER=m @@ -171,6 +186,7 @@ CONFIG_NET_SCH_TAPRIO=m CONFIG_NET_SCH_MQPRIO=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_CGROUP=m CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m @@ -198,6 +214,7 @@ CONFIG_NET_ACT_GATE=m CONFIG_HSR=m CONFIG_QRTR_SMD=m CONFIG_QRTR_TUN=m +CONFIG_CGROUP_NET_PRIO=y CONFIG_CAN=m CONFIG_BT=m CONFIG_BT_HIDP=m @@ -1573,7 +1590,12 @@ CONFIG_HTE_TEGRA194=y CONFIG_HTE_TEGRA194_TEST=m CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_VXLAN=m CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_FANOTIFY=y @@ -1598,6 +1620,8 @@ CONFIG_9P_FS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_SECURITY=y +CONFIG_SECURITY_SELINUX=y +CONFIG_SECURITY_APPARMOR=y CONFIG_CRYPTO_USER=y CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_ECHAINIV=y @@ -1628,6 +1652,11 @@ CONFIG_CRYPTO_DEV_HISI_HPRE=m CONFIG_CRYPTO_DEV_HISI_TRNG=m CONFIG_CRYPTO_DEV_SA2UL=m CONFIG_CRYPTO_DEV_TI_MCRC64=m +CONFIG_CRYPTO_SEQIV=m +CONFIG_XFRM=y +CONFIG_XFRM_USER=y +CONFIG_XFRM_ALGO=y +CONFIG_INET_ESP=y CONFIG_DMA_RESTRICTED_POOL=y CONFIG_CMA_SIZE_MBYTES=32 CONFIG_PRINTK_TIME=y
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
[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
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.
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 +CONFIG_CGROUP_BPF=y # HACK: Remove security features with real-time latency effects. # Unless you have aggressive latency goals you will most likely
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.
sudo make ARCH=arm64 INSTALL_HDR_PATH=/media/debashis/rootfs/usr/src/linux-headers-6.6.32-rt32-g66c58b6a4a36 headers_install
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/.
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/.
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:
/*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
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
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 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define STDC_HEADERS 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #include <ac_nonexistent.h> configure:14548: checking for ld used by g++ configure:14617: result: /usr/bin/ld configure:14624: checking if the linker (/usr/bin/ld) is GNU ld configure:14641: result: yes configure:14696: checking whether the g++ linker (/usr/bin/ld) supports shared libraries configure:15776: result: yes configure:15812: g++ -c -g -O2 conftest.cpp >&5 configure:15815: $? = 0 configure:16296: checking for g++ option to produce PIC configure:16305: result: -fPIC -DPIC configure:16313: checking if g++ PIC flag -fPIC -DPIC works configure:16332: g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5 configure:16336: $? = 0 configure:16350: result: yes configure:16373: checking if g++ static flag -static works configure:16403: result: yes configure:16415: checking if g++ supports -c -o file.o configure:16437: g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5 configure:16441: $? = 0 configure:16464: result: yes configure:16469: checking if g++ supports -c -o file.o configure:16518: result: yes configure:16548: checking whether the g++ linker (/usr/bin/ld) supports shared libraries configure:16591: result: yes configure:16734: checking dynamic linker characteristics configure:17495: result: GNU/Linux ld.so configure:17560: checking how to hardcode library paths into programs configure:17585: result: immediate configure:17651: checking whether to build kernel modules configure:17675: result: yes configure:17721: checking for Linux kernel sources configure:17744: error: Failed to extract Linux kernel version!
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.