Jump to content

Overlays do not apply even when selected in armbian-config and then rebooting


Recommended Posts

Posted
armbianmonitor -u

https://paste.next.armbian.com/hoyonuruye

 

I installed the newest fresh debian minimal image for the RockPi-S and no matter what I do overlays do not apply.

I've followed

and compiled spi1 and spi2 rk3308. I've also tested the external antenna device tree as I have installed an external antenna:

image.png.4a4d2beb12605045c4301f2bf5031e61.png

 

However neither the external antenna is being used nor spidev are present.
I have diffed

dtc -I fs -O dts /proc/device-tree

and they are identical before and after enabling the overlays in armbian-config and rebooting.

 

I was able to confirm the "overlays" work by manually copypasting their changes in linux's source dts and generating a patch file, placing it in armbian's linux patch folder and recompiling from scratch, so if I do change the options spidev works, just I somehow can only do this by editing the source.

 

Here is the `/boot/armbianEnv.txt` file generated:

verbosity=1
bootlogo=false
console=serial
overlay_prefix=rk3308
fdtfile=rockchip/rk3308-rock-pi-s.dtb
extraargs=cma=16M
rootdev=UUID=036c1484-611d-470e-b2ef-775fe550149b
rootfstype=ext4
fdt_overlays=rk3308-s0-ext-antenna rk3308-spi1-spidev rk3308-spi2-spidev
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

Also after editing the overlays in armbian-config this error pops up:

/boot/armbianEnv.txt: line 9: rk3308-spi1-spidev: command not found

 

Posted
9 hours ago, Jorropo said:
verbosity=1
bootlogo=false
console=serial
overlay_prefix=rk3308
fdtfile=rockchip/rk3308-rock-pi-s.dtb
extraargs=cma=16M
rootdev=UUID=036c1484-611d-470e-b2ef-775fe550149b
rootfstype=ext4
fdt_overlays=rk3308-s0-ext-antenna rk3308-spi1-spidev rk3308-spi2-spidev
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

Try this:

 

verbosity=1
bootlogo=false
console=serial
overlay_prefix=rk3308
fdtfile=rockchip/rk3308-rock-pi-s.dtb
extraargs=cma=16M
rootdev=UUID=036c1484-611d-470e-b2ef-775fe550149b
rootfstype=ext4
overlays=s0-ext-antenna spi1-spidev spi2-spidev
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

For once the prefix is already set and for the other IIRC it is just overlays instead of fdt_overlays. But not sure.

Overall there might be a bug in config-ng with overlays. Just need to verify that manual applying works.

Posted

Applying the overlays manually works.

I use the s0-ext-antenna and b@1.3ghz overlays frequently.

I've never done it any other way.

 

Posted
44 minutes ago, Werner said:
verbosity=1
bootlogo=false
console=serial
overlay_prefix=rk3308
fdtfile=rockchip/rk3308-rock-pi-s.dtb
extraargs=cma=16M
rootdev=UUID=036c1484-611d-470e-b2ef-775fe550149b
rootfstype=ext4
overlays=s0-ext-antenna spi1-spidev spi2-spidev
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

This does not work either.

Posted
25 minutes ago, brentr said:

Applying the overlays manually works.

I use the s0-ext-antenna and b@1.3ghz overlays frequently.

I've never done it any other way.

Have you tried it with debian minimal image or the noble CLI ?

Posted (edited)

I too am not seeing any overlays added via armbianEnv.txt whether I add them on the overlays= line or user_overlays= line.
ls /proc/device-tree is the same whether items are added or not.

Running 24.8.3 (bookworm). Can anyone confirm that overlays aren't working in case it's something I'm doing wrong?

Edited by Meestor_X
Posted (edited)

For my ROCK3A (rockchip RK3568) using Armbian 24.11.x I enable SATA (beta 6.1.84 kernel). I need the file: /boot/dtb/rockchip/overlay/rock-3a-sata.dtbo, that exists.

 

I see in armbianEnv overlay_prefix=rk35xx, but from boot.cmd there is now an extra option without applying overlay_prefix, which is needed in my case I see. I compared with and older NanoPi-NEO (allwinner sun8i/H3), how i did it there.

 

So my statement added in armbianEnv.txt is:

 

overlays=rock-3a-sata

 

and that works.

 

 

Note that I added it with a text editor to armbianEnv.txt myself, as I needed to change paths related to booting unusual things that armbian-config doesn't know.

Edited by eselarm
Posted

@Meestor_XMy 32-bit boards still use 24.8.3 according to /etc/armbian-release I see. There there the older armbian-config is installed and I see overlays are under System->Hardware.

 

My new RK35xx boards all run beta/rolling/testing/trunk, so armbian-configng and I see no list there you can tick at the moment (configng is work-in-progress). There is an option to edit armbianEnv.txt. So that is what you need to do, same as I did and others in this topic. Make sure you understand this linux kernel DTB and overlays well enough I would say, else take older image.

Posted (edited)

@eselarmI've been working on this for several days, and as far as I can tell, on Armbian 24.8.3, if the "simple test" for whether an overlay has installed is to see if it shows up in `/proc/device-tree` then they are not loading, whether they are added via the overlays= or user_overlays= lines in /boot/armbianEnv.txt. This is for exisitng .dbto files (like s0-ext-antenna, bs, bs@1.3ghz, sdio@10mhz, etc), ones I've copied from websites or forums, or self-created ones.

The ONLY way I've been able to successfully install an overlay is by decompiling rk3308-rock-pi-s.dtb, editing it, and recompiling it. Annoyingly, `apt upgrade` will revert that file, so being able to add overlays or user_overlays would be very helpful.

References:

https://docs.armbian.com/User-Guide_Armbian_overlays/

https://forum.radxa.com/t/usb-sound-card-on-type-c-connector/17627

https://source.android.com/docs/core/architecture/dto/syntax#reference

 

 

Edited by Meestor_X
Posted

It's been a few weeks, I've been unable to figure out why overlays don't load in armbian. I've tried everything I can think of, scoured the internet with no answers... Anyone figured anything out yet? I can't be the only one having this problem??

Posted

Hello,

I can confirm, that I have the same problem as you, I am using the latest Armbian 24.11.1 and the overlay files are not applied (checked with proc/device-tree)

 

Unfortunately I don't have any solution for that - if I've found one, I will write this into your Thread.

Posted

My understanding is that it might take an RS232 logger to see what happens when the device is booting. I bought an RS232 to USB adapter and if I can figure out how to use it to watch the boot process maybe that will lead to an answer. 

I was hoping that one of the experts here had done this already, but I know how busy everyone is!

Posted (edited)

Indeed you need to hook up a 'serial console cable' for cases like this. Some call it 'serial debug cable' or you say 'RS232 logger'.  It actually should not be RS232, that is serial but other higher voltage signal levels used for long wires, PCs in the past. It must be TTL level 0V en 3V3.

 

Which pin you need is undocumented for your RockPiS ('Comming soon', cheap board so no good documentation...)  https://radxa.com/products/rockpi/pis#techspec

I guess you need to take the same pin numbers from the colored header as for RaspberryPi boards and almost all others like for my Rock3A. See what is Rx, Tx, GND.

If you look in boot.cmd for your board you could derive what setting you need on the USB side of the cable(in your laptop or so). For Linux laptop controlling  my Rock3A I use for example: sudo screen /dev/ttyUSB0 1500000

Edited by eselarm
Posted

It seems that new armbian config adds full overlay file name into armbianEnv.txt, in the same time there exists overlay_prefix variable, eg:

overlay_prefix=rockchip
overlays=rockchip-rk3399-spi-jedec-nor

AFAIU, to get a full file name of an overlay, boot script joins overlay_prefix and, in this case, a full overlay name (from overlays variable as added by armbian config), adding "-" in between and obviously cannot find the resulting file name since overlay_prefix + "-" are effectively doubled: rockchip-rockchip-rk3399-spi-jedec-nor

For me practical solution was to remove "rockchip-" from overlay name. Removal of overlay_prefix variable is not working, I guess this is because boot script anyway adds leading "-" making file name wrong.

Boot scripts are black boxes for me, but may be @Igor will be able to have a look whether scripts or armbian config need any changes in logic.

Posted (edited)

@MaxT that sounds like it's working as intended. The `overlays=` line in /boot/armbianEnv.txt should NOT have the prefix on each overlay name, and the actual overlay files do have that prefix name.
e.g. here's my

/boot/armbianEnv.txt

 

 

cat /boot/armbianEnv.txt
verbosity=1
bootlogo=false
console=serial
overlay_prefix=rk3308
fdtfile=rockchip/rk3308-rock-pi-s.dtb
extraargs=cma=16M
rootdev=UUID=036c1484-611d-470e-b2ef-775fe550149b
rootfstype=ext4
overlays=s0-ext-antenna bs bs@1.3ghz sdio@10mhz
extraargs=net.ifnames=0
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u



The files in /boot/dtb/rockchip/overlay are called:
 

ls -l /boot/dtb/rockchip/overlay/rk3308-*
-rw-r--r-- 1 root root  459 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-b@1.3ghz.dtbo
-rw-r--r-- 1 root root  459 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-bs@1.3ghz.dtbo
-rw-r--r-- 1 root root  688 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-bs.dtbo
-rw-r--r-- 1 root root  223 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-emmc.dtbo
-rw-r--r-- 1 root root 1204 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-s0-ext-antenna.dtbo
-rw-r--r-- 1 root root  226 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-sdio@10mhz.dtbo
-rw-r--r-- 1 root root  226 Nov 18 03:47 /boot/dtb/rockchip/overlay/rk3308-sdio@4mhz.dtbo


The overlay files have the prefix as part of their names (rk3308 in this case), so it should "just work", but sadly it does not.

Edited by Meestor_X
Posted
Again, my only way of checking to see if the overlays loaded is to look at /proc/device-tree. I ASSUME any loaded overlay will show up there?


You mentioned that overlay name shouldn't contain prefix and that's right, but I see that armbian-config adds overlay name with prefix included and to make it work, one has to remove prefix, so not sure that it works as intended.

AFIAK since overlays modify DT nodes, you can only see modified data in relevant nodes, rather than an overlay itself.

Another consideration is that overlay itself might not work. Don't remember which exactly, but some overlay for eg rk3399 is not working.
Posted
2 hours ago, Meestor_X said:

Well, it's all a bit of a mystery.

You might have the situation that your Pi sees/has 2x U-Boot, 2x boot.scr

Or even more. boot.scr is generated from boot.cmd, look in there how scripting composes the name of your overlay files.

Multiple copies and/or versions will create mystery. Take your time and see what is what and where. And connect serial console. It allows you to load dtbo manually, needs a lot of U-boot commands study, I also had to learn myself.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines