Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Rock-5b Kernel Config CONFIG_BPF_SYSCALL=y #40

Closed
StuartIanNaylor opened this issue Nov 18, 2022 · 6 comments
Closed

Rock-5b Kernel Config CONFIG_BPF_SYSCALL=y #40

StuartIanNaylor opened this issue Nov 18, 2022 · 6 comments

Comments

@StuartIanNaylor
Copy link

Struggling to get docker running on the debian image and from a google we seem to be missing the following.

iptables needs to be installed but also after install run

update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

I can do that but stuck as it would seem I need the kernel conf with CONFIG_BPF_SYSCALL=y
but we have

# CONFIG_BPF_SYSCALL is not set
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
# CONFIG_USERFAULTFD is not set
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y

Is it possible for the debian image to have kernel with CONFIG_BPF_SYSCALL=y ?

@milnepe
Copy link

milnepe commented Nov 19, 2022 via email

@StuartIanNaylor
Copy link
Author

StuartIanNaylor commented Nov 19, 2022

I will give that a go as only thing I have not done is add systemd.unified_cgroup_hierarchy=0
to the /boot/extlinux/extlinux.conf append line

Install iptables
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

/etc/sysctl.conf
net.ipv4.ip_forward = 1

reboot
install docker

rock@rock-5b:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
7050e35b49f5: Pull complete
Digest: sha256:faa03e786c97f07ef34423fccceeec2398ec8a5759259f94d99078f264e9d7af
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm64v8)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

@danielpuka
Copy link

danielpuka commented Dec 5, 2022

I applied the changes as proposed, but still getting the:

rock@rock-5b:~$ sudo docker run hello-world
[sudo] password for rock: 
docker: Error response from daemon: 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.
ERRO[0000] error waiting for container: context canceled 
rock@rock-5b:~$ 

@StuartIanNaylor
Copy link
Author

You need to do the changes reboot and reinstall Docker maybe.
Purger docker 1st
Reboot and reinstall as works no probs for me on several installs

@danielpuka
Copy link

danielpuka commented Dec 5, 2022

Tried the purge, the iptables, adding the extlinux.conf

rock@rock-5b:/boot/extlinux$ more extlinux.conf 
#timeout 10
#menu title select kernel

label kernel-5.10.66-27-rockchip-gea60d388902d
    kernel /vmlinuz-5.10.66-27-rockchip-gea60d388902d
    initrd /initrd.img-5.10.66-27-rockchip-gea60d388902d
    devicetreedir /dtbs/5.10.66-27-rockchip-gea60d388902d
    fdtoverlays  /dtbs/5.10.66-27-rockchip-gea60d388902d/rockchip/overlay/rk3588-uart7-m2.dtbo 
    append   root=UUID=29a94882-5add-4f09-8cc5-3f43918624fa earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty1 consoleblank=0 loglevel=0 panic=10 rootwait rw init=/sbin/init rootfstype=ext4 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 irqchip.gicv3_pseudo_nmi=0 switolb=1 coherent_pool=2M systemd.unified_cgroup_hiearchy=0

Still getting the BPF_CGROUP_DEVICE fail.

@StuartIanNaylor
Copy link
Author

Thats the only kernel label as dunno as apols but works for me guessing it something your side as standard Radxa image is no problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants