Maybe the first thing to establish is if the BALENA_HOST_CONFIG_dtparam is applied. When I print the env in a container and in the host I don’t see this env variable. How can I check if the i2c-rtc,ds3231 is enabled?
Hi Krasi,
can you confirm the device you are trying to debug it this one?
I tried to connect to it but can’t get any SSH access to investigate the internal state of the device.
You can get information about your device tree by exploring “/proc/device-tree/” on your hostOS, for instance with find /proc/device-tree/ -name "*rtc*".
You are also mentioning BALENA_HOST_CONFIG_dtparam but the forum link you posted specifies BALENA_HOST_CONFIG_dtoverlay, could you try changing this to see if it improves what you are seeing?
yes it is that device. for some reason, I can’t ssh using the device ID, but I can ssh using the local IP address.
noob mistake about the config name, I just added that one as well, but no difference.
How do I check that it is applied?
When I use i2cdetect -y 2 on armbian it detects the hardware clock on address 68, but on balena I get
Error: Could not open file /dev/i2c-2’ or /dev/i2c/2': No such file or directory
and i2cdetect -y 0 show nothing and i2cdetect -y 1 shows the output below, but nothing on address 68
Thanks for the update. If you can restore VPN access I think it will help for the debugging. I don’t have that hardware on hand and can’t explore the file system to help without access.
Hi @krasi-georgiev,
Thanks for the link. I couldn’t go to it immediately, and now device is offline. Could you fix the issue or do you still want us to have a look?
Hi @krasi-georgiev,
Thanks for the link. I tried to connect on Monday but the connection was very lagy and I coudn’t do much back then. I’m retrying right now.
I think I finally pin pointed the issue, it seems you are missing the overlay directory in your SDCard boot partition, without it you wont be able to get the dtoverlay param to do anything (an overlay is an addition to your device tree, but has to come from somewhere at boot-time).
This is what your boot partition looks like:
root@9bdbb72:/mnt/boot# ls -la
total 8407
drwxr-xr-x 5 root root 16384 Jan 1 1970 .
drwxr-xr-x 6 root root 1024 Jan 13 2020 ..
-rwxr-xr-x 1 root root 2048 Jan 1 1980 FSCK0000.REC
-rwxr-xr-x 1 root root 604 Oct 16 15:15 config.json
-rwxr-xr-x 1 root root 2119 Jan 13 2020 device-type.json
drwxr-xr-x 2 root root 2048 Jan 13 2020 dtb
-rwxr-xr-x 1 root root 44 Jan 13 2020 image-version-info
-rwxr-xr-x 1 root root 208 Jan 13 2020 os-release
-rwxr-xr-x 1 root root 24 Jan 13 2020 resin-image
-rwxr-xr-x 1 root root 571 Jan 13 2020 resinos.fingerprint
drwxr-xr-x 2 root root 2048 Jan 13 2020 splash
drwxr-xr-x 2 root root 2048 Oct 16 15:19 system-connections
-rwxr-xr-x 1 root root 480829 Jan 13 2020 u-boot-sunxi-with-spl.bin
-rwxr-xr-x 1 root root 8087472 Jan 13 2020 uImage
and for instance, this is what a regular BalenaOS rasbperry pi boot partition looks like:
➜ resin-boot ls -la
total 8409
drwxr-xr-x 6 avalade avalade 3072 Jan 1 1970 .
drwxr-x---+ 7 root root 4096 Nov 2 15:52 ..
-rw-r--r-- 1 avalade avalade 24 Jun 1 19:53 balena-image
-rw-r--r-- 1 avalade avalade 17578 Jun 1 19:53 balenaos.fingerprint
-rw-r--r-- 1 avalade avalade 27696 Jun 1 19:53 bcm2708-rpi-b.dtb
-rw-r--r-- 1 avalade avalade 27967 Jun 1 19:53 bcm2708-rpi-b-plus.dtb
-rw-r--r-- 1 avalade avalade 27307 Jun 1 19:53 bcm2708-rpi-b-rev1.dtb
-rw-r--r-- 1 avalade avalade 27581 Jun 1 19:53 bcm2708-rpi-cm.dtb
-rw-r--r-- 1 avalade avalade 27441 Jun 1 19:53 bcm2708-rpi-zero.dtb
-rw-r--r-- 1 avalade avalade 28792 Jun 1 19:53 bcm2708-rpi-zero-w.dtb
-rw-r--r-- 1 avalade avalade 28842 Jun 1 19:53 bcm2709-rpi-2-b.dtb
-rw-r--r-- 1 avalade avalade 28991 Jun 1 19:53 bcm2710-rpi-2-b.dtb
-rw-r--r-- 1 avalade avalade 30647 Jun 1 19:53 bcm2710-rpi-3-b.dtb
-rw-r--r-- 1 avalade avalade 31266 Jun 1 19:53 bcm2710-rpi-3-b-plus.dtb
-rw-r--r-- 1 avalade avalade 28942 Jun 1 19:53 bcm2710-rpi-cm3.dtb
-rw-r--r-- 1 avalade avalade 51675 Jun 1 19:53 bcm2711-rpi-400.dtb
-rw-r--r-- 1 avalade avalade 51543 Jun 1 19:53 bcm2711-rpi-4-b.dtb
-rw-r--r-- 1 avalade avalade 52116 Jun 1 19:53 bcm2711-rpi-cm4.dtb
-rw-r--r-- 1 avalade avalade 52460 Jun 1 19:53 bootcode.bin
-rw-r--r-- 1 avalade avalade 437 Jun 1 19:53 boot.scr
-rw-r--r-- 1 avalade avalade 137 Jun 1 19:53 cmdline.txt
-rw-r--r-- 1 avalade avalade 756 Aug 6 2021 config.json
-rw-r--r-- 1 avalade avalade 36243 Jun 1 19:53 config.txt
-rw-r--r-- 1 avalade avalade 2361 Jun 1 19:53 device-type.json
-rw-r--r-- 1 avalade avalade 0 Jun 1 19:53 extra_uEnv.txt
-rw-r--r-- 1 avalade avalade 3145 Jun 1 19:53 fixup_cd.dat
-rw-r--r-- 1 avalade avalade 7223 Jun 1 19:53 fixup.dat
-rw-r--r-- 1 avalade avalade 10199 Jun 1 19:53 fixup_x.dat
drwxr-xr-x 2 avalade avalade 512 Nov 2 2022 .fseventsd
-rw-r--r-- 1 avalade avalade 41 Jun 1 19:53 image-version-info
-rw-r--r-- 1 avalade avalade 489264 Jun 1 19:53 kernel7.img
-rw-r--r-- 1 avalade avalade 157 Jun 1 19:53 os-release
drwxr-xr-x 2 avalade avalade 22016 Jun 1 19:53 overlays
-rw-r--r-- 1 avalade avalade 0 Jun 1 19:53 rpi-bootfiles-20220120.stamp
drwxr-xr-x 2 avalade avalade 512 Aug 6 2021 splash
-rw-r--r-- 1 avalade avalade 800028 Jun 1 19:53 start_cd.elf
-rw-r--r-- 1 avalade avalade 2964864 Jun 1 19:53 start.elf
-rw-r--r-- 1 avalade avalade 3716296 Jun 1 19:53 start_x.elf
drwxr-xr-x 2 avalade avalade 512 Jun 1 19:53 system-connections
on the second one I have an overlays folder with all possible overlays.
I’m not sure why it is missing here. You can try to replace it with the one you grab from your standard BananaPi distribution, they could be compatible.
Hello Krasi, as you know, sadly you are using a balenaOS version which is not on production but staging. So not sure it makes sense to experiment on the device.
Having said that, we added this device to the OS test workflow (testbot) but currently the tests are failing. Once a new release passes test, it will be deployed to production, and at that moment we will be able to look into any issues for that production OS release.
Thanks.
Can you maybe explain what is the actual workflow with the dtoverlay logic from the linux perspective so that I can try and set it up manually?