[Letux-kernel] Raspi3B+ support

H. Nikolaus Schaller hns at goldelico.com
Sat Jan 5 19:18:55 CET 2019

> Am 05.01.2019 um 19:07 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> Hi,
>> Am 05.01.2019 um 08:21 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> Hi Andreas,
>>> Am 04.01.2019 um 20:27 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> Hi,
>>> On Fri, 4 Jan 2019 14:45:47 +0100
>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>>> Hi,
>>>> with help and suggestions from Mark, I finally managed
>>>> to get our Letux kernel compile and boot on the Raspi3B+.
>>> Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
>> You mean something like:
>> https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-kernel/linux/linux-mainline-3.8/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch
>> No, since mainline kernel seems not to build or need any overlays
>> for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC"
>> like setup (monitor, keyboard, LAN).
>> But according to DT contents, Ethernet and USB and maybe WLAN should
>> be supported by v4.20. Maybe I am still missing some CONFIGs.
>> Most people are building the github raspi kernel trees or the
>> debian buster kernel and therefore describe only that in their
>> how-tos. But it doesn't directly help us to integrate RasPi
>> support into the Letux Kernel.
>> What I have not yet verified is if we load the correct DTB
>> (there is no log entry telling a file name).
> Well, I have tried to find out and there are two .dtb for the
> Raspi B3+ built by my setup:
> root at letux:~# ls -l /boot/bcm2*rpi-3-b-plus*
> -rwxr-xr-x 1 root root 25399 Jan  5  2019 /boot/bcm2710-rpi-3-b-plus.dtb
> -rwxr-xr-x 1 root root 19655 Jan  5  2019 /boot/bcm2837-rpi-3-b-plus.dtb
> root at letux:~# 
> After adding a tag string to the DTS I can check which one is loaded by
> default (i.e. some rule built into the bootloader):
> root at letux:~# echo $(cat /proc/device-tree/dts)
> bcm2710-rpi-3-b-plus.dts
> root at letux:~# 
> So although bcm2837 is printed on the CPU chip it loads the bcm2710.dtb
> What I do not yet understand is why they are different... And why choosing
> bcm2837-rpi-3-b-plus.dtb by config.txt does not even boot.

If I simply rename it to bcm2710-rpi-3-b-plus.dtb the green LED blinks twice.

Well, there could be some node (chosen?) missing in bcm2837-rpi-3-b-plus.dts which
the bootloader tries to hack but does not find it. Therefore it does fail.

Ah, I get it!

The bcm2837 variants are from upstream-kernel (which is the basis of the
github kernel tree).

And my build driver compiles and copies all bcm2*.dtb. Therefore if I compile
the github kernel I get two .dtb and only one is used. The upstream-kernel
version is obviously not compatible to the code changes in the github kernel.

Now, why can I boot the letux-kernel at all? There are no bcm2710.dts in
upstream kernel and not in letux-kernel... And no setting in config.txt.

Well, I usually do not do a make clean and therefore the bcm2710-rpi-3-b-plus.dtb
is still available and copied to the SD card. Or it is not deleted if I
did try the github kernel before...

> BTW: neither USB, Ethernet and WLAN are working on the github raspi
> tree. Maybe it is because the bcm2837-rpi-3-b-plus.dtb is not loaded...
> BR,
> Nikolaus
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel

More information about the Letux-kernel mailing list