User avatar
asaenzc
Posts: 3
Joined: Fri Apr 07, 2017 7:35 am

[RT kernel] 'sudo make dtbs' do not generate 'dts/overlays'

Fri Sep 22, 2017 8:29 pm

I am making a large project related with Morion Control and, of course, it is needed RealTime capabilities.
By using 'CoDeSys Control' to connect through EtherCAT fieldbus, each 1 millisecond, our application sends the position of all the control axes (of course that PLC I/Os as well in our side but also in CoDeSys). When finished, it will be a very powerful system full of possibilities.
If the RPi-3B produce latencies (main problem is the jitter) the TICK is not constant (1 ms) and EtherCAT shows "overrun/underrun error on the fieldbus". It's the most perfect solution to control the Real-Time behavior of our RPi system.
Fixing swaping, CPU scaling, Power maintenance and eliminating HDMI and WiFi... we have already achieved no Fieldbus error even not applying the RT patch.
But we must apply again the RT-PREEMPT patch to the RPi3. How we need Bluetooth and Linux-4.4 has many problems with it (at the beginning we achieved a "Linux-rpi-4.4.50-rt63" kernel but when we upgrade to the last Raspbian Stretch 4.9.41 and we want to obtain again the 4.9.47-rt37 (last stable. To comment that we also try the 4.9.35-rt25) the problem with 'std/overlays' has became this awful problem wasting lot of time doing particularly and absolutely nothing of profit.
Of course I have read the alone topic that is quite similar to the problem: viewtopic.php?f=107&t=167903#p1079600 but, unfortunately, the final solution was obviated.
I have dedicated many hours making lot of trials and reading and looking for...
I can say: for sure can not be the sources merge had broken the dtbo rules.
For sure it can not be 'scripts/Makefile.dtbinst'
During kernel generation by 'make -j6 zImage modues dtbs', I could see that the only "symbolic link" is used in 'make -j6 dtbs' (concretely while compiling and the 'scripts/Makefile.dtbinst' access to 'Linux/arch/arm/boot/dts/include/dt-bindings' that is a 'symbolic link' that redirects to 'linux/include/dt-bindings' using the symbolic link (I have try to simulate with a 'Console terminal' without problems).
After many unfortunate long trials (imagine: kernel cross compiling...) and bad days without solution I though that... how some times the "symbolic links" are not copied when doing copies to 'usbsticks' or SDs..., I though I got the problem and I fixed the hypothetical problem generating a new symbolic link, but this time redirecting in absolute, by using:
"ln -s /home/pi/Linux/include/dt-bindings/ dt-bindings" instead of the original "ln -s '../../../../../include/dt-bindings dt-bingdings "
The result: same as always! Not dts/overlays
Looking desperately forward to hear from someone could be so kind in to help me, so please...

User avatar
asaenzc
Posts: 3
Joined: Fri Apr 07, 2017 7:35 am

Re: [RT kernel] 'sudo make dtbs' do not generate 'dts/overlays'

Sun Oct 08, 2017 8:19 am

Regarding no overlays generation, the next day after writing the precedent post I knew where the problem was!
Today, I know that almost all "howto’s" continue with building the kernel with "sudo make -j6 zImage modules dtbs" but that will result in a RPi-kernel that will freeze and for sure the USB ports won't run! Also... that 'rpi-source' and 'rpi-update' do not apply for RT-PREEMPT compiling (too much HUNKs appearing at the patching phase [xzcat ../patch-4.9.33-rt23.patch.xz | patch -p1] and it makes me suspect that Linux-rpi-4.9.47-v7+ [at least with 'rpi-source' and '.firmware_revision' with commit '2663a143525df3c8305253c6f93f1707156e6a9d' and 'rpi-update 2663a143525df3c8305253c6f93f1707156e6a9d'], does not fit completely with the Linux-4.9.47 kernel.
The question is where to find the appropriate and reliable information in this enormous chaos of futile literature.

Return to “Automation, sensing and robotics”