-
-
- Posts: 20
- Joined: 2025-03-29 12:56
Hello,
we've noticed that on one of our devices it's device tree is misconfigured on one pin. The device still works and we can SSH into it remotely. We would need to set this pin GPIO0_A1 as pull none, and we're wondering if it's possible to update just the device tree or do we need to go and fetch the device and completely re-flash the whole image.
Any information would be greatly appreciated!
Thank you

-
- Posts: 2018
- Joined: 2024-01-23 7:21
Hello, the method of extracting the device tree for modification and then writing it back is rather complex and involves kernel security hash verification. The simplest way is to directly use "io -4 0xFF388038 0x000C0000" to set the register (reboot will be invalid, it can be written in the startup script). Please refer to the attachment.
-
Attachments
-
-
Downloaded 419 times
-
- Posts: 8
- Joined: 2025-01-16 15:49
Just a side note to this: In my own builds (OpenWrt, not the standard image) for Luckfox targets, the kernel is built with CONFIG_OF_OVERLAY enabled, and there's the dtbocfg driver (
https://github.com/ikwzm/dtbocfg) which allows loading device tree overlays, effectively modifying the device tree, at runtime. I use that all the time to configure hardware (such as i2c device nodes, or PWM configs, pinmux) without need to modify or re-flash the entire image. I can only recommend that approach, because it very much modularizes hardware support in a clean way (and it's nothing new, the RPi folks are using this for a long time already).