Dtb for ar71xx device

I'm trying to run kexec on an ar71xx device, but I get the error

could not scan "/proc/device-tree/": No such file or directory

The alternative to /proc/device-tree is providing a dtb file, but I can't find the source for it for this architecture/device in the OpenWRT source or how OpenWRT generates it. There's enough passed in the kernel command args that I'm not even sure if this devices uses device tree things.

Is it possible this device doesn't actually use the device tree? Am I just missing a config flag that would expose it in /proc? Is there something else I would do to get kexec to run?

ar71xx was mach file based, not using DTS - that what ath79 is for.

Hi @resident29,
ar71xx does not use devicetree.
Generally, the DTB files are built from DTS files in the OpenWrt source.
For ath79, they are here: https://github.com/openwrt/openwrt/tree/master/target/linux/ath79/dts
The build system uses the gcc preprocessor to process the #include, then dtc to compile the source to a devicetree blob: https://github.com/openwrt/openwrt/blob/c1a3eff3acd854a0eca1b26a48f253a8996abe16/include/image.mk#L184

1 Like

Reading up a little more on ar71xx vs ath79, I wonder if that's part of the reason kexec has that issue. It tracks linux upstream closer, so tools like kexec have better support.

I realized I'm running 18.06.9, and when I built the package, it was in the mips_24kc packages directory, not the targets packages directory, so it wasn't build specifically for this target, and it has architecture-specific options like the device tree that don't apply to ar71xx.

I'll try a more recent OpenWRT version and use ath79.

1 Like