Hello, On Sun, Jan 10, 2016 at 09:23:40PM -0800, Martin Michlmayr wrote: > Please note that the strange "echo ... $(cat ..)" construct is > intentional. 'cat /proc/device-tree/model' leads to a strange > character at the end because there's no newline and using echo > gets rid of it.
Maybe put this info also (or instead) in a source comment? > diff --git a/debian/templates/image.plain.bug/include-model > b/debian/templates/image.plain.bug/include-model > index 60a7112..9c6aedd 100644 > --- a/debian/templates/image.plain.bug/include-model > +++ b/debian/templates/image.plain.bug/include-model > @@ -39,6 +39,11 @@ grep_model() { > false > ;; > esac > + > + # Device Tree model > + if [ -r /proc/device-tree/model ]; then > + echo "Device Tree model:" $(cat /proc/device-tree/model) In recent kernels[1] /proc/device-tree is a symlink to /sys/firmware/devicetree/base. I expect that it stays there for quite a while, but I wonder if it would be cleaner to use /sys/firmware... directly. Hmm, probably not, because using proc also covers 2.6.36..3.15. Best regards Uwe [1] since 75b57ecf9d1d ("of: Make device nodes kobjects so they show up in sysfs") which appeared in 3.15. -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |