ArmbianHelper changed the topic of #armbian to: armbian - Linux for ARM development boards | www.armbian.com | Github: github.com/armbian | Commits: #armbian-commits | Developer talk: #armbian-devel | Forum feed: #armbian-rss | Off-Topic: #armbian-offtopic | Logs: -> irc.armbian.com
shoragan has quit [Read error: Connection reset by peer]
shoragan has joined #armbian
shoragan has quit [Quit: quit]
shoragan has joined #armbian
califax has quit [Remote host closed the connection]
califax has joined #armbian
DC-IRC has quit [Remote host closed the connection]
DC-IRC has joined #armbian
DarkL0rd has quit [Remote host closed the connection]
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 252 seconds]
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 240 seconds]
lyri has quit [Remote host closed the connection]
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 255 seconds]
archetech has quit [Quit: Konversation terminated!]
archetech has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 252 seconds]
buzzmarshall has quit [Quit: Konversation terminated!]
marco44 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
marco44 has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 264 seconds]
xispita has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 246 seconds]
danilogondolfo has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 260 seconds]
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 268 seconds]
vpeter has quit [Ping timeout: 256 seconds]
zeemate has joined #armbian
vpeter has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 256 seconds]
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 272 seconds]
Manneveru has joined #armbian
<Manneveru>
Good morning, Armbian ;-) Anyone well versed in RPi's DT overlays here?
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 264 seconds]
DarkL0rd has joined #armbian
LanDi has joined #armbian
DarkL0rd has quit [Remote host closed the connection]
LanDi1 has joined #armbian
LanDi has quit [Ping timeout: 260 seconds]
LanDi1 has quit [Ping timeout: 256 seconds]
LanDi has joined #armbian
DarkL0rd has joined #armbian
DarkL0rd has quit [Ping timeout: 272 seconds]
DarkL0rd has joined #armbian
laz0r has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
laz0r has joined #armbian
LanDi has quit [Quit: LanDi]
LanDi has joined #armbian
LanDi has quit [Ping timeout: 240 seconds]
<Manneveru>
From another angle: has anyone managed to enable I²C on Raspberry Pi 5 on Armbian?
<c0rnelius>
Manneveru: `sudo modprobe i2c-dev` you see the `ls /dev/i2c*` now?
<Manneveru>
c0rnelius: yes, but only 1, 11 and 12. How to make this persistent on boot and how to enable 4 & 6 (cameras)?
<c0rnelius>
Manneveru: add `i2c-dev` to /etc/modules
<c0rnelius>
I thought cams were autodetected now? I know the old school way is to enable in the config.txt `start_x=1` and `gpu_mem=128` the new way which I never use is `camera_auto_detect=1`
<Manneveru>
Camera autodetect is not going to work for my as I have _in-house_ camera with my own driver. I need to enable I²C as I can on Raspberry Pi OS, `dtparam=i2c_arm=on` in /boot/firmware/config.txt` was doing the job there.
<Manneveru>
s/for my/for me/
<ArmbianHelper>
Manneveru meant to say: Camera autodetect is not going to work for me as I have _in-house_ camera with my own driver. I need to enable I²C as I can on Raspberry Pi OS, `dtparam=i2c_arm=on` in /boot/firmware/config.txt` was doing the job there.
<Manneveru>
The other part is that `dtoverlay` is not working for me as it wants to prefix each DTBO filename with `0_`...
<c0rnelius>
armbian is using `/boot/firmware/overlays` to store the overlays correct?
<Manneveru>
There are 2 copies for increased confusion
<Manneveru>
Files are there, but they don't have prefix...
<Manneveru>
Not sure how to tell `dtoverlay` to not prefix them on attempt to load
<Manneveru>
I don't have to do that for I²C on Raspberry Pi OS as the `dtparam=i2c_arm=on` enables all I²C I need, them I can `dtoverlay` my driver.
Smedles has quit [Quit: No Ping reply in 180 seconds.]
<Manneveru>
My overlay don't work as my driver cannot identify the device connected as there's no /dev/i2c-4 in the system
Smedles has joined #armbian
<c0rnelius>
well even on my own custom img i only see the three when I enable the i2c. in a normal case the i2c nodes created in /dev are only done so because they are in the DTB or the DTBO. The system can't create something it doesn't know about.
<Manneveru>
Right. Thing is overlays doesn't seem to work on Armbian
<c0rnelius>
Where are you putting ur custom overlays?
<Manneveru>
But dmesg says it's loaded (I'm doing it at runtime), so my driver is probed.
<Manneveru>
But I can't enable right overlays for I²C at boot.
<Manneveru>
s/I²C/right I²C/
<ArmbianHelper>
Manneveru meant to say: But I can't enable right overlays for right I²C at boot.
<Manneveru>
Hmm... worth giving a shot. Let me try.
<Manneveru>
No change. I don't have serial cable to see what errors firmware may spit at me :-(
<c0rnelius>
I'm just gonna guess here as I feel like ur not giving me all the info; the overlays aren't being found by the config.txt so they aren't getting loaded.
<Manneveru>
The DTBOs aren't for right platform, hence the `no matching platform found` warning on manual attempt. Firmware cannot load them even with the flag enabled in `config.txt`.
<Manneveru>
I wonder what would happen if I copied DTBOs from the SD card with Raspberry Pi OS?
<clever>
checking the rp1 datasheet, it does have an i2c6, at 0x40088000
<c0rnelius>
looks to me that what he is trying to do is not compat with the pi5 and needs to be reworked. but i also don't believe all the info has been expressed.
<clever>
there it is, i think `dtparam=i2c_arm=on` just flips the status of the earlier one
<clever>
Manneveru: it may help to compare the final dts, one min
<clever>
something like `dtc -O dts /proc/device-tree -s -o out` will convert the final dts (after all overlays are applied) back into a dts file
<clever>
if you run that under both Armbian and RPi OS, and diff the files, you can see why linux is behaving differently
lyri has joined #armbian
<Manneveru>
It's going to take time as I have one RPi only and need to reboot from different SD Card.
<Manneveru>
clever: major differences seem to be clocks
<Manneveru>
a lot of phandles differ
<clever>
phandles differing is normal
<clever>
thats just how one node points to another
<clever>
i need to go grab lunch, then i can debug it more
tomaw has quit [Remote host closed the connection]
tomaw_ has joined #armbian
tomaw_ is now known as tomaw
alekksander has joined #armbian
<clever>
Manneveru: oh, and are you using dtoverlay= or the userland dtoverlay?
LanDi has joined #armbian
LanDi1 has joined #armbian
LanDi has quit [Ping timeout: 264 seconds]
LanDi1 is now known as LanDi
mighty-bob has joined #armbian
LanDi1 has joined #armbian
LanDi has quit [Quit: LanDi]
LanDi1 is now known as LanDi
LanDi1 has joined #armbian
LanDi has quit [Ping timeout: 255 seconds]
LanDi1 is now known as LanDi
zeemate has quit [Ping timeout: 256 seconds]
LanDi has quit [Read error: Connection reset by peer]
LanDi has joined #armbian
LanDi has quit [Remote host closed the connection]
<Manneveru>
clever: in reality both, in userland I use it to load my own driver with my own overlay file (which works on Raspbian OS on RPi 5, because I²Cs are active in DT).
<clever>
Manneveru: i'm more familiar with the config.txt method, can you try loading all of the overlays like that, convert /proc/device-tree to dts, and then pastebin the dts?
<Manneveru>
Give me few seconds
<Manneveru>
Interesting observation: i2c@80000 status okay on armbian, disabled on raspberryos, same i2c@88000
<clever>
yep, i2c-6 is loaded, and once you load i2c-dev, it should show up
<clever>
what was the end goal?
<Manneveru>
OK, now after `modprobe i2c-dev` these two didn't appear so I couldn't do `i2c-detect` on them
<Manneveru>
now my overlay uses wrong I²C despite using `cam0` param
<clever>
how does your overlay reference the i2c port?
<Manneveru>
and this is interesting? reversed aliases? on RPi OS I use `cam0` param to the dtoverlay, which is supposed to tie my driver to i2c_csi_dsi0 and it's i2c6 there, but if I use `cam0` on Armbian I end up with reference to i2c4 instead... it loads OK if I don't use param and `target = <&i2c_csi_dsi1>;` remains in force (I derived my DTS from imx219 one).
<Manneveru>
Looks like userspace `dtoverlay` on Armbian doesn't deal well with params
<Manneveru>
I have to manually change fields for overlay to work
<clever>
Manneveru: why not just use only config.txt ?
<Manneveru>
our driver is in development, so we load and unload it sometimes... but soon we should have `.deb` with it, so it should land in `config.txt` then
<Manneveru>
Thanks for help - very valuable!
<Manneveru>
I have the driver loaded and libcamera sees it
<clever>
you can load and unload just the .ko
<clever>
and leave the overlay in place all of the time
<clever>
thats how i did my RP1 pio drivers
<clever>
my .ko wasnt in /lib/modules, so on boot, linux/modprobe just fails to find it, and basically ignores the overlay
<Manneveru>
hmm... I tried and something about rp1_cfe was causing troubles
<clever>
when i modprobe the .ko, it springs to life
<clever>
and as long as i dont OOPS or panic, i can unload and reload the module as much as i want
<Manneveru>
hmm... on Raspberry OS I didn't have to add it to `/etc/modules` to work...
<Manneveru>
only launch `depmod` after copying the driver `.ko` over
<clever>
i try to avoid making auto-load works
<clever>
because if you mess up the init function and it panics the kernel, how do you fix it?
<Manneveru>
remove SD card, mount on PC, remove the .ko and overlay and reboot
<clever>
yep, but thats a lot of hassle
<clever>
i found it far simpler if you just require a manual `insmod` on boot
<Manneveru>
my probe is stable, so I can leave with it ;-)
<clever>
if you mess up, just cycle the power, and it wont load again
<Manneveru>
OK, that's why I stick with dtoverlay reload
<Manneveru>
worked so far... trouble started on Armbian
<Manneveru>
we need Jammy because of ROS2
<Manneveru>
alternative was Docker on RPi OS with Jammy and Humble on it
<Manneveru>
but that's a lot of hassle to make cameras work inside container
<clever>
speaking of ROS, would a 200mhz cortex-m3 help out any?
<clever>
there is one hidden in the corner of the pi5
<clever>
it has low-latency access to gpio as well
<Manneveru>
ATM we wouldn't make use of it... however, good to know. Is it accessible to flash from the main one and what bus can be used to communicate with it?
<Manneveru>
As this may be valuable for drone builders
<clever>
and working with him, we got a dump of the boot rom for the RP1
<clever>
then later i worked with https://github.com/MichaelBell/rp1-hacking, he found a `while(true){ ...}` in the 21kb blob, and by patching it at runtime, he can temporarily borrow core0 and get core1 started
<clever>
the biggest problem with G33KatWork's initial solution, is that you have to hard reset the RP1 after booting
<clever>
and the linux drivers get really really upset when you hot-unplug the RP1
<clever>
`rmmod` is also enough to panic certain drivers
<clever>
so you need to use a config.txt dtoverlay to just ban linux from touching the RP1 in the first place (no ethernet or usb on boot)
<clever>
then hard reset it, and sideload your firmware
<clever>
then use the userland dtoverlay to enable the RP1
<clever>
then reboot the whole system if you want to do it again
<clever>
MichaelBell's trick allowed you to gain control of core1 without a reboot, and i just refined things, using the reset block and getting LK ported
laz0r_ has joined #armbian
laz0r has quit [Ping timeout: 246 seconds]
laz0r_ is now known as laz0r
mighty-bob has quit [Ping timeout: 264 seconds]
alekksander has quit [Remote host closed the connection]
TheCoffeMaker has quit [Ping timeout: 246 seconds]
TheCoffeMaker has joined #armbian
buzzmarshall has joined #armbian
jantones has quit [Ping timeout: 260 seconds]
jantones has joined #armbian
* flyback
should blow the dust off his orane pi lite soon
<DC-IRC>
[Discord] <nexusxe> hey, trying to build armbian for my lichee rv nezha board with the build tool's mangopi-mq config, but am getting errors building u-boot due to missing opensbi. anyone have any ideas? I can get opensbi cross-compiled locally just fine, but the build tool doesn't seem to be able to do it
<Manneveru>
clever: sounds tough. Too bad RPi1 firmware is not open-source, so it could sideload the RPi1 before the kernel is loaded (similar like Xilinx does on Zynq and others)
<clever>
Manneveru: i have been working on making open firmware for the rpi line of boards
<clever>
Manneveru: currently, it can boot linux on a pi2 and pi3
califax_ has joined #armbian
califax has quit [Remote host closed the connection]
califax_ is now known as califax
califax has quit [Remote host closed the connection]