New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device Tree Overlays Loadable at Run-Time #62
Comments
|
great work @jempatel 😃 |
Build fails if package "onion-dt-overlay-sw-spi" is enabled to include in the build. Is this expected? |
Also, is below issue related to this package? I don't think so but still confirming. [ 0.355272] spi-mt7621 10000b00.spi: sys_freq: 193333333 |
You are right, this is not related. What this warning means is that in that hardware design, the SPI flash address mode is not resetted when a unexpected SoC hard-reset occors, rendering the device unbootable. This is the case for the Omega2(S)+ (but not for the Omega2(S)). The "hack" consists of reducing the time where a hard-reset would do any harm to the absolute minimum possible, so almost (but not 100%) eliminating the real world chance of a boot failure. This "hack" has been upstreamed and is now a standard feature of the linux kernel, which can be enabled in the device tree (and is, for the Omega2). However the original authors chose to treat it as a not-fully-ok condition and thus emit this long verbose and sometimes confusing warning. That's why I apply this patch which reduces the warning to a single line in my Omega2 builds - there's no point in being that alarmistic about a hardware condition nobody (except a yet to become Omega3, maybe? 😉) can do anything against. |
What kind of error do you get? |
|
I'm not 100% sure I understand the Thing is, if you select a package for being pre-installed in the image (selecting Looking at the makefile lines 71-74, it seems to me that check is in place. But your build error message show that the build tries to create a So I guess that part of the makefile, lines 71-74 contain a bug, only I don't see it - maybe @greenbreakfast does? |
There's a few reasons why this might be happening:
We will look at completing the sw spi dto package and hopefully that fixes the issue. |
@plan44 yes, that's what I mentioned, if we select the package to be pre-installed, it will create an issue as the postinit script will try to execute in the build system and try to create "/sys" directory, which is not a correct approach. My approach would be to give a warning to a user in the postinit script that a reboot is required after installation if the package is installed after booting else if the package is in the firmware itself, no postinit is required. @greenbreakfast Sure, I'll create a Bug report for the same. P.S. I'm porting everything on OpenWRT 23 and already have a stable build (at least for my purpose). Let me know if I can contribute anything here. |
Context
openwrt-22.03
Motivation
By being able to dynamically add hardware support to any running firmware just by installing packages, this opens the door for easier support of more use cases for the Omega2.
With this, users can avoid:
Description
Add support for runtime loading of device tree overlays to the Omega2 openwrt-22.03 firmware
The end-result: when device tree overlay definition files are placed in a specific location in the filesystem, on the next boot, the overlay should be loaded.
Specifics
Alternatives Considered
This is the best path forward.
Dynamic device tree overlays offer flexibility for all users. This also gives us a chance to create packages around some of the most common hardware functionality requests that device tree changes.
Much better than statically having to define DTS files and recompile firmware from scratch.
Additional Resources
See this post by @plan44 on the Onion Community: https://community.onion.io/topic/4993/beta-firmware-update-nodejs-v16-19-openwrt-22-03-3-pwm-and-more/4
Reference to existing IPK package file?
Implemented previously by @plan44
See patches 251 to 253 in https://github.com/plan44/plan44-feed/tree/main/p44b-onion/p44build/global-patches
The text was updated successfully, but these errors were encountered: