WiringPi: Get model name from Device Tree if not able from cpuinfo
Signed-off-by: Yang Deokgyu <secugyu@gmail.com> Change-Id: I0ca6497da3a9b0123b552fe7c245f08915d69a39
This commit is contained in:
3
build
3
build
@@ -77,6 +77,9 @@ configure_gpiomem() {
|
||||
sudo=${WIRINGPI_SUDO-sudo}
|
||||
make="make -j $(( $(nproc) + 1 ))"
|
||||
hardware=$(fgrep -a Hardware /proc/cpuinfo | head -1 | awk '{ printf("%s %s %s\n", $3, $4, $5) }' | xargs)
|
||||
[ "$hardware",, != *"odroid"* ] \
|
||||
&& [ -f "/sys/firmware/devicetree/base/model" ] \
|
||||
&& hardware=$(cat /sys/firmware/devicetree/base/model)
|
||||
|
||||
if [ x$1 = "xclean" ]; then
|
||||
cd wiringPi
|
||||
|
||||
Reference in New Issue
Block a user