package/avrdude: fix build with kernel < 4.6
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 14 Mar 2021 09:46:41 +0000 (10:46 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 14 Mar 2021 10:38:49 +0000 (11:38 +0100)
commit8b00d709be82109a13a749bce4c4b49e09bde8cb
treed583a43f1985bd81769a4dec73fcd56cbd288538
parent1bad50722007620c233e5efeb423876e7e428af1
package/avrdude: fix build with kernel < 4.6

Commit 03fa36df7e6a (package/avrdude: Switch to upstream)
unconditionally enabled linuxspi on the assumption that it is available
since linux-2.6.22.

However, avrdude unconditionally uses GPIO and includes linux/gpio.h,
which is only available since kernel 4.6 and:
    https://github.com/torvalds/linux/commit/3c702e9987e261042a07e43460a8148be254412e

Add a Kconfig option, enabled by default for backward compatibility, to
drive whether to enable or disable SPI support.

Fixes:
 - http://autobuild.buildroot.org/results/962a7fcff1e54a0550eafa0cbca780ba8bc8409e

Note: weirdly enough, GPIO support does not use linux/gpio.h; rather it
uses sysfs.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr: add a Kconfig option]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/avrdude/Config.in
package/avrdude/avrdude.mk