With apologies for the terse response as I've got a long meeting coming up shortly:
I collected the DTS references I found useful on https://openwrt.org/docs/guide-developer/defining-firmware-partitions (ignore the link title, there's a lot more there now)
An important concept is that DTS files can add/override/delete what has already been included. Here's an example of one that I'm working on right now that deletes the non-existent NAND and changes the LED assignments:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "qca9531_glinet_gl-ar300m-nor.dts"
/ {
compatible = "glinet,gl-ar300m-lite", "qca,qca9531";
model = "GL.iNet GL-AR300M-Lite";
};
/delete-node/ &nand_flash;
// GL-AR300M-Lite has different LED colors than the non-Lite versions
&led_status {
label = "gl-ar300m-lite:red:status";
};
&led_lan {
label = "gl-ar300m-lite:green:lan";
};
&led_wlan {
label = "gl-ar300m-lite:green:wlan";
};
Flash dump on a NOR device can be done with dd
, which should be "stock".
Old-style (deprecated) sysfs export of GPIOs can be used to probe them, as could the newer "cdev" interface. The user-space utilities for the newer method are available as gpiod-tools
. Somewhere there's a quick script that I saw that looped through GPIOs by by one, exported them, toggled them, then unexpored them.
Edit: Found it:
and posts following