[Letux-kernel] Pyra 4.19.y kernels booting and working again
H. Nikolaus Schaller
hns at goldelico.com
Sat Jul 11 21:30:32 CEST 2020
I finally found some time to look into the Letux-4.19 kernels
which are known to no longer boot on Pyra for some time.
It turned out that there were two tiny bugs when backporting
the rearranged device tree sources to letux-4.19.90.
The device tree files which we now have for later kernels
(e.g. 5.6) have a better file and include structure to make
them easier to maintain and increase the chance to get them
upstream. This also allowed to add device tree changes for
the production Pyra.
There were two unnoticed (see below) issues when doing the
The first was that there was a bug in the SGX device tree
node which made the boot process fail immediately when the
omap5 tried to initialize its clocks. The symptom was that
the Pyra simply did hang after printing "Starting Kernel..."
to the Console. So the Pyra became unbootable.
Note that the 4.19 kernel still uses the ti,hwmods while
newer kernels use "sysc" for initializing all these
internal modules on an omap5 chip.
The other bug was that the old panel driver of the 4.19
kernel driver did not understand how to control the display
backlight like newer kernels do. The result was that there
was an /dev/fb0 and even X11 was running. But nothing visible.
So two tiny patches - and the latest letux-4.19.y works again :)
Now you may ask why it wasn't noticed before and fixed
This is a complex story. First of all I use a script
to install newly built kernels and device tree files
on a bootable SD card. Then I insert this SD into the
Pyra and try to boot.
Next is that the development Pyra I am using is a quite
old model where only two or three main boards have
been built. This was hardware release v5.1. But there
was a small hardware change that was forgotten in the
hardware version detection of u-boot. So there is also
a v5.1.2 main board and they need different device tree
Therefore I started with 4.19.90 to have two separate
source files for them.
Unfortunately there was an unnoticed bug in my installer
script with the result that a device tree file before
4.19.90 was installed in many cases. And that one does
work with kernel binaries up to 4.19.132. Therefore
I simply did not notice that there is a bug...
ED did send me a mass production unit a while ago and
I added the required device tree files - and again the
script bug hit me to hide the kernel bug...
The most challenging part was to get reproducible
test results. Before fixing that script, sometimes a kernel
did work and sometimes it did not... It was not possible
to grab some systematic reason for the bug. After fixing
the script I could see that 4.19.89 was always working
and 4.19.90 never. So I could look into the code differences
and change logs.
Anyways, the bugs are fixed now and if you happen to have
one of the rare v5.1 mainboards, please also check if
your u-boot loads the correct device tree binary...
For owners of v5.2 or the mass production variant v5.3
you don't have to care about that any more.
I would be happy to receive some build & test results.
BR and thanks,
More information about the Letux-kernel