DietPi OS for Quartz64
#11
(04-08-2023, 09:15 AM)CounterPillow Wrote: [quote pid="116764" dateline="1680699708"]

Anyone?

You'll have to use device tree overlays for that, but I don't think DietPi supports those.
[/quote]

Enabling overlay is not difficult. If overlay support is not enabled in the dietpi kernel, it is easy to replace the core (take it from armbiantv, overlay is enabled there).

https://forum.pine64.org/showthread.php?...#pid116276

(04-09-2023, 04:41 AM)balbes150 Wrote:
(04-08-2023, 09:15 AM)CounterPillow Wrote: [quote pid="116764" dateline="1680699708"]

Anyone?

You'll have to use device tree overlays for that, but I don't think DietPi supports those.

Enabling overlay is not difficult. If overlay support is not enabled in the dietpi kernel, it is easy to replace the core (take it from armbiantv, overlay is enabled there).

https://forum.pine64.org/showthread.php?...#pid116276
[/quote]
  Reply
#12
Overlays shouldn't be done with kernel patches. They should be enabled through mainline u-boot.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#13
(04-09-2023, 07:59 AM)CounterPillow Wrote: Overlays shouldn't be done with kernel patches. They should be enabled through mainline u-boot.

Absolutely the opposite. Using u-boot for overlay is a very bad solution. The correct solution is to perform the overlay "on the fly" in a running system, analogous to PnP drivers. Using u-booth to overlay, you will have to reboot the entire system at every change and do a bunch of stupid work.
  Reply
#14
(04-10-2023, 01:24 AM)balbes150 Wrote:
(04-09-2023, 07:59 AM)CounterPillow Wrote: Overlays shouldn't be done with kernel patches. They should be enabled through mainline u-boot.

Absolutely the opposite. Using u-boot for overlay is a very bad solution. The correct solution is to perform the overlay "on the fly" in a running system, analogous to PnP drivers. Using u-booth to overlay, you will have to reboot the entire system at every change and do a bunch of stupid work.

Absolutely the opposite. "on-the-fly" overlays were rejected by the mainline kernel because they're a bad hack. Of course, Armbian loves carrying bad hacks around, which is why people keep complaining that they can't get more than a week's worth of uptime in the chats with it.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#15
(04-10-2023, 04:13 AM)CounterPillow Wrote:
(04-10-2023, 01:24 AM)balbes150 Wrote:
(04-09-2023, 07:59 AM)CounterPillow Wrote: Overlays shouldn't be done with kernel patches. They should be enabled through mainline u-boot.

Absolutely the opposite. Using u-boot for overlay is a very bad solution. The correct solution is to perform the overlay "on the fly" in a running system, analogous to PnP drivers. Using u-booth to overlay, you will have to reboot the entire system at every change and do a bunch of stupid work.

Absolutely the opposite. "on-the-fly" overlays were rejected by the mainline kernel because they're a bad hack. Of course, Armbian loves carrying bad hacks around, which is why people keep complaining that they can't get more than a week's worth of uptime in the chats with it.

I'm not wedded to DietPi. Been using Plebian too. Which does have overlays because they work for SPI. 

H
  Reply
#16
(04-10-2023, 04:13 AM)CounterPillow Wrote:
(04-10-2023, 01:24 AM)balbes150 Wrote:
(04-09-2023, 07:59 AM)CounterPillow Wrote: Overlays shouldn't be done with kernel patches. They should be enabled through mainline u-boot.

Absolutely the opposite. Using u-boot for overlay is a very bad solution. The correct solution is to perform the overlay "on the fly" in a running system, analogous to PnP drivers. Using u-booth to overlay, you will have to reboot the entire system at every change and do a bunch of stupid work.

Absolutely the opposite. "on-the-fly" overlays were rejected by the mainline kernel because they're a bad hack. Of course, Armbian loves carrying bad hacks around, which is why people keep complaining that they can't get more than a week's worth of uptime in the chats with it.

Show how you will enable the overlay in EFI mode (using u-boot and with EDK2). In the main core, the part uses the opinion of "authoritative" idiots who do not understand the essence. Example - placing dtb files in the root system is complete idiocy. And there are more than enough such examples. But idiots stupidly repeat this idiocy referring to "this is used in the main core, so this is the right decision." And if you follow your logic, all overlays are hacks that violate security and stability, so they should not be used. The only correct solution is to use a full-fledged DTB with included content at once at the level of the entire DTB.
Show examples that Armbian cannot provide uptime. 
How many users use your system ?
  Reply
#17
If someone can show me a method to enable device tree overlays on-the-fly on mainline Linux 6.5.y, I am open to try it. I have however never seen such, despite for a very short time on Raspberry Pi with their vendor kernel/bootloader and "dtoverlay" command, which worked with only a very small number of their overlays, while in most cases it just caused kernel errors and did not enable the intended functionality. From that point on I was pretty sure that there is no reliable way to enable kernel device tree overlays on-the-fly, but I am open to be proven wrong.

In the meantime, even extlinux has support for (not on-the-fly) device tree overlays with fdtoverlay setting, so theoretically we could add some. Our U-Boot might be too old, as it is still a fork based on 2022.10, but I should be able to switch to mainline U-Boot, now that it supports adding (the sadly needed) SPL and DDR blobs properly.

But, it might be easier to enable I2S/SPI/... interfaces just OOTB, as long as they do not collide and the GPIO pins do not have conflicting uses.
  Reply
#18
(09-26-2023, 09:21 AM)MichaIng Wrote: If someone can show me a method to enable device tree overlays on-the-fly on mainline Linux 6.5.y, I am open to try it. I have however never seen such, despite for a very short time on Raspberry Pi with their vendor kernel/bootloader and "dtoverlay" command, which worked with only a very small number of their overlays, while in most cases it just caused kernel errors and did not enable the intended functionality. From that point on I was pretty sure that there is no reliable way to enable kernel device tree overlays on-the-fly, but I am open to be proven wrong.

In the meantime, even extlinux has support for (not on-the-fly) device tree overlays with fdtoverlay setting, so theoretically we could add some. Our U-Boot might be too old, as it is still a fork based on 2022.10, but I should be able to switch to mainline U-Boot, now that it supports adding (the sadly needed) SPL and DDR blobs properly.

But, it might be easier to enable I2S/SPI/... interfaces just OOTB, as long as they do not collide and the GPIO pins do not have conflicting uses.

link

https://forum.armbian.com/topic/24931-ar...ent=160812
  Reply
#19
(09-27-2023, 02:14 AM)balbes150 Wrote:
(09-26-2023, 09:21 AM)MichaIng Wrote: If someone can show me a method to enable device tree overlays on-the-fly on mainline Linux 6.5.y, I am open to try it. I have however never seen such, despite for a very short time on Raspberry Pi with their vendor kernel/bootloader and "dtoverlay" command, which worked with only a very small number of their overlays, while in most cases it just caused kernel errors and did not enable the intended functionality. From that point on I was pretty sure that there is no reliable way to enable kernel device tree overlays on-the-fly, but I am open to be proven wrong.

In the meantime, even extlinux has support for (not on-the-fly) device tree overlays with fdtoverlay setting, so theoretically we could add some. Our U-Boot might be too old, as it is still a fork based on 2022.10, but I should be able to switch to mainline U-Boot, now that it supports adding (the sadly needed) SPL and DDR blobs properly.

But, it might be easier to enable I2S/SPI/... interfaces just OOTB, as long as they do not collide and the GPIO pins do not have conflicting uses.

link

https://forum.armbian.com/topic/24931-ar...ent=160812

Thanks. However, it does not seem to work reliably. Tested on VisionFive 2:

Code:
root@DietPi:~# cd /sys/kernel/config/device-tree/overlays
root@DietPi:/sys/kernel/config/device-tree/overlays# mkdir test
root@DietPi:/sys/kernel/config/device-tree/overlays# cat /boot/dietpi-visionfive2-8GB.dtbo > test/dtbo
root@DietPi:/sys/kernel/config/device-tree/overlays# cat test/status
applied
root@DietPi:/sys/kernel/config/device-tree/overlays# free -m
              gesamt      benutzt    frei      gemns.  Puffer/Cache verfügbar
Speicher:      3872        659        2753        198        700        3213
Swap:              0          0          0
root@DietPi:/sys/kernel/config/device-tree/overlays# dmesg | tail -1
[62252.093999] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /memory@40000000/reg

So the overlay was applied successfully, in this case for 8 GiB RAM support, but it did not have an effect. The very same was the case with the majority of the RPi overlays I tested this (with their dtoverlay comnmand) a while ago. I think most features simply cannot be changed or added plug&play with the device tree, but the kernel and/or driver(s) need to initialise with them being set in the first place. And the memory leak warning was the very same on RPi and at least does not sound great, though I am not 100% sure if/when/how this applies or not.
  Reply
#20
RAM management, in principle, cannot work as an overlay. You're trying to use an overlay where it basically can't work. Have you seen on a regular PC that someone on a running system connected or disconnected the DDR memory strips and the system automatically changed the RAM? The PnP principle (dynamic overlay/parameter change) works only with equipment that can be dynamically reconfigured (load or unload drivers or change their settings, if they support it).
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  irradium (based on crux linux) Quartz64 riscv64, aarch64 mara 4 1,132 11-20-2024, 10:45 AM
Last Post: mara
  USB on Quartz64 Zero litbulb 0 97 11-13-2024, 08:16 AM
Last Post: litbulb
  Armbian and LibreELEC and AltLinux for Quartz64 balbes150 149 82,733 10-25-2024, 01:53 PM
Last Post: gounthar
  slarm64 (unofficial slackware) Quartz64 RK3566 (aarch64) mara 56 50,196 10-17-2023, 10:55 AM
Last Post: mara
  quartz64-a - on-board SATA port problems manning 2 1,789 09-14-2023, 04:22 PM
Last Post: manning
  How the reset Quartz64-b onboard memory (emmc) beepy 2 1,398 07-20-2023, 10:44 PM
Last Post: beepy
  crux-arm Quartz64 RK3566 (aarch64) mara 5 5,919 10-29-2022, 06:55 AM
Last Post: mara
  Ov5647 camera attached via csi to Quartz64 /Soquartz Randomuser 0 1,518 07-21-2022, 01:08 PM
Last Post: Randomuser
  Armbian on Quartz64 dieselnutjob 34 32,372 03-17-2022, 06:29 AM
Last Post: balbes150

Forum Jump:


Users browsing this thread: 4 Guest(s)