Hi @Filippo-GEG
docker-compose.yml is used for debug as well as for release mode.
I give you the docker-compose.yml file of my repo : GitHub - FLepron-PoolCop/AvaloniaUITheSeriesFBDRM which uses FB.
You can see that you have two configurations in the same file:
- one for debug : avalonia-ui-the-series-fb-drm-debug
- another one for release : avalonia-ui-the-series-fb-drm
This is the same story for Dockerfile.debug and Dockerfile.
As you know, the docker-compose.yml file specify the resources you want to access to (device_cgroup_rules) and volumes binding.
version: "3.9"
services:
avalonia-ui-the-series-fb-drm-debug:
build:
context: .
dockerfile: Dockerfile.debug
image: ${LOCAL_REGISTRY}:5002/avalonia-ui-the-series-fb-drm:${TAG}
# Required to get udev events from host udevd via netlink
network_mode: host
volumes:
- type: bind
source: /tmp
target: /tmp
- type: bind
source: /dev
target: /dev
- type: bind
source: /run/udev
target: /run/udev
cap_add:
- CAP_SYS_TTY_CONFIG
# Add device access rights through cgroup...
device_cgroup_rules:
# ... for tty0
- "c 4:0 rmw"
# ... for tty7
- "c 4:7 rmw"
# ... for /dev/input devices
- "c 13:* rmw"
# ... for /dev/dri devices
- "c 226:* rmw"
- "c 199:* rmw"
# ... for /dev/fb0
- "c 29:* rmw"
avalonia-ui-the-series-fb-drm:
build:
context: .
dockerfile: Dockerfile
image: ${DOCKER_LOGIN}/avalonia-ui-the-series-fb-drm:${TAG}
# Required to get udev events from host udevd via netlink
network_mode: host
volumes:
- type: bind
source: /tmp
target: /tmp
- type: bind
source: /dev
target: /dev
- type: bind
source: /run/udev
target: /run/udev
cap_add:
- CAP_SYS_TTY_CONFIG
# Add device access rights through cgroup...
device_cgroup_rules:
# ... for tty0
- "c 4:0 rmw"
# ... for tty7
- "c 4:7 rmw"
# ... for /dev/input devices
- "c 13:* rmw"
# ... for /dev/dri devices
- "c 226:* rmw"
- "c 199:* rmw"
# ... for /dev/fb0
- "c 29:* rmw"
Have a look to linux/Documentation/admin-guide/devices.txt at master · torvalds/linux (github.com) to understand the device identifiers.
Just for information, In FB DRM, the mouse pointer is not visible on my side, while it is visible and operational in GTK MVVM.
It can work, but honestly I have not dug deeper since I have a touchscreen.
Process the command sudo tdx-info -d to see the device available on your board and thier identifiers.
In my case I have the following ones:
torizon@verdin-imx8mp-15229850:~$ sudo tdx-info -d
Password:
Devices
------------------------------------------------------------
All devices available:
total 0
crw-r--r-- 1 root root 10, 235 Jul 19 06:11 autofs
drwxr-xr-x 2 root root 620 Jul 19 13:36 block
crw------- 1 root root 10, 234 Jul 19 06:11 btrfs-control
drwxr-xr-x 3 root root 60 Jul 19 06:11 bus
crw------- 1 root root 10, 126 Jul 19 06:11 caam-keygen
drwxr-xr-x 2 root root 4.0K Jul 19 12:57 char
crw------- 1 root root 5, 1 Jul 19 06:11 console
crw------- 1 root root 10, 125 Jul 19 06:11 cpu_dma_latency
crw------- 1 root root 10, 203 Jul 19 06:11 cuse
drwxr-xr-x 7 root root 140 Jul 19 06:11 disk
drwxr-xr-x 2 root root 100 Jan 1 1970 dma_heap
drwxr-xr-x 3 root root 120 Jul 19 06:11 dri
lrwxrwxrwx 1 root root 7 Jul 19 13:36 emmc -> mmcblk2
lrwxrwxrwx 1 root root 12 Jul 19 06:11 emmc-boot0 -> mmcblk2boot0
lrwxrwxrwx 1 root root 12 Jul 19 06:11 emmc-boot1 -> mmcblk2boot1
lrwxrwxrwx 1 root root 9 Jul 19 13:36 emmc-part1 -> mmcblk2p1
crw-rw---- 1 root video 29, 0 Jul 19 06:11 fb0
lrwxrwxrwx 1 root root 13 Jul 19 06:11 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 Jul 19 06:11 full
crw-rw-rw- 1 root root 10, 229 Jul 19 06:11 fuse
crw-rw---- 1 root video 199, 0 Jul 19 06:11 galcore
crw-rw-r-- 1 root gpio 254, 0 Jul 19 06:11 gpiochip0
crw-rw-r-- 1 root gpio 254, 1 Jul 19 06:11 gpiochip1
crw-rw-r-- 1 root gpio 254, 2 Jul 19 06:11 gpiochip2
crw-rw-r-- 1 root gpio 254, 3 Jul 19 06:11 gpiochip3
crw-rw-r-- 1 root gpio 254, 4 Jul 19 06:11 gpiochip4
crw------- 1 root root 237, 0 Jul 19 12:57 hidraw0
crw------- 1 root root 237, 1 Jul 19 12:57 hidraw1
drwxr-xr-x 2 root root 0 Jul 19 06:11 hugepages
crw------- 1 root root 10, 183 Jul 19 06:11 hwrng
crw-rw-r-- 1 root i2cdev 89, 0 Jul 19 06:11 i2c-0
crw-rw-r-- 1 root i2cdev 89, 1 Jul 19 06:11 i2c-1
crw-rw-r-- 1 root i2cdev 89, 2 Jul 19 06:11 i2c-2
crw-rw-r-- 1 root i2cdev 89, 3 Jul 19 06:11 i2c-3
crw------- 1 root root 510, 0 Jul 19 06:11 iio:device0
lrwxrwxrwx 1 root root 12 Jul 19 06:11 initctl -> /run/initctl
drwxr-xr-x 4 root root 220 Jul 19 12:57 input
crw-r--r-- 1 root root 1, 11 Jul 19 06:11 kmsg
crw-rw-rw- 1 root kvm 10, 232 Jul 19 06:11 kvm
lrwxrwxrwx 1 root root 28 Jul 19 06:11 log -> /run/systemd/journal/dev-log
crw-rw---- 1 root disk 10, 237 Jul 19 06:11 loop-control
brw-rw---- 1 root disk 7, 0 Jul 19 06:11 loop0
brw-rw---- 1 root disk 7, 1 Jul 19 06:11 loop1
brw-rw---- 1 root disk 7, 2 Jul 19 06:11 loop2
brw-rw---- 1 root disk 7, 3 Jul 19 06:11 loop3
brw-rw---- 1 root disk 7, 4 Jul 19 06:11 loop4
brw-rw---- 1 root disk 7, 5 Jul 19 06:11 loop5
brw-rw---- 1 root disk 7, 6 Jul 19 06:11 loop6
brw-rw---- 1 root disk 7, 7 Jul 19 06:11 loop7
drwxr-xr-x 2 root root 60 Jul 19 06:11 mapper
crw-r----- 1 root kmem 1, 1 Jul 19 06:11 mem
brw-rw---- 1 root disk 179, 0 Jul 19 13:36 mmcblk2
brw-rw---- 1 root disk 179, 32 Jul 19 06:11 mmcblk2boot0
brw-rw---- 1 root disk 179, 64 Jul 19 06:11 mmcblk2boot1
brw-rw---- 1 root disk 179, 1 Jul 19 13:36 mmcblk2p1
crw------- 1 root root 238, 0 Jul 19 06:11 mmcblk2rpmb
drwxrwxrwt 2 root root 40 Jan 1 1970 mqueue
crw------- 1 root root 235, 0 Jul 19 06:11 mxc_hantro
crw------- 1 root root 234, 0 Jul 19 06:11 mxc_hantro_vc8000e
drwxr-xr-x 2 root root 60 Jul 19 06:11 net
crw-rw-rw- 1 root root 1, 3 Jul 19 06:11 null
crw-r----- 1 root kmem 1, 4 Jul 19 06:11 port
crw------- 1 root root 108, 0 Jul 19 06:11 ppp
crw-rw-rw- 1 root tty 5, 2 Jul 19 13:41 ptmx
crw------- 1 root root 248, 0 Jul 19 06:11 ptp0
drwxr-xr-x 2 root root 0 Jul 19 06:11 pts
crw------- 1 root root 2, 0 Jul 19 06:11 ptyp0
crw------- 1 root root 2, 1 Jul 19 06:11 ptyp1
crw------- 1 root root 2, 2 Jul 19 06:11 ptyp2
crw------- 1 root root 2, 3 Jul 19 06:11 ptyp3
crw------- 1 root root 2, 4 Jul 19 06:11 ptyp4
crw------- 1 root root 2, 5 Jul 19 06:11 ptyp5
crw------- 1 root root 2, 6 Jul 19 06:11 ptyp6
crw------- 1 root root 2, 7 Jul 19 06:11 ptyp7
crw------- 1 root root 2, 8 Jul 19 06:11 ptyp8
crw------- 1 root root 2, 9 Jul 19 06:11 ptyp9
crw------- 1 root root 2, 10 Jul 19 06:11 ptypa
crw------- 1 root root 2, 11 Jul 19 06:11 ptypb
crw------- 1 root root 2, 12 Jul 19 06:11 ptypc
crw------- 1 root root 2, 13 Jul 19 06:11 ptypd
crw------- 1 root root 2, 14 Jul 19 06:11 ptype
crw------- 1 root root 2, 15 Jul 19 06:11 ptypf
brw-rw---- 1 root disk 1, 0 Jul 19 06:11 ram0
brw-rw---- 1 root disk 1, 1 Jul 19 06:11 ram1
brw-rw---- 1 root disk 1, 10 Jul 19 06:11 ram10
brw-rw---- 1 root disk 1, 11 Jul 19 06:11 ram11
brw-rw---- 1 root disk 1, 12 Jul 19 06:11 ram12
brw-rw---- 1 root disk 1, 13 Jul 19 06:11 ram13
brw-rw---- 1 root disk 1, 14 Jul 19 06:11 ram14
brw-rw---- 1 root disk 1, 15 Jul 19 06:11 ram15
brw-rw---- 1 root disk 1, 2 Jul 19 06:11 ram2
brw-rw---- 1 root disk 1, 3 Jul 19 06:11 ram3
brw-rw---- 1 root disk 1, 4 Jul 19 06:11 ram4
brw-rw---- 1 root disk 1, 5 Jul 19 06:11 ram5
brw-rw---- 1 root disk 1, 6 Jul 19 06:11 ram6
brw-rw---- 1 root disk 1, 7 Jul 19 06:11 ram7
brw-rw---- 1 root disk 1, 8 Jul 19 06:11 ram8
brw-rw---- 1 root disk 1, 9 Jul 19 06:11 ram9
crw-rw-rw- 1 root root 1, 8 Jul 19 06:11 random
crw-rw-r-- 1 root root 10, 242 Jul 19 06:11 rfkill
lrwxrwxrwx 1 root root 4 Jul 19 06:11 rtc -> rtc0
crw------- 1 root root 252, 0 Jul 19 06:11 rtc0
crw------- 1 root root 252, 1 Jul 19 06:11 rtc1
drwxrwxrwt 2 root root 160 Jul 19 13:05 shm
drwxr-xr-x 3 root root 140 Jul 19 06:11 snd
lrwxrwxrwx 1 root root 15 Jul 19 06:11 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jul 19 06:11 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jul 19 06:11 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root tty 5, 0 Jul 19 13:41 tty
crw--w---- 1 root tty 4, 0 Jul 19 06:11 tty0
crw--w---- 1 root tty 4, 1 Jul 19 06:12 tty1
crw--w---- 1 root tty 4, 10 Jul 19 06:11 tty10
crw--w---- 1 root tty 4, 11 Jul 19 06:11 tty11
crw--w---- 1 root tty 4, 12 Jul 19 06:11 tty12
crw--w---- 1 root tty 4, 13 Jul 19 06:11 tty13
crw--w---- 1 root tty 4, 14 Jul 19 06:11 tty14
crw--w---- 1 root tty 4, 15 Jul 19 06:11 tty15
crw--w---- 1 root tty 4, 16 Jul 19 06:11 tty16
crw--w---- 1 root tty 4, 17 Jul 19 06:11 tty17
crw--w---- 1 root tty 4, 18 Jul 19 06:11 tty18
crw--w---- 1 root tty 4, 19 Jul 19 06:11 tty19
crw--w---- 1 root tty 4, 2 Jul 19 06:11 tty2
crw--w---- 1 root tty 4, 20 Jul 19 06:11 tty20
crw--w---- 1 root tty 4, 21 Jul 19 06:11 tty21
crw--w---- 1 root tty 4, 22 Jul 19 06:11 tty22
crw--w---- 1 root tty 4, 23 Jul 19 06:11 tty23
crw--w---- 1 root tty 4, 24 Jul 19 06:11 tty24
crw--w---- 1 root tty 4, 25 Jul 19 06:11 tty25
crw--w---- 1 root tty 4, 26 Jul 19 06:11 tty26
crw--w---- 1 root tty 4, 27 Jul 19 06:11 tty27
crw--w---- 1 root tty 4, 28 Jul 19 06:11 tty28
crw--w---- 1 root tty 4, 29 Jul 19 06:11 tty29
crw--w---- 1 root tty 4, 3 Jul 19 06:11 tty3
crw--w---- 1 root tty 4, 30 Jul 19 06:11 tty30
crw--w---- 1 root tty 4, 31 Jul 19 06:11 tty31
crw--w---- 1 root tty 4, 32 Jul 19 06:11 tty32
crw--w---- 1 root tty 4, 33 Jul 19 06:11 tty33
crw--w---- 1 root tty 4, 34 Jul 19 06:11 tty34
crw--w---- 1 root tty 4, 35 Jul 19 06:11 tty35
crw--w---- 1 root tty 4, 36 Jul 19 06:11 tty36
crw--w---- 1 root tty 4, 37 Jul 19 06:11 tty37
crw--w---- 1 root tty 4, 38 Jul 19 06:11 tty38
crw--w---- 1 root tty 4, 39 Jul 19 06:11 tty39
crw--w---- 1 root tty 4, 4 Jul 19 06:11 tty4
crw--w---- 1 root tty 4, 40 Jul 19 06:11 tty40
crw--w---- 1 root tty 4, 41 Jul 19 06:11 tty41
crw--w---- 1 root tty 4, 42 Jul 19 06:11 tty42
crw--w---- 1 root tty 4, 43 Jul 19 06:11 tty43
crw--w---- 1 root tty 4, 44 Jul 19 06:11 tty44
crw--w---- 1 root tty 4, 45 Jul 19 06:11 tty45
crw--w---- 1 root tty 4, 46 Jul 19 06:11 tty46
crw--w---- 1 root tty 4, 47 Jul 19 06:11 tty47
crw--w---- 1 root tty 4, 48 Jul 19 06:11 tty48
crw--w---- 1 root tty 4, 49 Jul 19 06:11 tty49
crw--w---- 1 root tty 4, 5 Jul 19 06:11 tty5
crw--w---- 1 root tty 4, 50 Jul 19 06:11 tty50
crw--w---- 1 root tty 4, 51 Jul 19 06:11 tty51
crw--w---- 1 root tty 4, 52 Jul 19 06:11 tty52
crw--w---- 1 root tty 4, 53 Jul 19 06:11 tty53
crw--w---- 1 root tty 4, 54 Jul 19 06:11 tty54
crw--w---- 1 root tty 4, 55 Jul 19 06:11 tty55
crw--w---- 1 root tty 4, 56 Jul 19 06:11 tty56
crw--w---- 1 root tty 4, 57 Jul 19 06:11 tty57
crw--w---- 1 root tty 4, 58 Jul 19 06:11 tty58
crw--w---- 1 root tty 4, 59 Jul 19 06:11 tty59
crw--w---- 1 root tty 4, 6 Jul 19 06:11 tty6
crw--w---- 1 root tty 4, 60 Jul 19 06:11 tty60
crw--w---- 1 root tty 4, 61 Jul 19 06:11 tty61
crw--w---- 1 root tty 4, 62 Jul 19 06:11 tty62
crw--w---- 1 root tty 4, 63 Jul 19 06:11 tty63
crw--w---- 1 root tty 4, 7 Jul 19 06:11 tty7
crw--w---- 1 root tty 4, 8 Jul 19 06:11 tty8
crw--w---- 1 root tty 4, 9 Jul 19 06:11 tty9
crw-rw---- 1 root dialout 4, 64 Jul 19 06:11 ttyS0
crw-rw---- 1 root dialout 4, 65 Jul 19 06:11 ttyS1
crw-rw---- 1 root dialout 4, 66 Jul 19 06:11 ttyS2
crw-rw---- 1 root dialout 4, 67 Jul 19 06:11 ttyS3
crw-rw---- 1 root dialout 207, 16 Jul 19 06:11 ttymxc0
crw-rw---- 1 root dialout 207, 17 Jul 19 06:11 ttymxc1
crw-rw---- 1 root dialout 207, 18 Jul 19 06:12 ttymxc2
crw------- 1 root root 3, 0 Jul 19 06:11 ttyp0
crw------- 1 root root 3, 1 Jul 19 06:11 ttyp1
crw------- 1 root root 3, 2 Jul 19 06:11 ttyp2
crw------- 1 root root 3, 3 Jul 19 06:11 ttyp3
crw------- 1 root root 3, 4 Jul 19 06:11 ttyp4
crw------- 1 root root 3, 5 Jul 19 06:11 ttyp5
crw------- 1 root root 3, 6 Jul 19 06:11 ttyp6
crw------- 1 root root 3, 7 Jul 19 06:11 ttyp7
crw------- 1 root root 3, 8 Jul 19 06:11 ttyp8
crw------- 1 root root 3, 9 Jul 19 06:11 ttyp9
crw------- 1 root root 3, 10 Jul 19 06:11 ttypa
crw------- 1 root root 3, 11 Jul 19 06:11 ttypb
crw------- 1 root root 3, 12 Jul 19 06:11 ttypc
crw------- 1 root root 3, 13 Jul 19 06:11 ttypd
crw------- 1 root root 3, 14 Jul 19 06:11 ttype
crw------- 1 root root 3, 15 Jul 19 06:11 ttypf
crw------- 1 root root 10, 124 Jul 19 06:11 ubi_ctrl
crw------- 1 root root 10, 223 Jul 19 06:11 uinput
crw-rw-rw- 1 root root 1, 9 Jul 19 06:11 urandom
drwxr-xr-x 2 root root 60 Jul 19 12:57 usb
drwxr-xr-x 3 root root 60 Jul 19 06:11 v4l
crw-rw---- 1 root tty 7, 0 Jul 19 06:11 vcs
crw-rw---- 1 root tty 7, 1 Jul 19 06:11 vcs1
crw-rw---- 1 root tty 7, 2 Jul 19 06:11 vcs2
crw-rw---- 1 root tty 7, 3 Jul 19 06:11 vcs3
crw-rw---- 1 root tty 7, 4 Jul 19 06:11 vcs4
crw-rw---- 1 root tty 7, 5 Jul 19 06:11 vcs5
crw-rw---- 1 root tty 7, 6 Jul 19 06:11 vcs6
crw-rw---- 1 root tty 7, 7 Jul 19 07:05 vcs7
crw-rw---- 1 root tty 7, 128 Jul 19 06:11 vcsa
crw-rw---- 1 root tty 7, 129 Jul 19 06:11 vcsa1
crw-rw---- 1 root tty 7, 130 Jul 19 06:11 vcsa2
crw-rw---- 1 root tty 7, 131 Jul 19 06:11 vcsa3
crw-rw---- 1 root tty 7, 132 Jul 19 06:11 vcsa4
crw-rw---- 1 root tty 7, 133 Jul 19 06:11 vcsa5
crw-rw---- 1 root tty 7, 134 Jul 19 06:11 vcsa6
crw-rw---- 1 root tty 7, 135 Jul 19 07:05 vcsa7
crw-rw---- 1 root tty 7, 64 Jul 19 06:11 vcsu
crw-rw---- 1 root tty 7, 65 Jul 19 06:11 vcsu1
crw-rw---- 1 root tty 7, 66 Jul 19 06:11 vcsu2
crw-rw---- 1 root tty 7, 67 Jul 19 06:11 vcsu3
crw-rw---- 1 root tty 7, 68 Jul 19 06:11 vcsu4
crw-rw---- 1 root tty 7, 69 Jul 19 06:11 vcsu5
crw-rw---- 1 root tty 7, 70 Jul 19 06:11 vcsu6
crw-rw---- 1 root tty 7, 71 Jul 19 07:05 vcsu7
lrwxrwxrwx 1 root root 94 Jul 19 06:11 verdin-adc1 -> /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-0049/iio:device0/in_voltage3_raw
lrwxrwxrwx 1 root root 94 Jul 19 06:11 verdin-adc2 -> /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-0049/iio:device0/in_voltage2_raw
lrwxrwxrwx 1 root root 94 Jul 19 06:11 verdin-adc3 -> /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-0049/iio:device0/in_voltage1_raw
lrwxrwxrwx 1 root root 94 Jul 19 06:11 verdin-adc4 -> /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-0049/iio:device0/in_voltage0_raw
lrwxrwxrwx 1 root root 5 Jul 19 06:11 verdin-i2c-on-module -> i2c-0
lrwxrwxrwx 1 root root 5 Jul 19 06:11 verdin-i2c1 -> i2c-3
lrwxrwxrwx 1 root root 5 Jul 19 06:11 verdin-i2c2 -> i2c-1
lrwxrwxrwx 1 root root 5 Jul 19 06:11 verdin-i2c4 -> i2c-2
lrwxrwxrwx 1 root root 7 Jul 19 06:11 verdin-uart1 -> ttymxc0
lrwxrwxrwx 1 root root 7 Jul 19 06:11 verdin-uart2 -> ttymxc1
lrwxrwxrwx 1 root root 7 Jul 19 06:11 verdin-uart3 -> ttymxc2
lrwxrwxrwx 1 root root 8 Jul 19 06:11 verdin-watchdog -> watchdog
lrwxrwxrwx 1 root root 9 Jul 19 06:11 verdin-watchdog-soc -> watchdog0
drwxr-xr-x 2 root root 60 Jan 1 1970 vfio
crw------- 1 root root 10, 127 Jul 19 06:11 vga_arbiter
crw------- 1 root root 10, 137 Jul 19 06:11 vhci
crw-rw---- 1 root video 81, 0 Jul 19 06:11 video0
crw-rw---- 1 root video 81, 1 Jul 19 06:11 video1
crw------- 1 root root 100, 0 Jul 19 06:11 vsi_daemon_ctrl
crw------- 1 root root 10, 130 Jul 19 06:11 watchdog
crw------- 1 root root 246, 0 Jul 19 06:11 watchdog0
crw-rw-rw- 1 root root 1, 5 Jul 19 06:11 zero
brw-rw---- 1 root disk 253, 0 Jul 19 06:11 zram0
------------------------------------------------------------
torizon@verdin-imx8mp-15229850:~$
Sincerely,
François.