package/avrdude: fix build with kernel < 4.6
PATCH 1/1 package/avrdude: fix build with kernel < 4.6
Disable linuxspi with kernel < 4.6 as linux/gpio.h is only available since
https://github.com/torvalds/linux/commit/3c702e9987e261042a07e43460a8148be254412e
This build failure is raised since switch to upstream in commit 03fa36df7e6aca0f4a1c8ae2fe691c0cda6ddc7a
Fixes:
- http://autobuild.buildroot.org/results/962a7fcff1e54a0550eafa0cbca780ba8bc8409e
--- package/avrdude/avrdude.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/avrdude/avrdude.mk +7 -1
@@ -13,10 +13,16 @@ AVRDUDE_SUBDIR = avrdude # Sources coming from svn, without generated configure and Makefile.in # files. AVRDUDE_AUTORECONF = YES -AVRDUDE_CONF_OPTS = --enable-linuxgpio --enable-linuxspi +AVRDUDE_CONF_OPTS = --enable-linuxgpio AVRDUDE_DEPENDENCIES = elfutils libusb libusb-compat ncurses \ host-flex host-bison +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6),y) +AVRDUDE_CONF_OPTS += --enable-linuxspi +else +AVRDUDE_CONF_OPTS += --disable-linuxspi +endif + ifeq ($(BR2_PACKAGE_LIBFTDI1),y) AVRDUDE_DEPENDENCIES += libftdi1 else ifeq ($(BR2_PACKAGE_LIBFTDI),y)
Signature · 1 line
2.30.0
Yann E. MORIN
AppliedPATCH 1/1 package/avrdude: fix build with kernel < 4.6
Fabrice, All,
On 2021-03-14 10:46 +0100, Fabrice Fontaine spake thusly:
Quoted 20 lines
Disable linuxspi with kernel < 4.6 as
linux/gpio.his only available since
https://github.com/torvalds/linux/commit/3c702e9987e261042a07e43460a8148be254412eThis build failure is raised since switch to upstream in commit
03fa36df7e6aca0f4a1c8ae2fe691c0cda6ddc7aFixes:
- http://autobuild.buildroot.org/results/962a7fcff1e54a0550eafa0cbca780ba8bc8409eSigned-off-by Fabrice Fontaine <[email protected]>--- package/avrdude/avrdude.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)package/avrdude/avrdude.mk +0
-0
package/avrdude/avrdude.mk AVRDUDE_SUBDIR = avrdude · line 20
Quoted 9 lines
package/avrdude/avrdude.mk +2
-1@@ -13,10 +13,16 @@ AVRDUDE_SUBDIR = avrdude # Sources coming from svn, without generated configure and Makefile.in # files. AVRDUDE_AUTORECONF = YES -AVRDUDE_CONF_OPTS = --enable-linuxgpio --enable-linuxspi +AVRDUDE_CONF_OPTS = --enable-linuxgpio AVRDUDE_DEPENDENCIES = elfutils libusb libusb-compat ncurses \ host-flex host-bison +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6),y)
The reason linuxspi was unconditionally enabled, was because it always were when we were using the fork.
So, now that we may have to disable it, we need to tel the use that it is not available.
So, I'va added a Kconfig option that drives wehther to enable or disable SPI support, and a comment when it is not available.
Applied to master with that changed, thanks.
Regards,
Yann E. MORIN.
Quoted 15 lines
package/avrdude/avrdude.mk +5
-0+AVRDUDE_CONF_OPTS += --enable-linuxspi +else +AVRDUDE_CONF_OPTS += --disable-linuxspi +endif + ifeq ($(BR2_PACKAGE_LIBFTDI1),y) AVRDUDE_DEPENDENCIES += libftdi1 else ifeq ($(BR2_PACKAGE_LIBFTDI),y)Signature · 6 lines
2.30.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'