verdin-imx8mp-06848973:~$ dmesg | grep i2c
[ 1.321113] i2c /dev entries driver
[ 1.451537] i2c i2c-0: IMX I2C adapter registered
[ 1.452439] i2c i2c-1: IMX I2C adapter registered
[ 1.453246] i2c i2c-2: IMX I2C adapter registered
[ 1.543685] i2c i2c-3: IMX I2C adapter registered
[ 6.329765] atmel_mxt_ts 3-004a: __mxt_read_reg: i2c transfer failed (-6)
[ 6.388983] atmel_mxt_ts 3-004a: mxt_bootloader_read: i2c recv failed (-6)
[ 6.639865] atmel_mxt_ts 3-004a: mxt_bootloader_read: i2c recv failed (-6)
verdin-imx8mp-06848973:~$ dmesg | grep atmel
[ 6.329765] atmel_mxt_ts 3-004a: __mxt_read_reg: i2c transfer failed (-6)
[ 6.388983] atmel_mxt_ts 3-004a: mxt_bootloader_read: i2c recv failed (-6)
[ 6.639627] atmel_mxt_ts 3-004a: Trying alternate bootloader address
[ 6.639865] atmel_mxt_ts 3-004a: mxt_bootloader_read: i2c recv failed (-6)
verdin-imx8mp-06848973:~$
Just to be clear for those who stumble on this, it is i2c-tools not i2ctools
developer@-developer-VirtualBox:~/Projects/i2ctools$ cat Dockerfile
FROM --platform=linux/arm64/v8 torizon/debian:2-bullseye
RUN apt update && apt -y install i2c-tools
docker build --pull -t seasonedgeek/i2ctools_container .
docker push seasonedgeek/i2ctools_container
On target
docker stop $(docker ps -a -q)
docker pull seasonedgeek/i2ctools_container
docker run --rm -it -v /tmp:/tmp -v /var/run/dbus:/var/run/dbus -v /dev/galcore:/dev/galcore --device-cgroup-rule=‘c 199:* rmw’ seasonedgeek/i2ctools_container
root@cd30de8a7628:/# i2cdectect -y -r 0
bash: i2cdectect: command not found
root@cd30de8a7628:/#
root@cd30de8a7628:/# i2cdectect -y -r 1
bash: i2cdectect: command not found
root@cd30de8a7628:/# i2cdectect -y -r 2
bash: i2cdectect: command not found
root@cd30de8a7628:/# i2cdectect -y -r 3
bash: i2cdectect: command not found
root@cd30de8a7628:/#
Back to look at build I find this at the very end.
Setting up perl (5.32.1-4+deb11u2) ...
Setting up i2c-tools (4.2-1+b1) ...
Failed to send reload request: No such file or directory
Failed to write 'change' to '/sys/devices/pci0000:00/0000:00:07.0/i2c-0/i2c-dev/i2c-0/uevent': Read-only file system
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Removing intermediate container 2b41d7a4c7ea
---> 085a5cf9a5c3
Successfully built 085a5cf9a5c3
Successfully tagged seasonedgeek/i2ctools_container:latest
The tools you wish me to use cannot be installed in a Docker built container
Back on target
One last try
root@cd30de8a7628:/# apt -y install i2c-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
i2c-tools is already the newest version (4.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cd30de8a7628:/#
docker stop $(docker ps -a -q)
docker run --rm -it -v /tmp:/tmp -v /var/run/dbus:/var/run/dbus -v /dev/galcore:/dev/galcore --device-cgroup-rule='c 199:* rmw' torizon/debian:2-bullseye
apt update
apt -y install i2c-tools
Exact same failure
Setting up perl (5.32.1-4+deb11u2) ...
Setting up i2c-tools (4.2-1+b1) ...
Failed to send reload request: No such file or directory
Failed to write 'change' to '/sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/i2c-dev/i2c-0/uevent': Read-only file system
Processing triggers for libc-bin (2.31-13+deb11u2) ...
root@0f940928fc04:/# i2cdectect -y -r 0
bash: i2cdectect: command not found
root@0f940928fc04:/#