Comments (9)
My question: Is it possible to use the device tree overlays from the Raspberry Pi Foundations kernel with the gokrazy kernel? Has this been attempted already?
I think I vaguely remember someone using a device tree overlay at some point.
For testing, you could copy the files of the boot partition, re-create said partition (mkfs.vfat), copy back your files with any modifications you need.
For making gokrazy pick up dtbs, you need to change (at least) what gokrazy includes in the boot partition: https://github.com/gokrazy/tools/blob/23cde3b0d858497a63c21e93ad30859bf197995f/internal/packer/write.go#L151
Or are there better approaches for customizing the device tree used by gokrazy?
No, this use-case isn’t well served right now. But I’m willing to accept changes to make it better :)
from gokrazy.
I'll see if I can get the first bit done to pull in the blobs (I also just now only realized you merged my previous PR, thanks for merging it).
The second one I started looking at somewhat when initially investigating that PR's change and I'll see if I can get some time to actually look at it later this week.
If someone else wants to poke in, they are more than welcome of course :)
from gokrazy.
After updating all of the relevant pieces, then updating config.json
with:
"BootloaderExtraLines": [
"dtoverlay=w1-gpio"
]
I rebuilt (ensuring to use the default kernel package, not my own) to get:
/perm/home # ls /sys/bus/w1/devices
28-4adf871e64ff 28-89ca871e64ff 28-a48c071e64ff w1_bus_master1
/perm/home #
Which I believe means that this all works 👍
from gokrazy.
Poking in here because I need the ability to load DT overlays and wanting to contribute an enhancement to add as much.
@stapelberg What would your idea be of where these go? Firmware or kernel?
Firmware makes semantically more sense to be but kernel already has the .dtb
file, which the .dtbo
would overlay over, and keeping them in separate repos doesn't make that much sense to me.
from gokrazy.
The devicetree is part of the kernel, so device tree overlays should go into the kernel repository, I think.
from gokrazy.
@stapelberg Opened a PR for this gokrazy/tools#63 let me know what you think. This (just) adds the ability for the kernel package to contain overlay/*.dtbo
and those to be included.
from gokrazy.
As part of looking at https://github.com/gokrazy/kernel/pull/475/files, I came across the device tree overlay issue again.
I think what needs to be done is:
- Change the gokrazy/firmware auto-update setup to also pull in the boot/overlays directory from the raspberrypi/firmware repository: gokrazy/firmware#309
- Change gokrazy/tools/internal/packer/write.go to include "overlays/*.dtbo" in firmwareGlobs: gokrazy/tools#67
- Make the config.txt on the boot partition configurable through gokrazy’s instance config.json, most likely just with a config_addendum mechanism where the user-supplied config is appended to what’s already in gokrazy/kernel/config.txt
Not all overlays will necessarily work depending on how specific they are to the Raspberry Pi OS kernel. But chances are that some just work.
Let me know if anyone is interested in contributing support for this.
from gokrazy.
OK, we have the overlays directory included in the gokrazy/firmware repository now, and the packer includes them in the boot partition.
What’s left is introducing the config_addendum mechanism in gokrazy/internal/config, using it in gokrazy/tools and documenting it in gokrazy/gokrazy/website.
from gokrazy.
I had a few minutes of downtime, so I introduced the BootloaderExtraLines JSON array in config.json and made the packer write those lines to config.txt.
Still left to do: documentation
If anyone wants to give this a shot and report back, success/failure reports are welcome!
from gokrazy.
Related Issues (20)
- When running `gok edit` the `$EDITOR` should be launched via a shell HOT 1
- Mount namespaces? HOT 1
- Add a way to read `PackageConfig` config from an appended partition HOT 5
- Huge cpu and mem load on gok update HOT 11
- Windows not supported? (gok CLI) HOT 4
- Document 'GOKRAZY_PARENT_DIR' environment variable HOT 1
- Add support for the Raspberry Pi 5 HOT 8
- store the password only in hashed form HOT 2
- command not found HOT 6
- Executing on demand HOT 2
- GPIO / periph.io Edge detection / sysfs not working HOT 2
- support for mounting additional devices (as /perm, or separately) HOT 3
- Kernel panic - not syncing HOT 7
- How to compile this project on mac HOT 2
- continuous integration: add kexec test cycle HOT 2
- Go web application fails to load template file HOT 4
- Support installing microcode HOT 3
- WebAuthN authentication HOT 3
- MBR bootloader: fix 15/16 MB kernel limit HOT 1
- Documentation how to set sysctl HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gokrazy.